GetMenu
Description
| Purpose | Request to get menu from server cache |
| Request type | Synchronous |
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 | ||
| timeout | int | - | Agent response timeout in seconds, default is 120 seconds |
| objectId | int | + | Restaurant code in the licensing system |
Response format
| 1 | All values are strings: ID, name, price. Everywhere |
| 2 | A product can only have 1 scheme. |
| 3 | About 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 |
| 4 | About 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 |
|
Descriptions of the fields can be found in the knowledge base.
Parameter | Type | Description |
|---|---|---|
Parameter | Type | Description |
| taskGuid | guid | The unique code of this task is used when receiving the task through the queue. |
| taskType | string enum | Task type |
| objectId | int | Restaurant code in the licensing system |
| error | Error container with detailed information on related systems inside. | |
| - wsError | Errors received from the White Server service | |
| – code | int | Error code |
| – extCode | string | Extended error code |
| – desc | string | Error description |
Examples
Request
{
"taskType": "GetMenu",
"params": {
"sync": {
"objectId": 199990106,
"timeout": 60
}
}
}Successful response
Answer with error
{
"responseCommon": {
"taskGuid": "fa1bdcbf-1e96-425c-9159-eb57d4accb6f",
"taskType": "UpdateMenu",
"objectId": 199990106,
},
"error": {
"wsError": {
"code": 82,
"desc": "The object menu not found"
}
}
}