## Get an inventory document item

`GET /v1/catalog-document-elements/:id`

Returns one inventory document item by ID.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Item ID. List of a document's items — [`GET /v1/catalog-document-elements?filter[docId]=:docId`](/docs/entities/catalog-document-elements/list) |
| `select` (query) | string | no | Comma-separated response fields: `?select=id,elementId,amount`. The `id` field is always returned. Names come from [`GET /v1/catalog-document-elements/fields`](/docs/entities/catalog-document-elements/fields) |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/catalog-document-elements/33" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

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

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

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-document-elements/33', {
  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.id` | number | Item ID |
| `data.docId` | number | Inventory document ID. Document — [`GET /v1/catalog-documents/:id`](/docs/entities/catalog-documents/get) |
| `data.elementId` | number | Product ID. Product — [`GET /v1/catalog-products/:id`](/docs/entities/catalog-products/get) |
| `data.amount` | number \| null | Product quantity, `null` — not set |
| `data.purchasingPrice` | number \| null | Purchase price per unit, `null` — not set |
| `data.storeFrom` | number \| null | Source warehouse, `null` — no warehouse set. Warehouses — [`GET /v1/warehouses`](/docs/entities/warehouses/list) |
| `data.storeTo` | number \| null | Destination warehouse, `null` — no warehouse set. Warehouses — [`GET /v1/warehouses`](/docs/entities/warehouses/list) |

## Response example

```json
{
  "success": true,
  "data": {
    "amount": 3,
    "docId": 299,
    "elementId": 6595,
    "id": 33,
    "purchasingPrice": 11000,
    "storeFrom": null,
    "storeTo": 11
  }
}
```

## Error response example

404 — item not found:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "catalogDocumentElement 999999999 not found"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 404 | `ENTITY_NOT_FOUND` | No item with this `id` exists, including after its document was deleted |
| 400 | `INVALID_PARAMS` | `id` is not a non-negative integer |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `INVALID_API_KEY` | The API key passed was not found |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |
| 403 | `SCOPE_DENIED` | The API key does not have the `catalog` scope |

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

## See also

- [List items](/docs/entities/catalog-document-elements/list)
- [Update an item](/docs/entities/catalog-document-elements/update)
- [Delete an item](/docs/entities/catalog-document-elements/delete)
- [Item fields](/docs/entities/catalog-document-elements/fields)
- [Get an inventory document](/docs/entities/catalog-documents/get)
- [Limits and optimization](/docs/optimization)
