Description

PurposeCancel 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 typeAsynchronous

Request format

{
  "taskType": "CancelOrder",
  "params": {
    "async": {
      "objectId": "string"
    },
    "orderGuid": "string"
 }
}


Parameter

Type

Mandatory

Description

taskType
+Task type
async

Asynchronous method
timeoutint-Agent response timeout in seconds, default is 120 seconds
orderGuidguid+guid of the order whose status you want to get (either orderGuid or taskGuid)
taskGuidguid

Response format

{  
   "responseCommon":{  
      "taskGuid":"guid",
      "taskType":"CancelOrder",
      "objectId":0
   },
   "error":{  
      "wsError":{  
         "code":"string",
         "extCode":"string",
         "desc":"string"
      }
   }
}


Parameter

Type

Description

taskGuidguidThe unique code of this task is used when receiving the task through the queue.
taskTypestring enumTask type
objectIdintRestaurant code in the licensing system
error
Error container with detailed information on related systems inside.
- wsError
Errors received from the WhiteServer service
– codestringError code
– extCodestringExtended error code
– descstringError description

Asynchronous response format

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

statusstring
Ok — the order was successfully cancelled
errorstring enum
Error container with detailed information on related systems inside.
- wsErrorstring enum
Whiteserver Error
– codeint
Error code
– extCodestring
Extended error code
– descstring
Error description
- agentErrorstring enum
Agent Error
– codeint
Error code
– descstring
Error description