Purpose

Request to save menu selectors: new categories and dishes distributed among them

Request typeAsynchronous/synchronous
Supported agent versionv1, v2
PluggetSystemTypeRKRef

Request format


JSON

{
   "taskType":"PushMenuSelectors",
   "params":{
      "async":{
         "objectId":"number",
         "timeout":"number"
      },
      "sync":{
         "objectId":"number",
         "timeout":"number"
      },
      "menuSelectorCode":"number",
      "menuSelectorName":"string",
      "categories":[
         {
            "id":"string",
            "name":"string",
            "parentId":"string"
         }
      ],
      "products":[
         {
            "id":"string",
            "categoryId":"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
--objectIdintyesRestaurant code in the licensing system
--timeoutintnoAgent response time in seconds120 sec
-menuSelectorCodeint

mandatory in WSA2

not used in WSA1

Root selector code
-menuSelectorNamestring

mandatory in WSA2

not used in WSA1

The name of the root selector that will be created if a selector with that code does not already exist in r_keeper
-categoriesarray
Array of dish categories
--idstring
Category ID
--namestring
Category name
--parentIdstring
Subcategory
-productsarray
Array of dishes from the menu
--idstring
Dish ID
--categoryIdstring
Категория блюда

Synchronous Response Format


JSON

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

Parameter

Type

Description

-taskGuidguidUnique code for this task. Used when receiving a task via the queue
-taskTypestringTask type
-objectIdintRestaurant code in the licensing system
error
Error container, for more details see the article Error Description

Asynchronous response format

Successful response


JSON

{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "PushMenuSelectors",
    "objectId": 0
  }
}

Response with error


JSON

{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "PushMenuSelectors",
    "objectId": 0
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": string,
      "desc": "string"
    }
  }
}

Parameter

Parameter type

Mandatory

Description

taskGuidguidyesRequest ID
-taskTypestring
Task type
-objectIdint
Restaurant code in the licensing system
error

Error container, for more details see the article Error Description