Overview
The API has three document lists. Each list returns the same paginated response and accepts the same pagination and sort parameters. The filters are different for each list. Use this guide when you build a document overview, a reconciliation job or a retry procedure.The three lists
You can send a document only when it is in the
DRAFT or FAILED state. For the transitions, the retry behaviour and the webhook events of each state, see Document lifecycle and delivery tracking.
For the inbox and the procedure to receive documents, see Receive documents.
Pagination
All three lists use page-based pagination.integer
default:"1"
Page number. The first page is
1.integer
default:"20"
Number of documents on each page. Minimum
1, maximum 100. A value out of this range gives 422 Unprocessable Entity.items is a full document object (see the document schema). The example shows only some of the document fields.
Read all pages
Increasepage until has_next_page is false.
Read all pages (Node.js and Python)
Read all pages (Node.js and Python)
Pagination uses a page offset, not a cursor. With the default sort (
created_at, newest first), a document that is added during the loop moves the subsequent documents one position. A document can then be on two pages. Remove duplicates by id, or sort with sort_order=asc for a stable sequence.Filters
Filters are combined with a logical AND. Text filters are not case-sensitive and match a part of the value.Drafts
GET /api/drafts/
Outbox
GET /api/outbox/
The outbox has no
state parameter. It always returns documents in state SENT.
Inbox
GET /api/inbox/
The inbox has no
state parameter. It always returns documents in state RECEIVED. See Receive documents for the full procedure.
Date filters
date_from and date_to compare with the issue date of the document (invoice_date), not with the date of creation or transmission. Both limits are inclusive. The API uses only the date part of the value and ignores the time part.
Search
search is available on all three lists. It matches a part of one of these fields:
invoice_id(the invoice number)customer_namevendor_namenote
search is not an exact match. search=INV-2026-001 also returns INV-2026-0010. Compare invoice_id in your code when you must have an exact match.Sort
All three lists accept the same sort parameters.string
default:"created_at"
Field to sort by. One of
created_at, invoice_date, due_date, invoice_total, customer_name, vendor_name, invoice_id.string
default:"desc"
Sort direction:
asc or desc.created_at in descending order: the newest document is first. A value that is not in the list gives 422 Unprocessable Entity.
Manage a draft
A document that you create withPOST /api/documents/ starts in state DRAFT. These are the operations that the API permits on a draft.
1
Create the draft
Create the document with
POST /api/documents/. See Create e-invoices. Keep the id from the response.2
Validate the stored draft
This step is optional.
POST /api/documents/{document_id}/validate validates the stored document against Peppol BIS Billing 3.0 and returns the UBL XML.3
Send the draft
Send the document with
POST /api/documents/{document_id}/send. The document stays in the drafts list until its state is SENT. Then it is in the outbox.4
Delete a draft that you do not send
Delete the document with
DELETE /api/documents/{document_id}.Validate a stored draft
is_valid is false and issues contains one entry for each failure. The id in this response identifies the validation result, not the document. See Validation during development for the issue fields.
Delete a draft
DRAFT or FAILED. For a document in state TRANSIT, SENT or RECEIVED, the API returns 400 Bad Request:
404 Not Found. A deleted document is not in the lists and you cannot get it back through the API.
Change a draft
The API has no endpoint to update a document. To change a draft, delete it and create it again with the corrected data. The new document has a newid.
Validation is not a separate mandatory call.
POST /api/documents/ rejects a payload that does not pass the same rules. Use POST /api/validate/json while you develop, because it returns all rule failures and the generated UBL.Send a failed document again
You can send a document from stateDRAFT or FAILED only. To try a failed document again, call POST /api/documents/{document_id}/send again with the same document ID. A new document is not necessary.
For a document in a different state, the API returns 405 Method Not Allowed:
state filter:
Find duplicates before a retry
The API has no idempotency key. If a create request has a timeout and you send it again, the result can be two drafts with the sameinvoice_id. The API does not reject the second one.
Before you repeat a create request, look for the invoice number in the drafts list and in the outbox:
1
Search the drafts list
Call
GET /api/drafts/?search=INV-2026-001. This finds documents in state DRAFT, TRANSIT and FAILED.2
Search the outbox
Call
GET /api/outbox/?search=INV-2026-001. This finds documents in state SENT.3
Compare the invoice number
search matches a part of the value. In the results, keep only the documents whose invoice_id is equal to your invoice number.4
Continue with the document that exists
If you find a document, use its
id and do not create a new one. If you find more than one draft, delete the extra drafts.Deprecated items
Next Steps
Document lifecycle and delivery tracking
Learn the document states and the transitions between them.
Receive documents
Read the inbox and process inbound documents.
Errors and troubleshooting
Find the cause of an error response or a failed send.