Get documents received
In this section we will show you how to list and retrieve all the documents received by a company.
Returned documents are always linked to the company api key.
Get new received
This access point allows you to retrieve the list of all new documents wich have never fully retrieve by the company.
See Get document by id to fully retrieve a document.
Request
- URL :
/document/receive
- Method :
GET
- Headers:
- x-api-key:
THE COMPANY API KEY
- x-api-key:
Response
The request return an array of documentList object
[
{
"date": "2022-08-30T08:53:20.885",
"id": "a3f8b641-adee-4f14-a512-d61f10d868c3",
"sender": "9938:biaclogtest",
"receiver": "9938:biaclogtest",
"typeDocument": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1"
}
]
- date:
The receive document date
- id:
A UUID fo the document, use to retreive the full document
- sender:
The companyId of the sender
- typeDocumet:
the document type
Error response
- Status code:
401
The api key is missing or invalid.
Get all received
This access point allows you to retrieve the list of all the documents received by the company.
Request
- URL :
/document/receive/all
- Method :
GET
- Headers:
- x-api-key:
THE COMPANY API KEY
- x-api-key:
Response
The request return an array of documentList object
[
{
"date": "2022-08-30T08:53:20.885",
"id": "a3f8b641-adee-4f14-a512-d61f10d868c3",
"sender": "9938:biaclogtest",
"receiver": "9938:biaclogtest",
"typeDocument": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1"
}
]
- date:
The received date
- id:
A UUID fo the document, use to retreive the full document
- sender:
The companyId of the sender
- typeDocumet:
the document type
Error response
- Status code:
401
The api key is missing or invalid
Get by date received
This access point allows you to retrieve documents in a date range.
See [Get by ID](/document/receive-document.md#Get by id) to fully retrieve a document.
Request
- URL :
/document/receive/date
- Method :
GET
- Headers:
- x-api-key:
THE COMPANY API KEY
- x-api-key:
- Query parameters :
- from : the from date (YYYY-MM-DD)
- to : the from date (YYYY-MM-DD)
sample: /document/receive/date?from=2022-01-01&to=2022-12-12
Response
The request return an array of documentList by date range
[
{
"date": "2022-08-30T08:53:20.885",
"id": "a3f8b641-adee-4f14-a512-d61f10d868c3",
"sender": "9938:biaclogtest",
"receiver": "9938:biaclogtest",
"typeDocument": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1"
}
]
- date:
The receipt date
- id:
A UUID fo the document, use to retreive the full document
- sender:
The companyId of the sender
- typeDocumet:
the document type
Error response
- Status code:
401
The api key is missing or invalid.
Get documents send
In this section we will show you how to list and retrieve all the documents send by a company.
Returned documents are always linked to the company api key.
Get all send
This access point allows you to retrieve the list of all the documents send by the company.
Request
- URL :
/document/send/all
- Method :
GET
- Headers:
- x-api-key:
THE COMPANY API KEY
- x-api-key:
Response
The request return an array of documentList object
[
{
"date": "2022-08-30T08:53:20.885",
"id": "a3f8b641-adee-4f14-a512-d61f10d868c3",
"sender": "9938:biaclogtest",
"receiver": "9938:biaclogtest",
"typeDocument": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1"
}
]
- date:
The send date
- id:
The UUID of the document, use to retreive the full document
- sender:
The companyId of the sender
- typeDocumet:
the document type
Error response
- Status code:
401
The api key is missing or invalid
Get by date send
This access point allows you to retrieve documents in a date range.
See [Get by ID](/document/receive-document.md#Get by id) to fully retrieve a document.
Request
- URL :
/document/send/date
- Method :
GET
- Headers:
- x-api-key:
THE COMPANY API KEY
- x-api-key:
- Query parameters :
- from : the from date (YYYY-MM-DD)
- to : the from date (YYYY-MM-DD)
sample: /document/send/date?from=2022-01-01&to=2022-12-12
Response
The request return an array of documentList by date range
[
{
"date": "2022-08-30T08:53:20.885",
"id": "a3f8b641-adee-4f14-a512-d61f10d868c3",
"sender": "9938:biaclogtest",
"receiver": "9938:biaclogtest",
"typeDocument": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1",
"StatusTransaction": "Success"
}
]
- dateReceipt:
The send date
- id:
A UUID fo the document, use to retreive the full document
- sender:
The companyId of the sender
- typeDocumet:
the document type
- StatusTransaction:
The transaction status (Success or Failed)
Error response
- Status code:
401
The api key is missing or invalid.
Get by id
This access point allows you to retrieve the content of a document by id
Request
- URL :
/document/{id}
- Method :
GET
- Headers:
- x-api-key:
THE COMPANY API KEY
- x-api-key:
sample: /document/a3f8b641-adee-4f14-a512-d61f10d868c3
Response
The request return the ubl file as xml.
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:sh="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>test-invoice</cbc:ID>
...
</Invoice>
Error response
- Status code:
401
The api key is missing or invalid.
- Status code:
404
No document matches id.