Search docs ⌘K
esc
Type to search across all documentation pages
Commerce

Inventory

Track and adjust inventory levels for products and variants. Supports atomic increment/decrement operations and reservation holds.

Get inventory

GET
/modules/commerce/inventory/{inventory_id}
commerce:read0.0000008 tokens

Retrieve a single inventory record.

curl
curl https://api.saasignal.saastemly.com/modules/commerce/inventory/{inventory_id} \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
Path param
Type
Description
inventory_id required
string
Error responses
401 Unauthorized
402 Insufficient tokens
404 Not found
429 Rate limited

Update inventory

PATCH
/modules/commerce/inventory/{inventory_id}
commerce:write0.0000053 tokens

Update inventory quantity or incoming.

curl
curl -X PATCH https://api.saasignal.saastemly.com/modules/commerce/inventory/{inventory_id} \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
json — 200 OK
{ "status": "ok" }
Path param
Type
Description
inventory_id required
string
Body field
Type
Description
quantity
integer
range ≥-9007199254740991 .. ≤9007199254740991
incoming
integer
range ≥-9007199254740991 .. ≤9007199254740991
Error responses
401 Unauthorized
402 Insufficient tokens
404 Not found
429 Rate limited

Adjust inventory

POST
/modules/commerce/inventory/{inventory_id}/adjust
commerce:write0.0000053 tokens

Adjust inventory by a delta amount.

curl
curl -X POST https://api.saasignal.saastemly.com/modules/commerce/inventory/{inventory_id}/adjust \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"adjustment":1}'
json — 200 OK
{ "status": "ok" }
Path param
Type
Description
inventory_id required
string
Body field
Type
Description
adjustment required
integer
range ≥-9007199254740991 .. ≤9007199254740991
reason
string
Error responses
401 Unauthorized
402 Insufficient tokens
404 Not found
422 Unprocessable entity
429 Rate limited

List inventory

GET
/modules/commerce/inventory
commerce:read0.0000008 tokens

List inventory records.

curl
curl https://api.saasignal.saastemly.com/modules/commerce/inventory \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
Query param
Type
Description
product_id
string
low_stock_only
boolean
limit
integer
range ≥1 .. ≤100default 25
cursor
string
Error responses
401 Unauthorized
402 Insufficient tokens
429 Rate limited