Purpose

Returns a list of available order cancellation reasons.

Supported agent version

v2 from version 2.8.2.2 onwards

PluggetSystemTypeRKRef

Request format

{
  "taskType": "GetVoidReasons",
  "params": {
    "async": {
      "objectId": number,
       "timeout": number
    },
    "sync": {
      "objectId": number,
       "timeout": number
    }
  }
}

Parameter

Type

Mandatory

Description

taskTypestring+Task type, for this method the value is "GetVoidReasons"
async

Asynchronous method call (either synchronous or asynchronous)
sync

Synchronous method call (either synchronous or asynchronous)
timeoutint-Agent response timeout in seconds, default is 120 seconds
objectIdint+Restaurant code in the Licensing System

Example request

{
  "taskType": "GetVoidReasons",
  "params": {
    "sync": {
      "objectId": 199990001
    }
  }
}


Response format

Successful response

{
    "taskResponse": {
        "voidReasons": [
            {
                "name": string,
                "code": number
            }
        ]
    },
    "responseCommon": {
        "taskGuid": string,
        "taskType": "GetVoidReasons",
        "objectId": int
    }
}


Response with error

{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "GetVoidReasons"
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    }
  }
}


Example answer

{
    "taskResponse": {
        "voidReasons": [
            {
                "name": "Waiter error w/o processing",
                "code": 1
            },
            {
                "name": "Refusal w/o processing",
                "code": 2
            },
            {
                "name": "Waiter error with processing",
                "code": 3
            },
            {
                "name": "Refusal with processing",
                "code": 4
            },
            {
                "name": "Undo Receipt",
                "code": 5
            },
            {
                "name": "Removing prepayment",
                "code": 6
            },
            {
                "name": "To void an unprinted dish",
                "code": 100007
            },
            {
                "name": "To return a dish",
                "code": 8
            },
            {
                "name": "Cancel via WS",
                "code": 7
            },
            {
                "name": "Error creating order via WSA",
                "code": 10
            },
            {
                "name": "Updating an order via WS",
                "code": 11
            }
        ]
    },
    "responseCommon": {
        "taskGuid": "201db53b-70cb-45e1-8584-87898aeb261d",
        "taskType": "GetVoidReasons",
        "objectId": 199990246,
        "agentGuid": "d564619a-50c3-3d87-0816-de67ed9c8e18"
    }
}