Add a unit of measure to an item
Adds a conversion unit to an item, for example a case of 12. factorToBase must be greater than zero, and each unit can be added to an item only once.
How to use it
- Set the item's base unit first with Set an item's base unit of measure, and pick the unit to add from List units of measure.
- Send uomId and factorToBase (how many base units it holds, above zero), plus any default flags.
- A default flag you set is removed from the item's other units. Adding the same unit twice is rejected.
BearerAuthAuthorizationBearer <JWT>itemId*stringItem code, from List items.
X-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
application/json- body
uomId*stringUnit to add, from List units of measure. Each unit can be added to an item only once.
uuidfactorToBase*numberHow many base units one of this unit equals, e.g. 12 for a case of 12. Must be greater than zero.
isPurchaseDefault*booleanWhether 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*booleanWhether this is the item's default selling unit. Only one unit per item holds it; setting it clears it from the others.
isReceiveDefault*booleanWhether 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*booleanWhether 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?|Optional. Catch-weight items: expected weight of one pack in base units, used for planning and variance only.
tareWeight?|Optional. Empty-packaging weight netted out of gross scale readings at goods receipt.
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 POST 'https://beta.iotoms.com/api/v1/catalog/items/string/uoms' \ -H 'X-TenantID: your-tenant-code' \ -H 'Content-Type: application/json' \ -d '{ "uomId": "4df47f00-a69d-4ff2-b50d-4a7649a4b70c", "factorToBase": 0, "isPurchaseDefault": true, "isSellDefault": true, "isReceiveDefault": true, "isCountDefault": true}'{ "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 }}