Sending e-invoices
XML payload, metadata, idempotence and meaning of the 202 Accepted response.
The endpoint serves for the technical acceptance of the document for sending. A successful response of HTTP 202 Accepted means that Doklado has accepted the document for further processing. It does not mean successful delivery to the recipient, the semantic validity of the document or the legal effects of the eInvoice.
Read the sending status and TDD reporting result using the SAPI+ status endpoint. You can also receive change notifications through webhooks.
Endpoint - Sending the document
Status: Implemented, Deployed: Sandbox
POST /v1/sapi/document/send
Authorization: Bearer <access_token>
Content-Type: application/json
Idempotency-Key: <uuid>
X-Peppol-Participant-Id: <sender_participant_id>
Mandatory HTTP headers
Idempotency-Key
Idempotency-Key must be stable for one logical attempt to send the document. Its validity is maximum 24 hours. Do not rely on duplicate submission protection to retry the request after expiration; verify the status of the original submission before retrying.
Recommendations:
- use UUID v4,
- when retrying the same request, use the same
Idempotency-Key, - when sending a new document, use the new
Idempotency-Key, - when changing the payload or metadata, do not use the old
Idempotency-Key.
If the client uses the same Idempotency-Key with a different payload or different metadata, Doklado returns conflict information.
Request body
Request example:
{
"metadata": {
"documentId": "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",
"creationDateTime": "2026-05-11T12:00:00Z"
},
"payload": "<?xml version="1.0" encoding="UTF-8"?><Invoice>...</Invoice>",
"payloadFormat": "XML",
"payloadEncoding": "UTF-8",
"checksum": "5f70bf18a086007016aaf1828a0972a2c1f8eec3e7c891944dfb2f7f3f4f1b55"
}
| Field | Mandatory | Description |
|---|---|---|
metadata | yes | Object DocumentMetadata. |
payload | yes | XML document as string in JSON. |
payloadFormat | yes | For the SAPI-compatible layer, the value XML. |
payloadEncoding | no | Payload encoding, by default UTF-8. |
checksum | no | SHA-256 checksum of the payload. |
payload is an XML document transferred as a JSON string. It is not base64 unless a different transfer mode is explicitly added in the next version of the specification. The size limit applies to the byte representation of XML after serialization to UTF-8.
DocumentMetadata object
| Field | Mandatory | Description |
|---|---|---|
documentId | yes | Unique document identifier assigned by the client, e.g. INV-2026-0001. |
documentTypeId | yes | Peppol Document Type Identifier. |
processId | yes | Peppol Process Identifier. |
senderParticipantId | yes | Peppol Sender ID in format schemeId:identifier. |
receiverParticipantId | yes | Peppol recipient ID in format schemeId:identifier. |
creationDateTime | yes | Document creation time in ISO 8601. |
Examples of identifiers:
Document Type ID:
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
Process ID:
urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
Scheme used for Slovak tax identification numbers:
0245
Checksum calculation
If the client sends a checksum field, the value must be a SHA-256 hash from the exact byte representation of payload after serialization to UTF-8. The result is sent as small hexadecimal characters with a length of 64 characters.
checksum = sha256_hex(payload_bytes_utf8)
Successful response
HTTP 202 Accepted
{
"providerDocumentId": "doc_01HX0000000000000000000000",
"status": "ACCEPTED",
"receivedAt": "2026-05-11T12:00:05Z",
"timestamp": "2026-05-11T12:00:05Z"
}
| Field | Type | Description |
|---|---|---|
providerDocumentId | string | Unique document identifier assigned by Doklado. |
status | string | On successful reception, the value ACCEPTED. |
receivedAt | datetime | Time when Doklado received the document. |
timestamp | datetime | Response generation time. |
HTTP 202 Accepted only confirms the technical acceptance of the document for processing. If the document is already rejected during the synchronous validation of the request, Doklado returns the corresponding error HTTP status instead of 202.
Error states sending
| HTTP | Cause and solution |
|---|---|
400 | Invalid request, missing field, invalid metadata format or mismatch X-Peppol-Participant-Id with metadata.senderParticipantId. |
401 | Invalid or expired token. The client must renew the token or obtain a new one. |
403 | The client is not authorized to send for the specified senderParticipantId. |
409 | The same Idempotency-Key was used with a different payload or metadata. |
422 | The document was syntactically acceptable as a request, but did not pass the validation or Peppol rules. |
429 | Call limit exceeded. Look rate limits according to endpoints. |
500 | Internal error Doklado. |
503 | Temporary unavailability of dependent service or sending infrastructure. |
Example of sending via cURL
Use variables from first call. Save the request body from the example above to the file request.json. Replace the metadata with your own data and insert a real valid Peppol eInvoice as a JSON string into payload. Type XML quotes as \" and newlines as . The XML sample with ... only illustrates the format and is not a valid invoice.
Optional field checksum omit or calculate for actual XML payload; do not take the sample value. metadata.senderParticipantId must match SAPI_PARTICIPANT_ID.
For this document, generate and store the UUID in the variable SAPI_IDEMPOTENCY_KEY. When repeating the same request, keep the same key and file contents.
SAPI_IDEMPOTENCY_KEY='UUID_FOR_THIS_DOCUMENT'
curl --request POST --fail-with-body --silent --show-error \
"$SAPI_BASE_URL/sapi/document/send" \
--header "Authorization: Bearer $SAPI_ACCESS_TOKEN" \
--header "X-Peppol-Participant-Id: $SAPI_PARTICIPANT_ID" \
--header "Idempotency-Key: $SAPI_IDEMPOTENCY_KEY" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-binary @request.json
Before sending, check the participant and its capabilities. Save providerDocumentId from the response and use it to read the delivery status, TDD reporting status and receipts. For these calls, send the original sender’s Participant ID and a token with the document:send permission. You can also receive status event notifications through webhooks.