For AI agents: markdown of this page — /docs-content-en/entities/crm-payments/products-list.md documentation index — /llms.txt
List CRM payment line items
GET /v1/crm-payments/:id/products
Returns the line items of a CRM payment: how many units of each product the payment includes. Use it to get a line item id before changing the quantity or deleting the line item.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionPayment ID. Payments of a CRM item: GET /v1/crm-payments |
There are no query string parameters: all line items arrive at once, without pagination or filters.
The generic filter parameter is not applied by this endpoint. By default, the API preserves the previous HTTP 200 response and data, adds Warning: 299 - "filter is not supported on this endpoint and was ignored", and records unsupported-filter use in the server log.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/crm-payments/573/products" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/crm-payments/573/products" \
-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/crm-payments/573/products', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { data, meta } = await res.json()
console.log(`Line items in the payment: ${meta.total}`)
for (const item of data) {
console.log(`Line item ${item.id}: ${item.quantity} pcs`)
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-payments/573/products', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { data, meta } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on success |
Fielddata |
Typearray | DescriptionPayment line items. An empty array for a payment without line items |
Fielddata[].id |
Typenumber | DescriptionPayment line item ID. Passed as itemId to PATCH /v1/crm-payments/:id/products/:itemId and DELETE /v1/crm-payments/:id/products/:itemId |
Fielddata[].paymentId |
Typenumber | DescriptionPayment ID |
Fielddata[].quantity |
Typenumber | DescriptionNumber of product units in the line item |
Fielddata[].entityId |
Typenumber | DescriptionID of the basket item in the linked order. List: GET /v1/basket-items with filter[orderId] set to the order ID from the payment's orderId field in GET /v1/payments/:id |
Fieldmeta.total |
Typenumber | DescriptionNumber of line items in the payment |
Response example
{
"success": true,
"data": [
{
"id": 445,
"paymentId": 573,
"quantity": 2,
"entityId": 1391
}
],
"meta": {
"total": 1
}
}
Error response example
404 — no payment with this ID:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Payment has not been found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionNo payment with this id |
| HTTP200 | CodeWarning: 299 |
DescriptionThe filter is ignored by default; previous data is preserved and the warning is sent in the Warning header. |
| HTTP400 (strict mode only) | CodeUNSUPPORTED_FILTER |
DescriptionThe server mode is disabled by default; until it is enabled, the endpoint preserves HTTP 200 and the previous data. |
| HTTP400 | CodeINVALID_ID |
Descriptionid is not a positive integer |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 rejected the request. The reason is in error.message |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionThe key's user has no access to the CRM item or the payment in Bitrix24 |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the crm scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionX-Api-Key is not provided |
Full list of common API errors — Errors.
Known specifics
A line item does not contain the deal product row ID. entityId points to the basket item of the order, not to the deal product row that was passed as rowId when adding the line item. To get the line item's name, price and product, look up the basket item by entityId.