GET requests for transactions data, as well as trigger the error management process in case you mark any documents as errors.
PHP examples are included but you will likely also want to look at the relevant API calls in the API reference.
Order Response Types
Order Responses can have one of three types:- ACCEPT: The order was accepted exactly as ordered
- REJECT: The order was fully rejected
- CHANGE: Part of the order was accepted but either line item quantities or delivery date are changed
Trade partners may send updated versions of a document. Always check the
isLatestVersion field before importing — if it is false, a newer version exists and this one should be skipped. See Document Versioning for full details.Authentication
You will need an API token to authenticate. We use a bearer token which has to be included in each request you send to the API. Please read the Authentication section of our API reference for a detailed description.Error Handling
The API will return a2xx status code for successful requests. Anything else indicates an error.
Please read the Errors section of our API reference for a detailed description plus examples of how to handle them.
Pull New Order Responses
The API call List incoming Transactions is used to fetch all incoming transactions.Loading Different Document Types
Scenario 1: You only want to load a specific document type, e.g.ORDER_RESPONSE.
In this case, the easiest way to achieve the filtering is to add the filter parameter to the request.
ORDER_RESPONSE and SHIPPING_NOTICE.
In this case, you may want to load all document types and then filter them in your code, preventing multiple round-trip requests the API. You can filter the results by type of each returned item to get the documents you need.
Pagination
The response body has ahasMore flag. If it’s true not all items are in the response.
You will then want to fetch the other items as well. Therefore, you can use the nextPageUrl flag from the response body and perform the same request with the new URL again.
If you are running your code only once a day or so, we recommend to perform the request with the new URL until
hasMore is false. When doing so you can be sure to fetch all currently available items.Mark an Order Response as Processed
To mark an Order Response as processed, use the API call Mark transaction processed. On the happy path of a transaction being processed successfully, you can make an API call such as:Mark Multiple Order Responses as Processed
In addition to the above, you can specify a list of items that should be marked as processed in a single API call, via the Bulk mark transactions processed endpoint.Report an Error Processing an Order Response
In the event an Order Response was not able to be processed, you can use the same 2 API calls listed above (Mark transaction processed and Bulk mark transactions processed) to mark these Order Responses as “failed to process”. In this case you must set thesuccess flag to false. Additionally you should (but are not required to) add a reason for the Order Response not being processed, which will be used for solving the issue.