GetMenuByParams
Description
The GetMenuByParams request is responsible for obtaining the menu from the agent.
Purpose | Request to receive menu from agent |
---|---|
Request type | Asynchronous/synchronous |
Supported agent version | v2 |
PluggetSystemType | RKMid |
When executing the GetMenuByParams request, the presence of the dish in the out-of-stock list is taken into account:
- If a dish is included in the out-of-stock list, it will not be displayed in the "products": [] field when executing a request
- If a dish is not in the out-of-stock list, it will be displayed in the "products": [] field when executing a request
There is no need to update stop lists.
Request format
JSON
|
Parameter | Type | Mandatory | Description |
---|---|---|---|
taskType | Task type. | ||
async | Asynchronous method call. Can be either synchronous or asynchronous. | ||
sync | Synchronous method call. Can be either synchronous or asynchronous. | ||
timeout | int | No | The time to wait for a response from the agent in seconds, default is 120 seconds. |
objectId | int | Yes | Restaurant code in the licensing system. |
priceTypeId | int | No | Price type identifier. If not specified, the one specified in the configuration is used. |
tradeGroupId | int | No | Trade group ID. If not specified, the one specified in the configuration is used. |
filterByKassPresets | bool | No | Default value is true. If false, the full menu will be transferred, without filtering, using the RKeeper GetOrderMenu command. This command's filtering takes into account the settings of the cash register, cashier, etc. |
menuSelectorCode | int | No | Menu selector code for building a tree of dish categories and their additional filtering. If not specified, the DefaultMenuSelectorCode parameter from the RKeeper:OrderCreationPreferences section of the Agent configuration is used. If the selector code is not specified in the configuration, the menu is returned without taking into account the selectors. |
orderCategoryCode | int | No | The category code for orders that can be made from the requested menu. |
Example of a request for a trade group
To query for a trade group, please check first:
- Agent configuration parameter RKeeper:OrderCreationPreferences:UseGetOrderMenuOnly was false or missing
- The filterByKassPresets query parameter was false
- One of the parameters is specified:
- Trading group in r_keeper
- Request parameter tradeGroupId
- Configuration parameter RKeeper:OrderCreationPreferences:TradeGroupId
- One of the parameters is specified:
- Price type in r_keeper
- Request parameter priceTypeId
- Configuration parameter RKeeper:OrderCreationPreferences:PriceTypeId.
Example request
JSON
|
Example of a request by order category
To request an order category, first check that one of the parameters is specified:
- Agent configuration parameter RKeeper:OrderCreationPreferences:UseGetOrderMenuOnly was set to true
- The filterByKassPresets request parameter was set to true
- The filterByKassPresets parameter was not included in the request
- The orderCategoryCode request parameter specified the code of an existing order category.
Example request
JSON
|
Request without filtering by selectors
To retrieve dishes without taking into account r_keeper selectors, first check that:
- The request was missing the menuSelectorCode parameter
- The RKeeper:OrderCreationPreferences:DefaultMenuSelectorCode parameter was missing from the configuration.
Response format
JSON
|
Parameter | Type | Description |
---|---|---|
taskType | string enum | Task type |
taskGuid | guid | The unique code of this task is used when receiving the task through the queue. |
objectId | int | Restaurant code in the licensing system. |
menu | object | For the contents of the menu block, see the article Menu |
error | Error container. |