PurposeGetting a list of warehouses
Request typeAsynchronous
Supported agent version, shv1(sh4, sh5), v2(sh5)

In sh5, there are no warehouse groups. Instead of warehouses, departments are used. Therefore, a single static group called "Departments" is created. All departments available in sh5 are added to this group. In sh5, warehouse attributes are not returned.

Request format

{
  "taskType": "ShGetStores",
  "params": {
     "async": {
       "objectId": number,
       "timeout": number
     }
  }
}

Response format

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

Asynchronous response format

// Successful response
{
   "taskResponse":{
      "storeGroups":[
         {
            "stores":[
               {
                  "attributes":[
                     {
                        "name": "string",
                        "value":"string"
                     }
                  ],
                  "rid": number,
                  "name": "string"
               }
            ],
            "rid": number,
            "name": "string",
            "parent": "number"
         }
      ]
   },
   "responseCommon":{
      "taskGuid": "string",
      "taskType": "ShGetStores",
      "objectId": number
   }
}
   
// Response with error
{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "ShGetStores",
    "objectId": number
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": "string",
      "desc": "string"
    }
  }
}