Update an item's unit of measure
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
- Read the item's units with List an item's units of measure and pick the uomId to change.
- Send only the fields to change: factorToBase (above zero), default flags, nominalWeight or tareWeight.
- Setting a default flag removes it from the item's other units. The base unit's factor always stays 1.
BearerAuthAuthorizationBearer <JWT>itemId*stringItem code, from List items.
uomId*stringUnit to change, as uomId from List an item's units of measure.
uuidX-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
application/json- 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.
OK
*/*- response
status*stringOutcome of the call: SUCCESS when it worked, ERROR when it failed.
message*stringShort 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.
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 '{}'{ "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 }}