# Order Status v2.0Beta
The Order Status endpoint retrieves the status of the order. An order status record will be returned that provides the current status of the order.
This endpoint can be polled periodically to fetch the current status. Once an order is submitted, we can expect to receive multiple status updates for the payment and order. As the order is processed through various third party downstream systems and eventually into the POS in the restaurant, the status of the order is updated. These updates update the order data in our systems and are made available to you via this endpoint.
Depending on the order scenario and may other factors, the order flow will vary from order to order. For this reason, do not build logic that expects the status of an order to always follow a specific order. Furthermore, a status may appear more than once - usually as a result of retry logic being invoked as a result of an unexpected error.
You can expect one of the following status values in the status
property of the response:
- Pending
- Verifying
- Processing
- Sent
- Received
- Accepted
- Rejected
- Ready
- Collected
- Delivered
- Cancelled
- Completed
- TimedOut
- Failed
As you can see from the sample below, this order was processed and sent to the restaurant.
Usually we receive status updates from the restaurant POS within 30 seconds but in this case we did not so our timeout check then set the status to TimedOut
. Then a few seconds later we began receiving status updates for the order and the history reflects that.
In some cases we may not receive further updates the the order will be stuck on the last status received.
It is also worth mentioning that restaurants can skip the Ready
status. POS allows the order to be marked as Collected
directly from the Accepted
status. Whilst this behavior is discouraged, it might happen.
# Request
# Path Parameters
A list of the supported path parameters is described below.
Name | Required | Type | Description |
---|---|---|---|
orderId | true | string | The order identifier for the order to fetch the status for. This value is returned when an order is created. |
# Response
# Response Body
The endpoint returns our ApiResponse envelope. The data
property of the response will contain a single OrderStatus resource.
# Sample
{
"message": "The operation succeeded!",
"notifications": [],
"data": {
"orderId": "2c5b9188-7d59-4c51-a486-24202821bfbc",
"orderCode": "1BFBC",
"transactionId": "20220211-0013-0000-0388",
"brandKey": "ROCO",
"restaurantKey": 1352,
"restaurantName": "Test RocoMamas",
"orderingChannel": "Call and Order",
"fulfilmentChannel": "Takeaway",
"currency": "ZAR",
"total": 8800,
"status": "Completed",
"statusReason": "Order was collected by the customer.",
"createdOn": "2022-02-11T14:55:01.5883268+00:00",
"processedOn": "2022-02-11T15:34:14.7469416+00:00",
"history": [
{
"status": "Pending",
"statusReason": "Order created.",
"processedOn": "2022-02-11T14:55:01.5437784+00:00"
},
{
"status": "Processing",
"statusReason": "Started processing order.",
"processedOn": "2022-02-11T14:55:02.0519744+00:00"
},
{
"status": "Sent",
"statusReason": "The order was sent to the restaurant.",
"processedOn": "2022-02-11T14:55:06.8182458+00:00"
},
{
"status": "TimedOut",
"statusReason": "The order was successfully sent to the restaurant but has not received any further status updates for 1 minute.",
"processedOn": "2022-02-11T14:56:06.8918468+00:00"
},
{
"status": "Received",
"statusReason": "Restaurant received the order.",
"processedOn": "2022-02-11T14:56:35.4823083+00:00"
},
{
"status": "Accepted",
"statusReason": "Restaurant accepted the order.",
"processedOn": "2022-02-11T14:56:44.0266691+00:00"
},
{
"status": "Ready",
"statusReason": "Restaurant has indicated that the order is ready for collection.",
"processedOn": "2022-02-11T15:21:59.6601001+00:00"
},
{
"status": "Collected",
"statusReason": "Restaurant has indicated that the order has been collected.",
"processedOn": "2022-02-11T15:34:13.3483174+00:00"
},
{
"status": "Completed",
"statusReason": "Order was collected by the customer.",
"processedOn": "2022-02-11T15:34:14.7469416+00:00"
}
]
}
}
# Errors
The standard error responses apply.