Skip to content

Adjust the stock on hand of a variant

POST
/api/v1/workspaces/{workspaceId}/inventory-items/{inventoryItemId}/adjustments
curl --request POST \
--url https://api.crossmart.io/api/v1/workspaces/example/inventory-items/example/adjustments \
--header 'Content-Type: application/json' \
--data '{ "mode": "delta", "quantity": 1, "reason": "OPENING_BALANCE", "note": "example" }'

Adds or removes units, or sets the counted stock, and records the change in the ledger with its reason and author. Reserved units are not changed.

workspaceId
required
string
inventoryItemId
required
string
Media typeapplication/json
object
mode
required
string
Allowed values: delta set
quantity
required

With delta, units to add (or remove, when negative). With set, the new stock on hand.

number
>= -1000000 <= 1000000
reason
required

One of RECEIVED, CORRECTION, RETURNED, DAMAGED, LOST, SOLD. The other reasons are recorded by Crossmart.

string
Allowed values: OPENING_BALANCE ADJUSTMENT CORRECTION RECEIVED RETURNED DAMAGED LOST SOLD IMPORTED ORDER_SHIPPED
note
string
<= 500 characters
Media typeapplication/json
object
inventoryItemId
required
string format: uuid
variantId
required
string format: uuid
productId
required
string format: uuid
productTitle
required
string
optionValues
required

One value per product option, in order

Array<string>
sku
required
string
nullable
imageUrl
required

The product’s first image

string
nullable
tracked
required

Whether Crossmart tracks stock for this variant

boolean
onHand
required

Units in stock: available plus reserved

number
reserved
required

Units held for open orders

number
available
required

Units that can still be sold, and what channels receive

number
stockLevel
required
string
Allowed values: in_stock low_stock out_of_stock untracked
updatedAt
required
string format: date-time

Example

{
"stockLevel": "in_stock"
}