
## Warehouse stock record

`GET /v1/warehouses/:id/stock/:recordId`

Reads one warehouse stock row. Its ID differs from the product and warehouse IDs. Requires the `catalog` scope. Read-only keys are accepted.

## Path parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Warehouse ID from the [warehouse list](./list.md), a canonical positive safe integer |
| `recordId` (path) | number | yes | Stock row ID from the [stock list](./stock.md), a canonical positive safe integer |

## Examples

### curl — personal key

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

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/warehouses/1/stock/3" \
  -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/3', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Stock:', data.amount)
```

### JavaScript — OAuth application

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

const { success, data } = await res.json()
console.log('Stock:', data.amount)
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | `true` on success |
| `data` | object | Warehouse stock row from the [stock list](./stock.md) — fields listed below |
| `data.id` | number | Stock row ID from the [stock list](./stock.md) |
| `data.productId` | number | Product ID from the [catalog product list](/docs/entities/catalog-products/list) |
| `data.storeId` | number | Warehouse ID from the [warehouse list](./list.md) |
| `data.amount` | number \| null | Stock amount |
| `data.quantityReserved` | number \| null | Reserved amount, which may exceed stock |

## Response example

```json
{
  "success": true,
  "data": {
    "id": 3,
    "productId": 6595,
    "storeId": 1,
    "amount": 15,
    "quantityReserved": 30
  }
}
```

## Error response example

404 — the stock row was not found in the specified warehouse:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Warehouse stock record not found"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `INVALID_PARAMS` | Invalid `id` or `recordId`, refused before calling Bitrix24 |
| 401 | `TOKEN_MISSING` | No configured tokens |
| 403 | `SCOPE_DENIED` | Missing `catalog` scope |
| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 explicitly denied method access |
| 404 | `ENTITY_NOT_FOUND` | The row is missing, inaccessible, or belongs to another warehouse |
| 422 | `BITRIX_ERROR` | Bitrix24 business refusal |
| 429 | `QUEUE_OVERFLOW` | Call queue is full |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 unavailable |
| 503 | `BITRIX_TIMEOUT` | Bitrix24 timeout |

See the full list of common errors in [Errors](/docs/errors).

## See also

- [Warehouse stock](/docs/entities/warehouses/stock)
- [Stock totals](/docs/entities/warehouses/stock-totals)
