post https://api.staging.deliverect.com/orderStatus/
Summary
This endpoint allows a POS to update the status of an order at each stage in its preparation. It also allows for the modification of the pickupTime
.
Required Statuses
Although it is not expected that every status listed via the link below will be supported, it is essential that all POS set statuses as follows.
Status | Meaning | Code |
---|---|---|
ACCEPTED | Each order which is being processed should reach a statusACCEPTED (20) or higher. This is required by many channels who need confirmation whether the order was successful or not | 20 |
PICKUP_READY | A status of PICKUP READY indicates that order preparation is completed. This ties into driver alerts for certain delivery platforms. Should only be an exception if this status is not known in the POS | 70 |
FINALIZED | A status FINALIZED confirms the POS workflow is fully completed. Should be applied by all POS. A status AUTO-FINALIZED (95) should only be used as alternative where no other status updates can be provided at all. | 90 |
CANCELED | This status should be applied to confirm receipt of channel cancellations and will signify that the cancellation has been processed (see guide here) It should also be used if the POS supports cancelling orders. | 110 |
FAILED | If for any reason it is not possible to process the order in the POS, it is essential to update order status to'FAILED' as this will be relayed to the ordering platform, who will in turn inform the end-consumer. | 120 |
Initial order response
Always acknowledge the initial order by responding 200 OK upon receipt of the Order Webhook URL before updating the order status accordingly.
Update pickup time
If the pickupTime
is specified, the pickupTime
and deliveryTime
are returned and will display the updated time, on two conditions:
- the updated
pickupTime
provided was valid (e.g., provided time is in the future) - the channel being updated supports updating preparation time
If no pickupTime
is passed to the endpoint, the original values for pickupTime
and deliveryTime
are returned in the response.
Cancellations
Parameters *required
Parameter | Meaning | Type |
---|---|---|
orderId * | The _id that was sent to the POS order webhook | str |
receiptId * | Internal ID assigned by the POS typically in a human readable format to display on printed receipts. This may be the same as the orderId if no corresponding attribute is set by the POS | str |
status * | Status to be updated | int |
pickupTime | Timestamp is in UTC yyyy-MM-ddTHH:mm:ssZ | str |
deliveryTime | Timestamp is in UTC yyyy-MM-ddTHH:mm:ssZ | str |
reason | It is an option to specify a reason for a status change e.g. if an order fails, a message 'ITEM OUT OF STOCK' | str |
timestamp | Providing the time when the status was updated | str |