Cancelling a Remote Order
Cancellation is the process by which the provider indicates to a POS that a previously sent order should no longer be prepared. This is intended to be used in exceptional circumstances as an already confirmed order may have been partway through preparation at the outlet.
A provider cancelling an order is expected to notify the outlet of the reasoning behind the cancellation and what reimbursement (if any) the outlet is entitled to.
Cancel Endpoint
POST /remoteorders/cancel
Required Headers
Authorization: Bearer <token>
Body
Submit a single JSON encoded Remote Order Cancellation as the POST body.
Set the RemoteOrderID to the ID returned from the earlier POS /remoteorders/cancel
Returns
HTTP 200on successHTTP 400on malformed RemoteOrderCancellation (do not resubmit without fixes)HTTP 401on invalid/missing Authorization token (do not resubmit without updating Authorization)HTTP 403on a correct authorization token but for the wrong outlet (or the outlet has disabled the integration). Do not resubmit.HTTP 503on service is starting up or is not yet ready to process your request, please wait 30 seconds and retry.HTTP 5XXon an error internal to ROS. This would typically only occur due to an internal transient connection issue, please retry for a limited number of attempts after a short delay.
On success the response body will contain a single JSON encoded CancelResponse containing the RemoteOrderCancellationID assigned to this cancellation by ROS.
Remarks
A response of 200 will indicate that ROS has validated the cancellation and has successfully sent it to the appropriate POSCore (i.e. the cancellation has been persisted). In normal circumstances the Outlet POS will be notified within moments of the request completing.
Authorization is done using your organisation scoped bearer token (see AccessToken for details).
Some considerations for the Remote Order model:
- The vast majority of properties are optional (and many only apply to certain flows)
OutletIDwill need to be retrieved in advance from the outlet (during PSM configuration).ProviderIDmust be set to match your provider ID. Setting this incorrectly will result in ROS rejecting the orderRemoteOrderIDwill need to be set to the order ID returned from thePOST /remoteorders/addthat originally added this order