Purpose

Getting a list of items

Request typeAsynchronous/synchronous
Supported agent version, shv1 для Store House 4 b  Store House 5, v2 для Store House 5
PluggetSystemTypeStoreHouse

Request format


JSON

{
  "taskType": "ShGetGoods",
  "params": {
    "async": {
      "objectId": number,
       "timeout": number
    },
    "sync": {
      "objectId": number,
       "timeout": number
    },
     "goodGroupRid": number
  }
}

Parameter

Type

Mandatory

Description

taskTypestringyesTask type
-async

Asynchronous method call: either synchronous or asynchronous
-sync

Synchronous method call: either synchronous or asynchronous
--timeoutintnoAgent response time in seconds. Default is 120 seconds
--objectIdintyesRestaurant code in the licensing system
-goodGroupRid

rid of the items group from which the items need to be removed

Response format


JSON

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

Parameter

Type

Description

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

Asynchronous response format

Successful response


JSON

{
   "taskResponse":{
      "items":[
         {
            "mUnits":[
               {
                  "rid":"number",
                  "name":"string",
                  "isBase":"number",
                  "barCodes":[
                     {
                        "val":"string"
                     }
                  ]
               }
            ],
            "rid":"number",
            "name":"string"
         }
      ]
   },
   "responseCommon":{
      "taskGuid":"string",
      "taskType":"ShGetGoods",
      "objectId":"number"
   }
}

Parameter

Parameter type

Description

Parameter

Parameter type

Description

-itemsarray
--ridintrid of the item
--namestringName of the item
--mUnitsarray
---ridintrid of the unit
---namestringName of the unit
---isBaseintIf the unit of measurement is the base unit for the item (if 1, then yes)
---barCodesarrayIn StoreHouse 5 it is not returned
  ----valstringBarcode for the item in this unit of measurement
errorstring enumError container, for more details see the article Error Description

Response with error


JSON

{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "ShGetGoods",
    "objectId": number
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": "string",
      "desc": "string"
    }
  }
}

Parameter

Type

Description

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