Description

The GetMenuByParams request is responsible for obtaining the menu from the agent.

Purpose

Request to receive menu from agent

Request typeAsynchronous/synchronous
Supported agent versionv2
PluggetSystemTypeRKMid

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

{
  "taskType": "GetMenuByParams",
  "params": {
      "async": {
        "objectId": "number",
         "timeout": number
      },
      "sync": {
        "objectId": number,
        "timeout": number
      },
      "priceTypeId": number,
      "tradeGroupId": number,
      "filterByKassPresets": bool,
  
      "menuSelectorCode": number,
      "orderCategoryCode": number
  }
}

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.
timeoutintNoThe time to wait for a response from the agent in seconds, default is 120 seconds.
objectIdintYesRestaurant code in the licensing system.

priceTypeId

intNo

Price type identifier. If not specified, the one specified in the configuration is used.

tradeGroupId

intNoTrade group ID. If not specified, the one specified in the configuration is used.
filterByKassPresetsboolNo

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.

menuSelectorCodeintNo

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.

orderCategoryCodeintNoThe 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

{
 "taskType": "GetMenuByParams",
  "params": {
      "sync": {
        "objectId": 1
      },
      "priceTypeId": 1,
      "tradeGroupId": 1,
      "filterByKassPresets": false,
      "menuSelectorCode": 1
  }
}

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

{
  "taskType": "GetMenuByParams",
  "params": {
      "sync": {
        "objectId": 1
      },
      "orderCategoryCode": 1
  }
}

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

{
 "responseCommon": {
   "taskGuid": "string",
   "taskType": "GetMenuByParams",
   "objectId": 0
 },
 "taskResponse": {  // block content without parsing on the server
   "lastUpdatedAt": "2019-28-T15:00:00+03:00",
   "menu": {
    }
}

Parameter

Type

Description

taskTypestring enumTask type
taskGuidguidThe unique code of this task is used when receiving the task through the queue.
objectIdintRestaurant code in the licensing system.
menuobjectFor the contents of the menu block, see the article Menu
error
Error container.