Since: v3.4
When a pre-processing request for an order has been updated by the POS.
EVENT order_preprocess
Parameters
Field | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
id | String |
Unique number identifying the preprocess request |
||||||
locationId | String |
Unique hashed id for this Location. See Hashed Location IDs |
||||||
status | String |
The current status of the request.
|
||||||
posAdjusted | Boolean |
A boolean that indicates whether or not the submitted order has been adjusted by the POS. If this property is false then the order that was originally submitted is correct as-is. Will only return if the status of the request is |
||||||
validUntil | Date |
A |
||||||
rejectionCode | String |
The code for a rejection. More information can be found by a GET on /rejection-codes/:rejectionCode. Will only return if set and the status of the request is |
||||||
rejectionReason | String |
The reason defined by the POS as why the order was rejected. Will only return if set and the status of the request is |
||||||
order | Object |
This is a complex object containing the full order payload that has been adjusted by the POS. It is possible that it may be identical to the original order submitted, so it is worth checking the |
Example
Event - rejected order
{
"event": "order_preprocess",
"data": {
"id": "f77011a6-f4f9-4fe7-ba75-5319c3e59916",
"status": "rejected",
"locationId": "2xYdsw233",
"rejectionCode": "O1",
"rejectionReason": "Unknown item"
}
}
Event - completed order
{
"event": "order_preprocess",
"data": {
"id": "f77011a6-f4f9-4fe7-ba75-5319c3e59916",
"status": "complete",
"locationId": "2xYdsw233",
"posAdjusted": true,
"validUntil": null,
"order": {
"type":"pickup",
"surcounts": [],
"items":[{
"name":"Toasted Sourdough Bread & Eggs",
"description":"Just ye old classic",
"unitPrice":"1100",
"totalBeforeSurcounts":"1100",
"totalAfterSurcounts":"1100",
"posId":"toasted_eggs",
"quantity":1,
"type": "single",
"surcounts": [],
"options": []
}]
}
}
}
Comments
0 comments
Please sign in to leave a comment.