Purpose

Setting AlcoholCodes for Dishes

Request typeasynchronous/synchronous
Supported agent version

V2.8.1.10

PluggetSystemTypeRKRef

Request format

{
  "taskType": "SetAlcoholCodes",
  "params": {
    "async": {
      "objectId": number,
       "timeout": number
    },
    "sync": {
      "objectId": number,
       "timeout": number
    },
    "items": [
        {
            "id": "string",
            "code": "string"
        }
      ]
    }
}

Parameter

Type

Mandatory

Description

Default value

taskTypestringyesTask type
async

Asynchronous method call (either synchronous or asynchronous)
sync

Synchronous method call (either synchronous or asynchronous)
  • objectId
intyesRestaurant code in the licensing system
  • timeout
int – Response timeout in seconds120 sec.
ItemsarrayyesAn array of dishes for which the code is set
  • id
stringyesDish ID
  • code
stringyesNew code (codes with separator `;`)

Response format


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

Parameter

Type

Description

taskGuidguidThe unique code of this task is used when receiving the task through the queue.
taskTypestringTask type
objectIdintRestaurant code in the licensing system
error
Error container, see Error Description

Asynchronous response format

// Successful response
{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "SetAlcoholCodes",
    "objectId": 0
  }
}
 
 
// Response with error
{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "SetAlcoholCodes",
    "objectId": 0
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": "string",
      "desc": "string"
    }
  }
}

Parameter

Parameter type

Mandatory

Description

taskGuidguid+Request ID
error

Error container, see Error Description

Example request

{
  "taskType": "SetAlcoholCodes",
  "params": {
      "sync": {
        "objectId": 199990246,
         "timeout": 120
      },
      "items": [
        {
            "id": "1000016",
            "code": "99999901;7878787"
        }
      ]
  }
}