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

Get basket item

GET /v1/basket-items/:id

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

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionItem identifier

Examples

curl — personal key

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

curl — OAuth application

Terminal
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
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionBasket item object
Fielddata.id Typenumber DescriptionItem identifier
Fielddata.orderId Typenumber | null DescriptionOrder identifier. Source: GET /v1/orders. null for standalone items not attached to an order
Fielddata.productId Typenumber DescriptionCatalog product identifier. Source: GET /v1/catalog-products. 0 — virtual item with no catalog link
Fielddata.name Typestring DescriptionProduct name
Fielddata.price Typenumber DescriptionPrice per unit
Fielddata.basePrice Typenumber DescriptionBase price before discount
Fielddata.discountPrice Typenumber DescriptionDiscount amount per unit
Fielddata.currency Typestring DescriptionCurrency
Fielddata.quantity Typenumber DescriptionQuantity
Fielddata.sort Typenumber DescriptionSort position of the item in the basket
Fielddata.weight Typenumber | null DescriptionWeight in grams. null for virtual items with productId: 0
Fielddata.vatRate Typenumber | null DescriptionVAT rate as a fraction of one. null for virtual items with productId: 0
Fielddata.vatIncluded Typeboolean DescriptionWhether VAT is included in the price
Fielddata.customPrice Typeboolean DescriptionWhether the price is protected from automatic recalculation when the product changes in the catalog
Fielddata.canBuy Typeboolean DescriptionWhether the product is available for purchase
Fielddata.barcodeMulti Typeboolean DescriptionWhether the item is tracked by multiple barcodes
Fielddata.measureCode Typenumber | null DescriptionMeasurement unit code. null for virtual items with productId: 0
Fielddata.measureName Typestring | null DescriptionMeasurement unit name. null for virtual items with productId: 0
Fielddata.dimensions Typestring | null DescriptionDimensions in PHP serialization format. null for virtual items with productId: 0
Fielddata.xmlId Typestring DescriptionExternal item identifier
Fielddata.productXmlId Typestring | null DescriptionExternal product identifier in the catalog. null for virtual items with productId: 0
Fielddata.catalogXmlId Typestring | null DescriptionExternal catalog identifier. null for virtual items with productId: 0
Fielddata.type Typestring | null DescriptionItem type. Always null on live Bitrix24 accounts
Fielddata.properties Typearray DescriptionItem properties. Each element: {basketId, code, id, name, sort, value, xmlId}
Fielddata.reservations Typearray DescriptionWarehouse reservations for the item
Fielddata.dateInsert Typedatetime DescriptionCreation date
Fielddata.dateUpdate Typedatetime DescriptionDate of last change

For the full field list, see GET /v1/basket-items/fields.

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
HTTP404 CodeENTITY_NOT_FOUND DescriptionAn item with this ID was not found
HTTP403 CodeSCOPE_DENIED DescriptionThe API key lacks the sale scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

For the full list of common API errors, see Errors.

See also