Cancel order item(s) as long as the item(s) in the unapprovedItems list and the item status still in "pending" status (Not yet accepted/rejected by the POS).
DELETE ~/orders/:order-id/items
Parameters
Field | Type | Description |
---|---|---|
:order-id | String |
The ID of the order you'd like to delete items for |
version | String |
The order version hash. See Order Version Hash |
cancelledItemsoptional | String[] |
Array of item ids to cancel |
logoptional | Object |
An optional object containing additional log properties you might want to store on the order. |
employeeIdoptional | String |
A Doshii employeeId for the employee making the action |
employeeNameoptional | String |
The name of the employee making the action |
employeePosRefoptional | String |
A POS reference for the employee making the action |
deviceRefoptional | String |
An internal reference for the device at which the request was made |
deviceNameoptional | String |
A name for the device at which the request was made |
areaoptional | String |
The area at which the request was made |
Response
Field | Type | Description |
---|---|---|
version | String |
The order version hash. See Order Version Hash |
cancelledItemsoptional | String[] |
Array of item ids to cancel |
logoptional | Object |
An optional object containing additional log properties you might want to store on the order. |
employeeIdoptional | String |
A Doshii employeeId for the employee making the action |
employeeNameoptional | String |
The name of the employee making the action |
employeePosRefoptional | String |
A POS reference for the employee making the action |
deviceRefoptional | String |
An internal reference for the device at which the request was made |
deviceNameoptional | String |
A name for the device at which the request was made |
areaoptional | String |
The area at which the request was made |
Examples
Request: Cancel items
{
"version": "Do7jK3kKQyIy7Z1AprnlcBG9dQDBAQCQAnlny0dG",
"cancelledItems":["item_uuid_1", "item_uuid_2"],
"log": {
"employeeId": "1",
"employeeName": "Jimmy C",
"employeePosRef": "432324tgr",
"deviceRef": "213-iPad",
"deviceName": "Dining Room iPad 1",
"area": "Dining Room"
}
}
Response
{
"id": "1",
"status": "pending",
"type": "pickup",
"checkinId": "3",
"locationId": "Xuy8K3a0",
"requiredAt":null,
"availableEta":null,
"manuallyProcessed": false,
"surcounts": [],
"items": [
{
"uuid":"32f342f3-fqwefqwef23f2-f3432g23g32",
"name":"Toasted Sourdough Bread & Eggs",
"description":"Just ye old classic",
"unitPrice":"1100",
"posId":"lol12",
"quantity":1,
"type": "single",
"includedItems": [],
"surcounts": [],
"options": []
}
],
"unapprovedItems": [
{
"uuid":"32f342f3-f34f23f34f34-f3432g23g32",
"name":"Coke",
"status":"pending",
"description":"classic cola",
"unitPrice":"450",
"posId":"rwqed1",
"quantity":1,
"type": "single",
"includedItems": [],
"surcounts": [],
"options": []
}
],
"consumer":{
"name":"Tony T",
"phone":"01234567890"
},
"externalOrderRef": "ANQ1235",
"createdAt": "2016-04-12T20:54:25.289Z",
"updatedAt": "2016-04-12T20:54:25.289Z",
"transactions": [],
"version":"iwgjr2NJ014",
"uri": "https://sandbox.doshii.co/partner/v3/orders/1"
}
Comments
0 comments
Please sign in to leave a comment.