PurposeGetting units of measurement
Request typeAsynchronous
Supported agent version, shv1(sh4, sh5), v2(sh5)

There is no barcode data in sh5 that is why it is not yet implemented in sh5.

Request format

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

Response format

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

Asynchronous response format

// Successful response
{
   "taskResponse":{
      "items":[
         {
            "mUnits":[
               {
                  "rid": number,
                  "name": "string",
                  "ratio": number
               }
            ],
            "rid": number,
            "name": "string"
         }
      ]
   },
   "responseCommon":{
      "taskGuid": "string",
      "taskType": "ShGetMUnits",
      "objectId": number
   }
}
   
// Response with error
{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "ShGetMUnits",
    "objectId": number
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": "string",
      "desc": "string"
    }
  }
}