Adjust stock on hand for an item
Adds to, subtracts from or sets an item's quantity on hand (adjustmentType ADD, SUBTRACT or SET) at a stockroom (locationId), or the default warehouse if omitted. The quantity must be greater than zero and the stockroom active. Records a stock movement with your reason; requires inventory management access.
How to use it
- Get the item code from List items and, optionally, an active stockroom ID from List inventory locations.
- Send adjustmentType (ADD, SUBTRACT or SET), a quantity above zero and a reason such as DAMAGE or STOCK_COUNT.
- SET replaces the stockroom's quantity, not the company total. Reductions are refused if they would go below zero or eat reserved stock.
- A stock movement is recorded for List stock adjustment history for an item, and inventory managers are notified.
BearerAuthAuthorizationBearer <JWT>itemId*stringItem code (the catalog itemId) of the item to adjust, from List items.
application/json- body
adjustmentType*stringADD increases stock, SUBTRACT decreases it (cannot go below zero), SET replaces the stockroom's quantity with the value given.
"ADD""SUBTRACT""SET"quantity*numberQuantity to add, subtract or set, in the item's base unit. Must be greater than zero.
reason?|Why stock changed, e.g. DAMAGE, EXPIRY, WRITE_OFF, STOCK_COUNT, OPENING_BALANCE. Defaults to MANUAL_ADJUSTMENT; unknown text is stored as sent.
notes?|Free-text note about the adjustment.
referenceId?|Your reference for the document behind this movement, e.g. a count sheet number.
referenceType?|Kind of document referenceId points to. Defaults to ITEM_ADJUSTMENT.
locationId?|Stockroom to adjust, from List inventory locations. Must be active. Leave out to use the default warehouse.
uuidOK
*/*- response
status*stringOutcome of the call: SUCCESS when the request worked, ERROR when it did not.
message*stringShort human-readable message describing the result, for logs or display; do not parse it.
data?The item's company-wide stock position: on hand, reserved and available quantities.
curl -X PATCH 'https://beta.iotoms.com/api/v1/inventory/items/string/qoh' \ -H 'Content-Type: application/json' \ -d '{ "adjustmentType": "ADD", "quantity": 0}'{ "status": "string", "message": "string", "data": { "itemId": "string", "itemName": "string", "quantityOnHand": 0, "reservedQuantity": 0, "availableQuantity": 0, "minimumStockLevel": 0, "isLowStock": true, "lastAdjustedAt": "2019-08-24T14:15:22Z", "lastAdjustedBy": "string", "version": 0 }}