iotoms Docs

Update an item's unit of measure

PUT
/api/v1/catalog/items/{itemId}/uoms/{uomId}

Changes an item's conversion unit: its conversion factor to the base unit, which unit is the default for purchasing, selling, receiving or counting, and nominal or tare weight. The base unit's factor always stays 1.

How to use it

  1. Read the item's units with List an item's units of measure and pick the uomId to change.
  2. Send only the fields to change: factorToBase (above zero), default flags, nominalWeight or tareWeight.
  3. Setting a default flag removes it from the item's other units. The base unit's factor always stays 1.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

itemId*string

Item code, from List items.

uomId*string

Unit to change, as uomId from List an item's units of measure.

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
factorToBase?|

New number of base units in one of this unit. Must be greater than zero; ignored for the base unit, which stays 1.

isPurchaseDefault?|

Whether this is the item's default unit on purchase orders. Only one unit per item holds it; setting it clears it from the others.

isSellDefault?|

Whether this is the item's default selling unit. Only one unit per item holds it; setting it clears it from the others.

isReceiveDefault?|

Whether this is the item's default unit when receiving goods. Only one unit per item holds it; setting it clears it from the others.

isCountDefault?|

Whether this is the item's default unit for stock counts. Only one unit per item holds it; setting it clears it from the others.

nominalWeight?|

Catch-weight items: expected weight of one pack in base units. Must be greater than zero when sent.

tareWeight?|

Empty-packaging weight netted out of gross scale readings at goods receipt. Zero or more.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when it worked, ERROR when it failed.

message*string

Short human-readable message describing the outcome, for example "Vendor created". Do not parse it.

data?

The item's unit of measure as stored after the change.

Example Request
curl -X PUT 'https://beta.iotoms.com/api/v1/catalog/items/string/uoms/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",    "uomId": "4df47f00-a69d-4ff2-b50d-4a7649a4b70c",    "code": "string",    "name": "string",    "category": "COUNT",    "decimalPrecision": 0,    "factorToBase": 0,    "isBase": true,    "isPurchaseDefault": true,    "isReceiveDefault": true,    "isCountDefault": true,    "nominalWeight": 0,    "tareWeight": 0,    "isSellDefault": true  }}