For AI agents: markdown of this page — /docs-content-en/entities/warehouses/stock.md documentation index — /llms.txt

Warehouse stock

GET /v1/warehouses/:id/stock

Returns product stock in a warehouse — one row per product that is recorded in this warehouse. Read-only: the quantity cannot be changed through this endpoint.

Path parameters

Parameter Type Description
id number Warehouse identifier

Query parameters

Parameter Type Default Description
limit number 50 Number of rows (up to 5000). When limit > 50, the response is automatically assembled from several Bitrix24 pages
offset number 0 Offset from the start of the selection

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/warehouses/1/stock" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/warehouses/1/stock" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/warehouses/1/stock', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data, meta } = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/warehouses/1/stock', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data, meta } = await res.json()

Response fields

Field Type Description
success boolean Always true on success
data array Stock rows in the warehouse
data[].id number Stock row identifier
data[].productId number Product identifier — see Catalog products
data[].storeId number Warehouse identifier
data[].amount number Quantity in the warehouse. May be null — treat as 0
data[].quantityReserved number Reserved quantity. May be null — treat as 0
meta.total number Number of stock rows in the warehouse
meta.hasMore boolean Whether there are rows beyond the current page (offset + data.length < total). When true, raise limit (up to 5000) or move offset

Response example

JSON
{
  "success": true,
  "data": [
    {
      "id": 3,
      "productId": 200,
      "storeId": 1,
      "amount": 15,
      "quantityReserved": 30
    },
    {
      "id": 5,
      "productId": 201,
      "storeId": 1,
      "amount": 54,
      "quantityReserved": null
    },
    {
      "id": 9,
      "productId": 202,
      "storeId": 1,
      "amount": null,
      "quantityReserved": null
    }
  ],
  "meta": {
    "total": 3,
    "hasMore": false
  }
}

Error response example

400 — an invalid warehouse id:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "id must be a positive integer"
  }
}

Errors

HTTP Code Description
400 INVALID_PARAMS id, limit, or offset is set incorrectly
401 TOKEN_MISSING The API key has no configured tokens
403 SCOPE_DENIED The API key does not have the catalog scope
502 BITRIX_UNAVAILABLE Bitrix24 is unavailable

The full list of common API errors — Errors.

Known specifics

Empty warehouse. If the warehouse has no products with stock, data is an empty array and meta.total is 0.

See also