Get units of measurement

This endpoint is deprecated.
POST/api/RPC.common.Api.Measures.get?token=<TOKEN>

Key Measures.get · API version 2.0.0

Parameters

6 body parameters inside data[]
FieldTypeDescription
idIntegerUnit of measurement ID
coderequiredStringUnit of measurement ID
namerequiredStringUnit of measurement name
get_allBooleanGet all
offsetNumberOffset
limitNumberLimit

Request example

Search By Id:
{
   "data" : [
      {
         "id" : 21765
      }
   ]
}
Search By Code:
{
   "data" : [
      {
         "code" : "pcs"
      }
   ]
}
Search By Name:
{
   "data" : [
      {
         "name" : "Pieces"
      }
   ]
}
Search By All Params:
{
   "data" : [
      {
         "id" : 21765,
         "name" : "Pieces",
         "code" : "pcs"
      }
   ]
}
Get All:
{
	"data":[
		{}
	],
	"get_all":1,
	"limit":10000,
	"offset":0
}

cURL

Search By Id:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "id" : 21765      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Measures.get?token=<TOKEN>"
Search By Code:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "code" : "pcs"      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Measures.get?token=<TOKEN>"
Search By Name:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "name" : "Pieces"      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Measures.get?token=<TOKEN>"
Search By All Params:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "id" : 21765,         "name" : "Pieces",         "code" : "pcs"      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Measures.get?token=<TOKEN>"
Curl example Get All:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{	"data":[		{}	],	"get_all":1,	"limit":10000,	"offset":0}	' "https://<DOMAIN_NAME>/api/RPC.common.Api.Measures.get?token=<TOKEN>"

Response example

    HTTP/1.1 200 OK
{
   "count" : 1,
   "total_count" : 1,
   "result" : [
      {
         "si_label_multilang" : {
            "bg" : "pcs"
         },
         "code" : "pcs",
         "id" : 21765,
         "name_multilang" : {
            "bg" : "Pieces"
         },
         "name" : "Pieces",
         "is_weight" : 0,
         "si_label" : "pcs"
      }
   ]
}