Receive an order via the API

Receive incoming orders via webhooks, download via the SalesOrder API and process them.

When a customer sends a purchase order to your organisation via Peppol, you receive it as a sales order in the PSB. A webhook notifies you immediately, after which you can download and process the order.

Step 1: Set up a webhook

Register a webhook for the OrderReceived topic so the PSB notifies you as soon as an order arrives:

{
  "action": "https://jouw-endpoint.nl/orders",
  "topics": ["OrderReceived"],
  "secret": "jouw-geheime-sleutel"
}

The webhook payload includes the documentId and the senderPartyId, so you know which order arrived from which sender.

Step 2: Download the order

Use the documentId from the webhook payload to retrieve the order:

GET /api/v1/{partyId}/salesOrder/{documentId}/download

The response contains the UBL Order XML document. By default, you receive the document in the format it was sent in. Want it in a different format? Use the targetDocumentTypeId query parameter to have the document automatically transformed to the desired format.

Note: Received documents are stored in the PSB for 90 days. After you download the document, it remains available for 7 more days. Download orders promptly and store them in your own system.

Step 3: Process the order

After downloading, process the order in your own system. With the Advanced Ordering profile, you are expected to send an Order Response back to the buyer. The possible statuses are:

CodeMeaningABAcknowledged, order has been received and is readableAPAccepted, order has been acceptedCAConditionally Accepted, order has been accepted with modificationsRERejected, order has been rejected

Send the response via the Order Response endpoint.

Webhook topics

In addition to OrderReceived, there are more topics relevant when receiving orders:

TopicWhenOrderReceivedNew order receivedOrderChangeReceivedThe buyer has sent a modification to the orderOrderCancellationReceivedThe buyer wants to cancel the order
Delete a document

Want to manually delete a received order from the PSB? You can do so via:

DELETE /api/v1/{partyId}/salesOrder/{documentId}
Frequently asked questions
How do I link a webhook to retrieving an incoming order?

Register a webhook on the OrderReceived topic. The payload contains, among other things, documentId and senderPartyId. Use that documentId to call GET /api/v1/{partyId}/salesOrder/{documentId}/download to retrieve the UBL Order XML and process it in your own system.

Why do I need to send an Order Response with Advanced Ordering?

With the Advanced Ordering profile, the buyer expects you as a supplier to respond with an Order Response. You use the codes AB (received and readable), AP (accepted), CA (conditionally accepted) or RE (rejected). Without that response, the process is not completed according to the profile.

How long do received orders remain available in the PSB?

Received documents are retained in the PSB for 90 days. After download, the document remains available for 7 more days. Therefore, store orders in your own environment promptly and plan your integration accordingly.


View the full API specification at psb.econnect.eu for all parameters and response structures.

Open the API reference