Receiving e-invoices
Polling, paging, XML download and acknowledge.
This section describes the SAPI-compliant way in which the client system retrieves eInvoices received via the Doklado SAPI+ API. Receiving documents is designed as a polling workflow: the client first obtains a list of available documents, then downloads the details of the selected document and, after successful processing, confirms the download via acknowledge.
The listing of documents does not mean their processing or acceptance in the client system. The document is considered processed only after a successful call to acknowledge.
When processing, follow the cursor nextPageToken; do not use document order as a substitute for a cursor.
Basic rules:
- the client reads documents in the organizational context of the
X-Peppol-Participant-Idheader, - list endpoint returns only metadata and pagination,
- The XML content of the document is downloaded separately via the detail endpoint,
acknowledgeis called only after the document has been successfully saved or processed in the client system,- polling remains a mandatory fallback even when using webhooks.
Endpoint - List of received documents
Status: Implemented, Deployed: Sandbox
GET /v1/sapi/document/receive
Authorization: Bearer <access_token>
X-Peppol-Participant-Id: <participant_id>
The endpoint returns a paged list of received documents available for the given participant_id.
Query parameters:
| Parameter | Mandatory | Description |
|---|---|---|
pageToken | no | A cursor token for the next page. The value is taken from nextPageToken previous answer. |
limit | no | Number of results per page. The default value is 20, the maximum value is 100. |
status | no | Filter by document status. Supported values: RECEIVED, ACKNOWLEDGED. |
Successful response: HTTP 200
{
"documents": [
{
"documentId": "doc_01HX0000000000000000000000",
"clientDocumentId": "INV-2026-0001",
"documentTypeId": "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",
"processId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0",
"senderParticipantId": "0245:1234567890",
"receiverParticipantId": "0245:9876543210",
"receivedAt": "2026-05-11T12:00:05Z",
"status": "RECEIVED",
"payloadFormat": "XML"
}
],
"nextPageToken": "eyJjdXJzb3IiOiJuZXh0In0"
}
Response body:
| Field | Type | Description |
|---|---|---|
documents | array | List of objects DocumentMetadata. |
nextPageToken | string | A cursor token for the next page. The field is missing or present null, if there is no next page. |
The definition of the DocumentMetadata object is common to both sending and receiving documents.
Paging:
- the client processes all items from the current response,
- if the response contains
nextPageToken, it will be used aspageTokenin the next call, - if
nextPageTokenis not present, the current polling cycle is terminated.
Endpoint - Detail of the received document
Status: Implemented, Deployed: Sandbox
GET /v1/sapi/document/receive/{documentId}
Authorization: Bearer <access_token>
X-Peppol-Participant-Id: <participant_id>
The endpoint returns the metadata and XML content of one received document.
Path parameters:
| Parameter | Mandatory | Description |
|---|---|---|
documentId | yes | The document identifier from the field documents[].documentId. |
Successful response: HTTP 200
{
"metadata": {
"documentId": "doc_01HX0000000000000000000000",
"clientDocumentId": "INV-2026-0001",
"documentTypeId": "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",
"processId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0",
"senderParticipantId": "0245:1234567890",
"receiverParticipantId": "0245:9876543210",
"receivedAt": "2026-05-11T12:00:05Z",
"status": "RECEIVED",
"payloadFormat": "XML"
},
"payload": "<?xml version="1.0" encoding="UTF-8"?><Invoice>...</Invoice>",
"payloadFormat": "XML",
"payloadEncoding": "UTF-8",
"checksum": "5f70bf18a086007016aaf1828a0972a2c1f8eec3e7c891944dfb2f7f3f4f1b55"
}
Response body:
| Field | Type | Description |
|---|---|---|
metadata | object | Object DocumentMetadata with document metadata. |
payload | string | Document content as UTF-8 XML. The payload is returned in the form in which it is intended for delivery to the client. |
payloadFormat | string | For the SAPI-compatible layer, the value XML. |
payloadEncoding | string | Payload encoding, by default UTF-8. |
Downloading a detail by itself does not change the status of the document to ACKNOWLEDGED. The client can download the detail repeatedly until the document is confirmed via acknowledge.
Endpoint - Confirmation of receipt
Status: Implemented, Deployed: Sandbox
POST /v1/sapi/document/receive/{documentId}/acknowledge
Authorization: Bearer <access_token>
X-Peppol-Participant-Id: <participant_id>
Operation acknowledge will confirm that the client system has successfully received and processed the document into its own storage or workflow. After successful confirmation, the document is set to the state ACKNOWLEDGED.
The operation is idempotent. Calling acknowledge again for an already confirmed document will return a successful response with a status of ACKNOWLEDGED.
Path parameters:
| Parameter | Mandatory | Description |
|---|---|---|
documentId | yes | The document identifier from the field documents[].documentId. |
Successful response: HTTP 200
{
"documentId": "doc_01HX0000000000000000000000",
"status": "ACKNOWLEDGED",
"acknowledgedDateTime": "2026-05-11T12:05:30Z"
}
Response body:
| Field | Type | Description |
|---|---|---|
documentId | string | Identifier of the confirmed document. |
status | string | After successful confirmation, the value ACKNOWLEDGED. |
acknowledgedDateTime | datetime | Confirmation time in ISO 8601. |
The client should not call acknowledge if the document could not be saved, validated or submitted for internal processing. In that case, the document remains available in state RECEIVED and the client can process it in the next polling cycle.
Received document statuses
| Status | Description |
|---|---|
RECEIVED | The document has been received by Doklado and is available to the client. The client has not yet confirmed it via acknowledge. |
ACKNOWLEDGED | The client confirmed the successful download of the document. By default, the document is not returned when filtering status=RECEIVED. |
Recommended receiving workflow
Recommended client behavior:
- Call
GET /v1/sapi/document/receive?status=RECEIVED. - Call
GET /v1/sapi/document/receive/{documentId}for each document from the list. - Save or process the XML payload in your own system.
- Call
POST /v1/sapi/document/receive/{documentId}/acknowledgeonly after successful processing. - Continue to the next page using
nextPageTokenuntil there are no more pages.
Receiving error states
| HTTP | Cause and solution |
|---|---|
400 | Invalid request, invalid pageToken, invalid value limit or an unsupported value status. |
401 | Invalid or expired token. The client must renew the token or obtain a new one. |
403 | The client is not authorized to read documents for the specified X-Peppol-Participant-Id. |
404 | Document according to documentId does not exist or does not belong to the client's organizational context. |
409 | The document is not in a state that allows the requested operation. |
429 | Call limit exceeded. Look rate limits according to endpoints. |
500 | Internal error Doklado. |
503 | Temporary unavailability of dependent service or receiving infrastructure. |
Repeated processing
Identify the document by documentId assigned by Doklado and recognize already saved documents. When notifying document.received, take it from data.documentId; it can be a document ID (expense) or a company file (organizationFile). Consider the identifier as an opaque string and use it without modification in the detail as well as acknowledge. If the save succeeds but the confirmation fails, on the next receipt, do not create a duplicate and repeat the confirmation. Do not use another company's cursor when changing the organizational context.
The current Swagger lists the order by time of acceptance in ascending order, from the oldest documents. Build the integration on cursor pagination: for the next page, always pass an unchanged nextPageToken in the pageToken parameter, not a date or custom order guess.