iotoms Docs

Update a unit of measure

PUT
/api/v1/catalog/uom/{id}

Changes a unit's name, category, decimal precision or status. The code cannot be changed after creation.

How to use it

  1. Get the unit ID from List units of measure.
  2. Send only the fields to change: name, category, decimalPrecision (0 or more) or status. The code cannot be changed.
  3. Set status to INACTIVE to retire a unit that items still use, since such a unit cannot be deleted.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

ID of the record (UUID).

Formatuuid

Header Parameters

X-TenantID*string

Your merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.

Request Body

application/json
  1. body
name?|

New display name. Leave out to keep the current one.

category?|

New category: COUNT, WEIGHT, VOLUME or LENGTH. Leave out to keep the current one.

Value in"COUNT""WEIGHT""VOLUME""LENGTH"null
decimalPrecision?|

New number of decimal places allowed (0 or more). Leave out to keep the current value.

Formatint32
status?|

New status: ACTIVE, INACTIVE, ARCHIVED or DELETED. Leave out to keep the current one.

Value in"ACTIVE""INACTIVE""ARCHIVED""DELETED"null

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request worked, ERROR when it did not.

message*string

Short human-readable message describing the result, for logs or display; do not parse it.

data?

The unit of measure as it is now stored.

Example Request
curl -X PUT 'https://beta.iotoms.com/api/v1/catalog/uom/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'X-TenantID: your-tenant-code' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "status": "string",  "message": "string",  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "code": "string",    "name": "string",    "category": "COUNT",    "decimalPrecision": 0,    "status": "ACTIVE",    "inUse": true  }}