Description
Purpose | Cancel an order that has already been created at the cash register. Can only cancel open orders. If the order has a guest bill or payment/prepayment, the setting "Allow deleting paid orders" is checked. If it is enabled, such an order can be deleted, otherwise — no. |
---|
Request type | Asynchronous |
---|
{
"taskType": "CancelOrder",
"params": {
"async": {
"objectId": "string"
},
"orderGuid": "string"
}
}
Parameter | Type | Mandatory | Description |
---|
taskType |
| + | Task type |
async |
|
| Asynchronous method |
timeout | int | - | Agent response timeout in seconds, default is 120 seconds |
orderGuid | guid | + | guid of the order whose status you want to get (either orderGuid or taskGuid) |
taskGuid | guid |
|
|
{
"responseCommon":{
"taskGuid":"guid",
"taskType":"CancelOrder",
"objectId":0
},
"error":{
"wsError":{
"code":"string",
"extCode":"string",
"desc":"string"
}
}
}
Parameter | Type | Description |
---|
taskGuid | guid | The unique code of this task is used when receiving the task through the queue. |
taskType | string enum | Task type |
objectId | int | Restaurant code in the licensing system |
error |
| Error container with detailed information on related systems inside. |
- wsError |
| Errors received from the WhiteServer service |
– code | string | Error code |
– extCode | string | Extended error code |
– desc | string | Error description |
Successful response
{
"taskResponse": {
"status": "string"
},
"responseCommon": {
"taskGuid": "string",
"taskType": "CancelOrder",
"objectId": 0
}
}
Answer with error
{
"responseCommon": {
"taskGuid": "string",
"taskType": "CancelOrder",
"objectId": 0
},
"error": {
"wsError": {
"code": "string",
"extCode": "string",
"desc": "string"
},
"agentError": {
"code": 0,
"desc": "string"
}
}
}
Description of parameters
Parameter | Parameter type | Mandatory | Description |
---|
status | string |
| Ok — the order was successfully cancelled |
error | string enum |
| Error container with detailed information on related systems inside. |
- wsError | string enum |
| Whiteserver Error |
– code | int |
| Error code |
– extCode | string |
| Extended error code |
– desc | string |
| Error description |
- agentError | string enum |
| Agent Error |
– code | int |
| Error code |
– desc | string |
| Error description |