Get units of measurement
POST
/api/RPC.common.Api.Measures.get?token=<TOKEN>Parameters
| Field | Type | Description |
|---|---|---|
id | Integer | Unit of measurement ID |
coderequired | String | Unit of measurement ID |
namerequired | String | Unit of measurement name |
get_all | Boolean | Get all |
offset | Number | Offset |
limit | Number | Limit |
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"
}
]
}