Read and update stock

GET /api/public/v1/stock · PATCH /api/public/v1/stock

Developer docs: all pages

Start

Help and docs

Changes

01Read stock

GET /api/public/v1/stock needs api:read. A retailer reads its own rows at active, unsuppressed locations. A brand reads its own products across active retailer relationships. Use limit and cursor as on every list.

Shell · TEST
curl "https://api.test.stockisto.com/api/public/v1/stock?limit=200" \
  -H "Authorization: Bearer $STOCKISTO_API_KEY"

The 200 response contains data and nextCursor. Each row includes stockId, locationId, skuId, status, quantity, evidence, lastVerifiedAt and lastVerifiedAtLabel. Price freshness uses the separate priceUpdatedAt.

02Update one row

PATCH /api/public/v1/stock/{stockId} needs a retailer key with api:write. Set STOCK_ID to a row from your stock read. Omitted or null fields stay unchanged; v1 cannot clear a value. A 200 response returns the updated stock row.

Shell · TEST
curl -X PATCH "https://api.test.stockisto.com/api/public/v1/stock/$STOCK_ID" \
  -H "Authorization: Bearer $STOCKISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "inStock", "quantity": 4 }'
FieldValue
statusinStock, lowStock, outOfStock, carriesTheLine, orderable
quantityUnits on hand, 0 or more.
isOnDisplayInShowroomtrue or false.
retailPrice, priceCurrencyYour price and currency.
promoTextA short offer line.

03Update many rows

POST /api/public/v1/stock:batch takes 1 to 500 rows, addressed by locationId and skuId. Replace LOCATION_ID and SKU_ID with your own values. A new row needs status and a product from a connected supplier. Set BATCH_KEY to a unique value for this batch.

Shell · TEST
curl -X POST "https://api.test.stockisto.com/api/public/v1/stock:batch" \
  -H "Authorization: Bearer $STOCKISTO_API_KEY" \
  -H "Idempotency-Key: $BATCH_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "rows": [ { "locationId": "LOCATION_ID", "skuId": "SKU_ID", "status": "inStock" } ] }'

A 200 response contains results, created, updated and failed. Each result echoes index, locationId, skuId, action, stockId and error. Actions are created, updated or failed. Check every row even when HTTP status is 200.

04Send it twice safely

Batch writes accept Idempotency-Key. The same key and body within 24 hours replay the first response with Idempotency-Replay: true. A different body with that key returns 409. PATCH sets the supplied values again; it does not store an idempotency response.

05What a write changes

A status or quantity observation stamps the API source and observation time. Price-only changes preserve stock age. Successful writes feed stock.updated webhooks. A brand key cannot write retailer stock: PATCH returns 404; batch rows fail.

Error codeMeaning
invalid_statusUse one of the five status values.
negative_quantity, negative_priceUse a number of 0 or more.
invalid_price, invalid_currencyUse a price below 100 000 000 and a supported currency.
location_not_found, sku_not_availableUse a location you own and a product you can write.
status_required_for_createSupply a status for a new row.
duplicate_row_in_batchSend each location and product pair once.
retailer_key_required_for_stock_writeUse the retailer’s key.

Authentication, errors and pagination