Receive Message
Goal
Use this API to receive messages from Expert when using the pull-model to
receive data.
When using the pull-model it is your responsibility to check at regular intervals (e.g. every few minutes) whether there are new messages for you by sending a POST request to:
https://api.expert.nl/api/receive
If you receive an HTTP 204 (No content) status code there are no messages for you. If there is a message an HTTP 200 (OK) status code is returned and the message content will be in the response body.
Keep calling /api/receive until you receive an HTTP 204 status code again to receive all messages.
The message type is returned in an HTTP header named "Message-Type". We strongly advise you to check the message type in your processing logic to prevent it from breaking should other message types be sent to you in the future. Also note that new elements and attributes may be added to existing messages at any time without warning. Your processing logic should be able to handle this without failing.
The message format can be either XML or JSON, the default is XML. If you want to receive JSON contact us and we will configure this for you.
For development purposes you can also use the
Peek Message API which is similar to this API but does not remove the message from our queue so you can keep calling it until your processing logic is correct.