Order Response Types
Order Responses can have one of three types:- ACCEPT: Use when the order is accepted exactly as ordered. No items array is required.
- REJECT: Use when the order is fully rejected. No items array is required.
- CHANGE: Use when part of the order is accepted but either line item quantities or delivery date are changed. The items array is required and must contain ALL order line items.
Process
These are usually the steps taken when sending an Order Response to Procuros:- Check, if this document should be sent via Procuros (see: Enabled Trade Partners)
- Verify this document has not already been sent (see: Tracking Document Status)
- Build the transaction payload to be sent via Procuros
- Send the transaction payload via the Procuros API
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.
Send Order Responses
The API call Send transaction is used to create transactions, including Order Responses. The following fields are required:type(Transaction type. In this caseORDER_RESPONSE)content(The details of the Order Response)
content you will need to build the Order Response header and optionally items. All details can be found in the ORDER_RESPONSE schema as described in the API reference.
Example: ACCEPT Response
Use this when accepting an order exactly as ordered:Example: REJECT Response
Use this when fully rejecting an order:Example: CHANGE Response
Use this when partially accepting an order with quantity or delivery date changes. The items array must contain ALL order line items, showing both ordered and confirmed quantities:When using the
CHANGE type, the items array must contain ALL order line items, regardless of whether orderedQuantity and confirmedQuantity are equal. This allows the buyer to see the complete picture of what will be delivered.Mark Document Status
Finally, as per the instructions mentioned under Tracking Document Status you must now track the status of the document locally, based on the returned HTTP response. The document should be marked with either statusTRANSMITTED or NO_ACTION. If there is an error with the document and it is not accepted, do not mark it with a status so it may be retried. For more information on retrying failed documents, please see: Retrying Documents.
For example: