Enable or disable catch weight for an item
PUT
Turns catch weight on or off, so the item is stocked by its measured net weight rather than by count. Enabling it requires the item's base unit to be a weight unit.
How to use it
- Make sure the item's base unit is a WEIGHT unit (see Set an item's base unit of measure); otherwise enabling is rejected.
- Send enabled true to stock the item by measured net weight, or false to stock by count again.
- Optionally set nominalWeight and tareWeight on its pack unit with Update an item's unit of measure for receiving.
BearerAuthheader
AuthorizationBearer <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
enabled*booleantrue to stock the item by measured net weight (needs a WEIGHT base unit); false to go back to stocking by count.
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 full unit list (base unit plus every conversion unit) after the change.
Example Request
curl -X PUT 'https://beta.iotoms.com/api/v1/catalog/items/string/catch-weight' \ -H 'X-TenantID: your-tenant-code' \ -H 'Content-Type: application/json' \ -d '{ "enabled": true}'Example Response
{ "status": "string", "message": "string", "data": { "itemId": "string", "catchWeight": true, "baseUomId": "0c43b7c4-22c4-4b37-9c1a-485778bd5b04", "units": [ { "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 } ], "warnings": [ "string" ] }}