For AI agents: markdown of this page — /docs-content-en/entities/basket-items/list.md documentation index — /llms.txt
List basket items
GET /v1/basket-items
Returns a list of basket items with filtering and auto-pagination support.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
Parameterlimit |
Typenumber | Default50 |
DescriptionNumber of records (up to 5000). When limit > 50, Vibecode automatically requests several pages from Bitrix24 |
Parameteroffset |
Typenumber | Default0 |
DescriptionSkip N records. When offset ≥ 2500, limit ≤ 500 is recommended |
Parameterselect |
Typestring | Default— | DescriptionField selection: ?select=id,orderId,name,quantity,price |
Parametersort |
Typestring | Default— | DescriptionSorting shorthand: ?sort=-id; a leading minus sign means descending order |
Parameterorder |
Typeobject | Default— | DescriptionSorting: ?order[id]=desc |
Parameterfilter |
Typeobject | Default— | DescriptionFiltering by the item's key fields. Filtering syntax. Example: ?filter[orderId]=33 |
Examples
curl — personal key
curl -g "https://vibecode.bitrix24.com/v1/basket-items?limit=10&filter[orderId]=33" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -g "https://vibecode.bitrix24.com/v1/basket-items?limit=10&filter[orderId]=33" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/basket-items?limit=10&filter[orderId]=33', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data, meta } = await res.json()
console.log(`Items in the order: ${meta.total}`)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/basket-items?limit=10&filter[orderId]=33', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data, meta } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typearray | DescriptionArray of basket items. All item fields — Basket item fields |
Fielddata[].orderId |
Typenumber | null | DescriptionOrder identifier. Source: GET /v1/orders |
Fielddata[].productId |
Typenumber | DescriptionCatalog product identifier. Source: GET /v1/catalog-products. 0 — virtual item with no catalog link |
Fieldmeta.total |
Typenumber | DescriptionTotal number of records matching the filter |
Fieldmeta.hasMore |
Typeboolean | DescriptionWhether there are more records beyond limit |
Response example
{
"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,
"measureCode": 796,
"measureName": "pcs",
"xmlId": "bx_5fc9f8c57fe6c",
"productXmlId": "1000000475",
"catalogXmlId": "FUTURE-ERP-CATALOG",
"canBuy": true,
"dateInsert": "2020-12-04T07:52:21.000Z",
"dateUpdate": "2022-11-02T05:10:13.000Z"
}
],
"meta": {
"total": 1,
"hasMore": false
}
}
The main fields are shown. For the full item response, see GET /v1/basket-items/:id.
Error response example
400 — filter by a non-existent field:
{
"success": false,
"error": {
"code": "UNKNOWN_FILTER_FIELD",
"message": "Unknown filter field 'foo' for entity 'basket-items'. Available: …"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeUNKNOWN_FILTER_FIELD |
DescriptionFilter by a field not in the schema |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key lacks the sale scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
| HTTP429 | CodeRATE_LIMITED |
DescriptionRate limit exceeded: 300 requests per minute per portal. All API keys of the portal share one limit. The current limit is returned in the x-ratelimit-limit header. Retry after the delay in the Retry-After header |
For the full list of common API errors, see Errors.
Known specifics
Auto-pagination: when limit > 50, Vibecode automatically requests several pages from Bitrix24 and returns all records in a single response.
Standalone items without an order. Some items in data[] may have orderId: null — these are items in buyers' unfinished baskets, not yet converted into an order. To exclude them, add filter[orderId][!]=null or filter by a specific orderId.