#Basket items
Entity: basketItem | Scope: sale | Base path: /v1/basket-items
SPA entity (camelCase field names) — field names pass through without transformation.
#Operations
| Method | Path | Description | Bitrix24 Method |
|---|---|---|---|
GET |
/v1/basket-items |
List all (with filter, sort, pagination) | sale.basketitem.list |
GET |
/v1/basket-items/:id |
Get by ID | sale.basketitem.get |
POST |
/v1/basket-items |
Create new | sale.basketitem.add |
PATCH |
/v1/basket-items/:id |
Update by ID | sale.basketitem.update |
DELETE |
/v1/basket-items/:id |
Delete by ID | sale.basketitem.delete |
#Fields
| API Name | Bitrix24 Name | Type | Readonly | Description |
|---|---|---|---|---|
id |
id |
number | yes | Идентификатор записи |
orderId |
orderId |
number | ||
productId |
productId |
number | ||
name |
name |
string | ||
price |
price |
number | ||
basePrice |
basePrice |
number | ||
discountPrice |
discountPrice |
number | ||
currency |
currency |
string | ||
quantity |
quantity |
number | ||
sort |
sort |
number | ||
weight |
weight |
number | ||
vatRate |
vatRate |
number | ||
vatIncluded |
vatIncluded |
boolean | ||
dateInsert |
dateInsert |
datetime | yes | |
dateUpdate |
dateUpdate |
datetime | yes |
#Examples
#List
curl -X GET '/v1/basket-items?limit=10' \
-H 'X-Api-Key: YOUR_KEY'
#Get by ID
curl -X GET '/v1/basket-items/123' \
-H 'X-Api-Key: YOUR_KEY'
#Create
curl -X POST '/v1/basket-items' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"orderId":1,"productId":1,"name":"value"}'
#Update
curl -X PATCH '/v1/basket-items/123' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"updated"}'
#Delete
curl -X DELETE '/v1/basket-items/123' \
-H 'X-Api-Key: YOUR_KEY'
#Batch
curl -X POST '/v1/batch' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"calls":[{"entity":"basket-items","action":"list","params":{"limit":5}}]}'