Description

PurposeRequest to get menu from server cache
Request typeSynchronous

To optimize response time, pass gzip in the header

The menu is updated automatically every morning at 8:00 and in the evening at 23:30. You can update the menu outside of the schedule using the UpdateMenu method

Request format

{
  "taskType": "GetMenu",
  "params": {
    "sync": {
      "objectId": 0,
      "timeout": 0
    }
  }
}

Description of parameters

Parameter

Type

Mandatory

Description

taskType

Task type
sync

Synchronous method
timeoutint-Agent response timeout in seconds, default is 120 seconds
objectIdint+Restaurant code in the licensing system


Response format


1All values ​​are strings: ID, name, price. Everywhere
2A product can only have 1 scheme.
3About min\max-count: if both values ​​are not specified, then this is a group of checkboxes (our current Additional Ingredients), i.e. you choose how much you want
4About min\max-count: if both values ​​are specified, then these are groups of cloned radio buttons (the names of the groups will be automatically numbered, for example, Sauce 1, Sauce 2), and if min != max, then the option “Not selected” will be added to N=max-min groups

 

{
   "type": "string",
   "categories":[
      {
         "id":"string",
         "name":"string",
         "parentId": "string"
      }
   ],
   "classifications": [
       {
          "id": "string",
          "code": "string",
          "name": "string",
          "parentId": "string"
       }
   ],
   "products":[
      {
         "id":"string",
         "categoryId":"string",
         "name":"string",
         "code":"string",
         "price":"string",
         "originalPrice: number,
         "schemeId":"string",
         "description":"string",
         "excise":"string",
         "exciseCode":"string",
         "imageUrls":[
            "string1",
            "string2"
         ],
         "measure":{
            "value":"string",
            "unit":"string",
            "priceMode": "string",
            "qntDecDigits": "string",
            "changeQntOnce": "true/false",
            "joinMode": "string"
         },
         "classificationIds": [
            "string1",
            "string2"
         ],
         "protein": "string",
         "fat": "string",
         "carbohydrates": "string",
         "kcal": "string",
         "globalTradeItemNumbers": "string",
         "alcoholCodes": "string",
         "openPrice": boolean
         "dishTaxes": {
           "groupName": "10% VAT",
           "taxes": [
             {
                "taxName": "VAT",
                "rateName": "10,00 %",
                "rate": 10
             }
           ]
         }       
       }
   ],
   "ingredientsSchemes":[
      {
         "id":"string",
         "ingredientsGroups":[
            {
               "id":"string",
               "minCount":number,
               "maxCount":number,
               "changesPrice":true/false
            }
         ]
      }
   ],
   "ingredientsGroups":[
      {
         "id":"string",
         "name":"string",
         "ingredients":[
            "string"
         ]
      }
   ],
   "ingredients":[
      {
         "id":"string",
         "name":"string",
         "code":"string",
         "price":"string",
         "originalPrice: number,
         "schemeId":"string",
         "description":"string",
         "excise":string,
         "exciseCode":string,
         "dishId":number,
         "imageUrls":[
            "string1",
            "string2"
         ],
         "measure":{
            "value":"string",
            "unit":"string"
         }
      }
   ]
}



Descriptions of the fields can be found in the knowledge base.

Parameter

Type

Description

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 White Server service
– codeintError code
– extCodestringExtended error code
– descstringError description

Request

{
  "taskType": "GetMenu",
  "params": {
    "sync": {
      "objectId": 199990106,
      "timeout": 60
    }
  }
}

Successful response

json menu example

Answer with error

{
  "responseCommon": {
    "taskGuid": "fa1bdcbf-1e96-425c-9159-eb57d4accb6f",
    "taskType": "UpdateMenu",
    "objectId": 199990106,
 
  },
  "error": {
    "wsError": {
      "code": 82,
      "desc": "The object menu not found"
    }
  }
}