
## Get a warehouse

`GET /v1/warehouses/:id`

Returns a single warehouse by identifier with all fields.

## Path parameters

| Parameter | Type | Description |
|----------|-----|---------|
| `id` | number | Warehouse identifier |

## Examples

### curl — personal key

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

### curl — OAuth application

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

const { success, data } = await res.json()
console.log(data.title)
```

### JavaScript — OAuth application

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

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

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | object | Warehouse object — fields listed below |

### Warehouse fields

| Field | Type | Description |
|------|-----|---------|
| `id` | number | Warehouse identifier |
| `title` | string | Warehouse name |
| `address` | string | Warehouse address |
| `active` | string | Active flag: `"Y"` / `"N"` |
| `issuingCenter` | string | Order pickup point flag: `"Y"` / `"N"` |
| `description` | string \| null | Warehouse description. `null` if not set |
| `phone` | string \| null | Contact phone. `null` if not set |
| `email` | string \| null | Contact email. `null` if not set |
| `schedule` | string \| null | Working hours. `null` if not set |
| `sort` | number | Sort order |
| `code` | string \| null | Symbolic code. `null` if not set |
| `xmlId` | string \| null | External identifier. `null` if not set |
| `gpsN` | number \| null | Geographic latitude. `null` if not set |
| `gpsS` | number \| null | Geographic longitude. `null` if not set |
| `imageId` | object \| null | Warehouse image: `{ "id", "url" }` or `null` |
| `userId` | number \| null | Responsible employee. `null` for system warehouses, populated when created via the API |
| `modifiedBy` | number \| null | Identifier of the user who last modified the warehouse. `null` for system warehouses, populated when created via the API |
| `dateCreate` | datetime \| null | Creation date. `null` for some system warehouses (for example, marketplaces) |
| `dateModify` | datetime | Last modification date |

## Response example

```json
{
  "success": true,
  "data": {
    "id": 1,
    "title": "Main warehouse",
    "address": "1 Harbour Street, Amsterdam",
    "active": "Y",
    "issuingCenter": "N",
    "description": "Central warehouse",
    "phone": "+12025550123",
    "email": "warehouse@example.com",
    "schedule": "Mon–Fri 9:00–20:00",
    "sort": 100,
    "code": "main",
    "xmlId": null,
    "gpsN": 52.377956,
    "gpsS": 4.897070,
    "imageId": {
      "id": 57,
      "url": "https://cdn.bitrix24.com/b00000000/catalog/store.png"
    },
    "userId": 1,
    "modifiedBy": 1,
    "dateCreate": "2024-01-15T09:00:00+00:00",
    "dateModify": "2024-06-20T14:30:00+00:00"
  }
}
```

## Error response example

422 — a warehouse with this `id` does not exist:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "store does not exist."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `INVALID_PARAMS` | `id` is not a positive integer |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |
| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |
| 422 | `BITRIX_ERROR` | A warehouse with the specified `id` does not exist |

The full list of common API errors — [Errors](/docs/errors).

## Known specifics

**A nonexistent warehouse is `422`, not `404`.** Requesting a warehouse by an unknown `id` returns `422` with code `BITRIX_ERROR`. Before fetching, check that the warehouse exists in the [list of warehouses](/docs/entities/warehouses/list).

**Warehouse image.** The `imageId` field comes as an object `{ "id", "url" }` with a link to the warehouse image, or `null` if no image is set.

## See also

- [List warehouses](/docs/entities/warehouses/list)
- [Update a warehouse](/docs/entities/warehouses/update)
- [Warehouse stock](/docs/entities/warehouses/stock)
- [Entities reference](/docs/entities-index)
