iotoms Docs

Adjust stock on hand for an item

PATCH
/api/v1/inventory/items/{itemId}/qoh

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

  1. Get the item code from List items and, optionally, an active stockroom ID from List inventory locations.
  2. Send adjustmentType (ADD, SUBTRACT or SET), a quantity above zero and a reason such as DAMAGE or STOCK_COUNT.
  3. SET replaces the stockroom's quantity, not the company total. Reductions are refused if they would go below zero or eat reserved stock.
  4. A stock movement is recorded for List stock adjustment history for an item, and inventory managers are notified.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

itemId*string

Item code (the catalog itemId) of the item to adjust, from List items.

Header Parameters

Request Body

application/json
  1. body
adjustmentType*string

ADD increases stock, SUBTRACT decreases it (cannot go below zero), SET replaces the stockroom's quantity with the value given.

Value in"ADD""SUBTRACT""SET"
quantity*number

Quantity 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.

Formatuuid

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request worked, ERROR when it did not.

message*string

Short 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.

Example Request
curl -X PATCH 'https://beta.iotoms.com/api/v1/inventory/items/string/qoh' \  -H 'Content-Type: application/json' \  -d '{  "adjustmentType": "ADD",  "quantity": 0}'
Example Response
{  "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  }}