For AI agents: markdown of this page — /docs-content-en/entities/basket-item-properties/list.md documentation index — /llms.txt

List basket item properties

GET /v1/basket-item-properties

Returns basket item properties with filtering, sorting and automatic pagination. To get the properties of one item, filter by its identifier.

Parameters

Parameter Type Default Description
Parameterfilter Typeobject Default— DescriptionFilter by the fields from GET /v1/basket-item-properties/fields: id, basketId, name, value, code, sort, xmlId.
Filtering syntax. Example: ?filter[basketId]=9. Source of basketId: GET /v1/basket-items
Parameterselect Typestring Default— DescriptionComma-separated fields: ?select=id,basketId,value. An unknown name does not cause an error and is reported in meta.warnings with the code UNKNOWN_SELECT_FIELD
Parametersort Typestring Default— DescriptionSorting in short syntax: ?sort=-id, a minus means descending
Parameterorder Typeobject Default— DescriptionSorting as an object: ?order[id]=desc
Parameterlimit Typenumber Default50 DescriptionNumber of records, from 1 to 5000
Parameteroffset Typenumber Default0 DescriptionNumber of records to skip
ParameterwithTotal Typestring Default— DescriptionAccepted as true or false, but for basket item properties it changes neither the count nor the presence of meta.total

Pagination. With limit > 50, Vibecode automatically reads several pages of 50 records and merges them into one response. For the next batch, increase offset by the number of records received. Continue while meta.hasMore is true.

Examples

curl — personal key

Terminal
curl -g "https://vibecode.bitrix24.com/v1/basket-item-properties?filter[basketId]=9" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -g "https://vibecode.bitrix24.com/v1/basket-item-properties?filter[basketId]=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-item-properties?filter[basketId]=9', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data, meta } = await res.json()
console.log(`Item properties: ${meta.total}`)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/basket-item-properties?filter[basketId]=9', {
  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 item properties
Fielddata[].id Typenumber DescriptionProperty ID
Fielddata[].basketId Typenumber DescriptionBasket item ID. Source: GET /v1/basket-items
Fielddata[].name Typestring DescriptionProperty name
Fielddata[].value Typestring | null DescriptionProperty value
Fielddata[].code Typestring | null DescriptionProperty symbolic code
Fielddata[].sort Typenumber DescriptionSort order of the property within the item
Fielddata[].xmlId Typestring | null DescriptionExternal ID
Fieldmeta.total Typenumber DescriptionTotal number of properties matching the filter
Fieldmeta.hasMore Typeboolean DescriptionWhether there are records beyond the current batch
Fieldmeta.warnings Typearray DescriptionParameter warnings, with the fields code, message, field. Present only when there are warnings

Response example

JSON
{
  "success": true,
  "data": [
    {
      "basketId": 9,
      "code": "CATALOG.XML_ID",
      "id": 17,
      "name": "Catalog XML_ID",
      "sort": 100,
      "value": "FUTURE-ERP-CATALOG",
      "xmlId": "bx_5fc9f8c57ff3e"
    },
    {
      "basketId": 9,
      "code": "PRODUCT.XML_ID",
      "id": 19,
      "name": "Product XML_ID",
      "sort": 100,
      "value": "1000000475",
      "xmlId": "bx_5fc9f8c57ffb2"
    }
  ],
  "meta": {
    "total": 2,
    "hasMore": false
  }
}

Error response example

400 — filter by an unknown field:

JSON
{
  "success": false,
  "error": {
    "code": "UNKNOWN_FILTER_FIELD",
    "message": "Unknown filter field 'foo' for entity 'basket-item-properties'. Available: id, basketId, name, value, code, sort, xmlId"
  }
}

Errors

HTTP Code Description
HTTP400 CodeUNKNOWN_FILTER_FIELD DescriptionFilter by a field that is not in the schema. The message lists the available fields
HTTP400 CodeINVALID_FILTER_OPERATOR DescriptionUnknown operator in a filter condition. The message lists the supported ones
HTTP400 CodeINVALID_FILTER Descriptionfilter is written neither in brackets nor as a JSON object, one request mixes both forms, or the condition could not be applied
HTTP400 CodeUNKNOWN_SORT_FIELD DescriptionSorting by a field that is not in the schema
HTTP400 CodeINVALID_SORT_DIRECTION DescriptionThe direction in the sort object is not one of asc, desc, ASC, DESC
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the sale scope
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is missing
HTTP401 CodeTOKEN_MISSING DescriptionNo Bitrix24 access tokens are configured
HTTP429 CodeRATE_LIMITED DescriptionRequest limit exceeded. The exact value is in the x-ratelimit-limit header. Retry after the time in the Retry-After header

Full list of common API errors — Error codes.

Known specifics

Properties of all items in an order. Properties have no order filter. First get the IDs of the order items: GET /v1/basket-items with the filter ?filter[orderId]=33&select=id, where orderId comes from GET /v1/orders. Then pass them as a list: ?filter[basketId][]=9&filter[basketId][]=1005.

Nonexistent item. A filter by the basketId of an item that does not exist in the Bitrix24 account returns an empty data with meta.total equal to 0, not an error.

See also