# Sales Order v1
The /salesOrder
endpoints are used to receive sales orders. A full tutorial on how to receive sales orders can be found here.
# Status
When a document is received, a hook is send to the receiver. This hook contains the documentId used to identify the received document. GET /api/v1/{partyId}/salesOrder/{documentId}/status
can be used to check the status of the received document. {partyId} should be the receiver's partyId and {documentId} the documentId found in the hook.
# Download
To download the received document, call GET /api/v1/{partyId}/salesOrder/{documentId}/download
. {partyId} should be the receiver's partyId and {documentId} the documentId found in the hook. The response body will contain the received document.
# Query recipient party
The POST /api/v1/{partyId}/salesOrder/queryRecipientParty
endpoint can be used to confirm if the buyer supports order response. The {partyId}
specified in the route should be the sender's partyId. The request body accepts an array of partyIds, in JSON. The response will contain the recipient party that should be used as endpointId in the order response, as well as the delivery channel.
The query parameter ?preferredDocumentTypeId
can be used if a specific documentTypeId is preferred. Specifying a preferred documentTypeId will make sure the documentTypeId is prioritized in the lookup.
# Response
The POST /api/v1/{partyId}/salesOrder/{documentId}/response
endpoint can be used to send an Order Response to the buyer. Follow the Tutorial: Responding to the buyer via "Order Response" for more information.
The {partyId}
should be the seller's partyId and {documentId}
the documentId found in the hook. The response body is a JSON payload based on these fields:
Field | Usage |
---|---|
status* | Status codes used as Order Response Codes (AB, AP, CA, RE) |
note | You may give comments or instructions that apply to the whole response. |
*
Status code is required.
If you want to send a Conditionally Accepted
response, or customize other fields in the Order Response, you need to provide the Order Response XML yourself. The PUT /api/v1-beta/{partyId}/generic/send
endpoint can then be used with the topic SendOrderResponse
to send your file.
# Delete
By default, received documents are kept for 90 days. After the document has been downloaded by the receiver, it's retained for 7 more days. If you want to delete the document sooner, call DELETE /api/v1/{partyId}/salesOrder/{documentId}
.