Purpose

Cancellation of a guest bill

Request typeAsynchronous/synchronous
Supported agent version v2
PluggetSystemTypeRKMid

Request format


JSON

{
  "taskType": "UndoBill",
  "params": {
    "async": {
      "objectId": number,
       "timeout": number
    },
    "sync": {
      "objectId": number,
       "timeout": number
    },
    "orderGuid": "string",
    "seat": number,
    "stationCode": number,
    "cashierCode": number
 }
}

Parameter

Type

Mandatory

Description

taskTypestringyesTask type
-async

Asynchronous method call: either synchronous or asynchronous
-sync

Synchronous method call: either synchronous or asynchronous
--timeoutintnoSynchronous method call: either synchronous or asynchronous
--objectIdintyesRestaurant code in the licensing system
-seatintnoThe seat number for which the guest bill will be cancelled. The bill can be divided by the number of guests.
The default value is 0. If 0, all guest bills will be cancelled.
-stationCodeintnoThe code of the cash register where the guest bill will be cancelled. If not specified, the guest bill will be cancelled at the cash register specified in the Agent configuration
-cashierCodeintno

Cashier code on whose behalf the guest bill will be cancelled. If not specified, the guest bill will be cancelled on behalf of the cashier specified in the Agent configuration

Response format

Successful response


JSON

{
   "responseCommon":{
      "taskGuid": "string",
      "taskType": "UndoBill",
      "objectId": number
   }
}



Response with error


JSON

{
   "responseCommon":{
      "taskGuid": "string",
      "taskType": "UndoBill",
      "objectId": number
   },
   "error":{
      "wsError":{
         "code":"string",
         "desc":"string"
      }
   }
}

Parameter

Type

Description

-taskGuidguidUnique code for this task. Used when receiving a task via the queue
-taskTypestring enumTask type
-objectIdintRestaurant code in the licensing system
error
Error container, for more details see the article Error Description

Asynchronous response format

Successful response


JSON

{
  "taskResponse": {
  },
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "UndoBill",
    "objectId": 0
  }
}


Response with error


JSON

{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "UndoBill",
    "objectId": 0
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": "string",
      "desc": "string"
    }
  }
}

Parameter

Parameter type

Mandatory

Description

statusstring
Order status: Ok — the order has been successfully cancelled
errorstring enum
Error container, for more details see the article Error Description