Skip to content

Stock

GET /stock

Returns product variants with current available quantity, scoped automatically to your customer account. Requires the bearer token.

Param Type Notes
page number default 1
limit number default 10, max 50
keyword string search by product/SKU name
skues string[] filter by exact SKU(s), repeat the param for multiple
brandId string
categoryId string
type string master returns every matching row unpaginated
Terminal window
curl -G 'https://api.wms.restock.tech/stock' \
-H 'Authorization: Bearer <token>' \
-d 'page=1' -d 'limit=10' -d 'keyword=tee'
{
"success": true,
"data": {
"items": [
{
"id": "a1b2...",
"sku": "TSHIRT-BLK-M",
"msku": "TSHIRT-BLK-M",
"name": "Basic Tee — Black / M",
"qty": 128,
"brandId": "...",
"categoryId": "...",
"attributeNames": ["Black", "M"],
"updatedAt": "2026-08-19T09:12:00.000Z"
}
],
"meta": { "page": 1, "limit": 10, "itemCount": 42, "pageCount": 5, "hasNextPage": true }
},
"message": null,
"code": 200
}

qty is available (on-hand minus reserved) quantity, per warehouse aggregation your account has access to.

Restock sends stock_update events to the same HTTPS callback URL as order status updates. Ask your Restock contact to configure the URL, activate your web-client integration, and confirm its default warehouse and warehouse mappings. Stock updates cover only your customer and the active warehouses configured for that integration; these may differ from the warehouses your bearer-token account can read through Get stock.

Changes are collected on a one-minute schedule and combined into the latest available quantity for each affected SKU and warehouse. This is not an immediate notification for each movement. If nothing changed, no event is sent. A large batch is split into separate events with at most 500 items each.

{
"version": 1,
"type": "stock_update",
"id": "8e27bf20-95b6-4a10-817a-c17567e3a5d4",
"timestamp": "2026-10-08T03:01:00.000Z",
"data": {
"items": [
{ "sku": "TSHIRT-BLK-M", "skuExternal": "STORE-TEE-BLK-M", "warehouseCode": "WH-JKT", "available": 42 },
{ "sku": "TSHIRT-WHT-L", "skuExternal": null, "warehouseCode": "WH-JKT", "available": 0 }
]
}
}
Field Meaning
version Envelope schema version, currently 1 — not a stock revision counter
id Unique event ID, unchanged on retries; each chunk has its own ID
timestamp UTC ISO 8601 time for the collection run; chunks from the same run share this timestamp
data.items[].sku Restock product variant SKU
data.items[].skuExternal External SKU when configured; otherwise null
data.items[].warehouseCode Restock warehouse code for this quantity
data.items[].available Absolute current sellable quantity, computed from inventory in ACCEPTED status in this warehouse; not a quantity to add or subtract

Use the same raw-body HMAC verification and integration secret as for order updates. The x-revota-timestamp header is the send time for that delivery attempt; the payload’s timestamp is the collection time and stays unchanged on retry. The same response and retry rules apply, including the 10-second timeout.

  1. Verify the signature before processing, then route by type: stock_update uses data.items; order_update uses the existing order handler.
  2. Deduplicate by event id. Overlapping collection windows can also send the same SKU and quantity again under a different ID.
  3. For each item, store stock by (sku, warehouseCode) and replace the saved quantity with available, including zero. Do not apply it as a delta. Items absent from a batch are unchanged, not out of stock.
  4. Store the payload timestamp per SKU and warehouse, and ignore older snapshots for that pair. Process all chunks even when their timestamps match. Stock events have no data.version; the order-version rule does not apply.
  5. Durably accept the event and return 2xx within 10 seconds; perform slower storefront updates asynchronously.

This feed contains changed items, not a full stock snapshot. Enabling a callback does not send every SKU. Use Get stock to seed your catalogue, and reconcile periodically and after downtime or exhausted retries. Confirm the warehouse scope with Restock before comparing quantities: Get stock can aggregate across warehouses, while each webhook item represents one warehouse. When publishing a combined storefront quantity, sum the latest saved quantities across the warehouses you sell from.