Create a unit of measure
Creates a unit of measure with a unique code, a name, a category (count, weight, volume or length) and the number of decimal places allowed.
How to use it
- Choose a short code not already used (check List units of measure); it is stored in upper case.
- Send code, name, category (COUNT, WEIGHT, VOLUME or LENGTH) and decimalPrecision.
- Use the returned id when giving items, bills of materials or requests for quote a unit.
BearerAuthAuthorizationBearer <JWT>X-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
application/json- body
code*stringShort unique code for the unit (e.g. KG). Trimmed and stored in upper case; a code that already exists is rejected.
name*stringDisplay name, e.g. Kilogram.
category*stringWhat the unit measures: COUNT, WEIGHT, VOLUME or LENGTH.
"COUNT""WEIGHT""VOLUME""LENGTH"decimalPrecision*integerNumber of decimal places allowed for quantities in this unit (0 or more). Defaults to 0.
int32status*stringInitial status: ACTIVE, INACTIVE, ARCHIVED or DELETED. Defaults to ACTIVE.
"ACTIVE""INACTIVE""ARCHIVED""DELETED"OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request worked, ERROR when it did not.
message*stringShort human-readable message describing the result, for logs or display; do not parse it.
data?The unit of measure as it is now stored.
curl -X POST 'https://beta.iotoms.com/api/v1/catalog/uom' \ -H 'X-TenantID: your-tenant-code' \ -H 'Content-Type: application/json' \ -d '{ "code": "string", "name": "string", "category": "COUNT", "decimalPrecision": 0, "status": "ACTIVE"}'{ "status": "string", "message": "string", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "code": "string", "name": "string", "category": "COUNT", "decimalPrecision": 0, "status": "ACTIVE", "inUse": true }}