Poštár

API Documentation

Document Types

In PEPPOL terminology every exchanged file is a "message". The API reflects this — what you retrieve from endpoints such as /api/documents or /api/documents/inbox are Peppol messages stored in your account.

Default filter: invoice + credit note only

API endpoints such as /api/documents and /api/documents/inbox return only invoice and creditnote document types by default. Response messages (MLR, IMR, Order Response) are intentionally excluded from these lists because they represent the status of another document rather than a standalone business document.

To retrieve all document types, pass the query parameter documentTypes=* — for example: /api/documents?documentTypes=*

Supported document types

The documentType field in the API uses the following short identifiers. The corresponding PEPPOL BIS specification defines the XML format and validation rules for each type.

TypeNamePEPPOL BISIn default listNotes
invoiceInvoiceBIS 3Standard UBL invoice. Returned by default.
creditnoteCredit NoteBIS 3Standard UBL credit note. Returned by default.
orderOrderBIS 28Purchase order from buyer to supplier.
order-responseOrder Response (OR)BIS 28Supplier's response to an order. Updates the order's status (accepted / rejected). Use documentTypes=order_response or documentTypes=* to list.
order-changeOrder ChangeBIS 28Amendment to a previously submitted order.
order-cancellationOrder CancellationBIS 28Cancellation of a previously submitted order.
despatch-adviceDespatch AdviceBIS 16Shipping notification from supplier to buyer.
receipt-adviceReceipt AdviceBIS 17Buyer's confirmation that goods or services were received.
catalogueCatalogueBIS 1Product / price catalogue from supplier.
mlrMessage Level Response (MLR)BIS 36Technical acknowledgement or rejection of a received message. Not a business document — it updates the status of the original document.
otherOtherAny PEPPOL message type not matched by the categories above.

Response messages: MLR, IMR and Order Response

MLR (Message Level Response), IMR (Invoice Message Response) and Order Response (OR) are not standalone business documents — they are replies to another document. The API applies their outcome directly to the status of the original document rather than surfacing them in the default document list.

  • MLR — transmission-level acknowledgement or rejection. Updates the technical status of the sent document.
  • IMR — business-level acceptance or rejection of an invoice or credit note from the buyer.
  • Order Response — supplier's acceptance or rejection of a purchase order.

If you need to inspect the raw response document itself you can fetch it directly using the document ID carried in the webhook payload:

GET /api/documents/{documentId}
Authorization: Bearer <token>

The documentId for the response message is included in the webhook payload for mlr, invoice.response and order.response events as the documentId field.

Controlling what you receive via webhooks

When registering a webhook you choose which events to subscribe to. You can subscribe to high-level document status events, to the raw response messages, or to both:

EventWhen firedPayload contains
mlrMLR received for a document you sentdocumentId of the MLR message; the original document status is already updated
invoice.responseIMR (BIS 63) received for an invoice or credit note you sentdocumentId of the IMR message plus responseCode (AP/RE/UQ/PD) and referencedDocumentId of the original invoice
order.responseOrder Response (BIS 28) received for an order you sentdocumentId of the Order Response message plus responseCode and referencedDocumentId of the original order

For most integrations, subscribing only to mlr, invoice.response and order.response is sufficient. The documentId in each payload can be passed directly to GET /api/documents/{documentId} when you need the full XML or parsed fields of the response message.

Filtering by document type

Both /api/documents and /api/documents/inbox accept a documentTypes query parameter (comma-separated values or * for all types).

Default — invoices and credit notes only

GET /api/documents
GET /api/documents/inbox

All document types including response messages

GET /api/documents?documentTypes=*
GET /api/documents/inbox?documentTypes=*

Orders and order responses only

GET /api/documents?documentTypes=order,order-response

MLR messages only

GET /api/documents?documentTypes=mlr