
## Get basket item

`GET /v1/basket-items/:id`

Returns a single basket item by ID, with all its fields.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Item identifier |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/basket-items/9" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

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

const { success, data } = await res.json()
console.log('Item:', data.name, '×', data.quantity, '=', data.price * data.quantity, data.currency)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/basket-items/9', {
  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 | Basket item object |
| `data.id` | number | Item identifier |
| `data.orderId` | number \| null | Order identifier. Source: [`GET /v1/orders`](../orders/list.md). `null` for standalone items not attached to an order |
| `data.productId` | number | Catalog product identifier. Source: [`GET /v1/catalog-products`](/docs/entities/catalog-products). `0` — virtual item with no catalog link |
| `data.name` | string | Product name |
| `data.price` | number | Price per unit |
| `data.basePrice` | number | Base price before discount |
| `data.discountPrice` | number | Discount amount per unit |
| `data.currency` | string | Currency |
| `data.quantity` | number | Quantity |
| `data.sort` | number | Sort position of the item in the basket |
| `data.weight` | number \| null | Weight in grams. `null` for virtual items with `productId: 0` |
| `data.vatRate` | number \| null | VAT rate as a fraction of one. `null` for virtual items with `productId: 0` |
| `data.vatIncluded` | boolean | Whether VAT is included in the price |
| `data.customPrice` | boolean | Whether the price is protected from automatic recalculation when the product changes in the catalog |
| `data.canBuy` | boolean | Whether the product is available for purchase |
| `data.barcodeMulti` | boolean | Whether the item is tracked by multiple barcodes |
| `data.measureCode` | number \| null | Measurement unit code. `null` for virtual items with `productId: 0` |
| `data.measureName` | string \| null | Measurement unit name. `null` for virtual items with `productId: 0` |
| `data.dimensions` | string \| null | Dimensions in PHP serialization format. `null` for virtual items with `productId: 0` |
| `data.xmlId` | string | External item identifier |
| `data.productXmlId` | string \| null | External product identifier in the catalog. `null` for virtual items with `productId: 0` |
| `data.catalogXmlId` | string \| null | External catalog identifier. `null` for virtual items with `productId: 0` |
| `data.type` | string \| null | Item type. Always `null` on live Bitrix24 accounts |
| `data.properties` | array | Item properties. Each element: `{basketId, code, id, name, sort, value, xmlId}` |
| `data.reservations` | array | Warehouse reservations for the item |
| `data.dateInsert` | datetime | Creation date |
| `data.dateUpdate` | datetime | Date of last change |

For the full field list, see [`GET /v1/basket-items/fields`](./fields.md).

## Response example

```json
{
  "success": true,
  "data": {
    "id": 9,
    "orderId": 33,
    "productId": 119,
    "name": "Home Slippers Favorite Sport",
    "price": 470,
    "basePrice": 470,
    "discountPrice": 0,
    "currency": "USD",
    "quantity": 1,
    "weight": 0,
    "vatRate": 0,
    "vatIncluded": true,
    "customPrice": false,
    "canBuy": true,
    "barcodeMulti": false,
    "measureCode": 796,
    "measureName": "pcs",
    "dimensions": "a:3:{s:5:\"WIDTH\";N;s:6:\"HEIGHT\";N;s:6:\"LENGTH\";N;}",
    "xmlId": "bx_5fc9f8c57fe6c",
    "productXmlId": "1000000475",
    "catalogXmlId": "FUTURE-ERP-CATALOG",
    "type": null,
    "sort": 200,
    "properties": [
      {
        "id": 17,
        "basketId": 9,
        "code": "CATALOG.XML_ID",
        "name": "Catalog XML_ID",
        "value": "FUTURE-ERP-CATALOG",
        "sort": 100,
        "xmlId": "bx_5fc9f8c57ff3e"
      },
      {
        "id": 19,
        "basketId": 9,
        "code": "PRODUCT.XML_ID",
        "name": "Product XML_ID",
        "value": "1000000475",
        "sort": 100,
        "xmlId": "bx_5fc9f8c57ffb2"
      }
    ],
    "reservations": [],
    "dateInsert": "2020-12-04T07:52:21.000Z",
    "dateUpdate": "2022-11-02T05:10:13.000Z"
  }
}
```

## Error response example

404 — item not found:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "basket item is not exists"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 404 | `ENTITY_NOT_FOUND` | An item with this ID was not found |
| 403 | `SCOPE_DENIED` | The API key lacks the `sale` scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |

For the full list of common API errors, see [Errors](/docs/errors).

## See also

- [Update item](./update.md)
- [Delete basket item](./delete.md)
- [List items](./list.md)
- [Item fields](./fields.md)
- [Order](../orders/get.md)
- [Limits and optimization](/docs/optimization)
