[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcrm-payments\u002Favailable-products":3,"docs-tabs-entities\u002Fcrm-payments\u002Favailable-products":6},{"content":4,"lastmod":5},"\n## Product rows available for CRM payment\n\n`GET \u002Fv1\u002Fcrm-payments\u002Favailable-products`\n\nReturns the product rows of a CRM entity, such as a deal, with the quantity not yet included in payments.\n\nPass a row ID from this response as `rowId` when [adding an item to a payment](\u002Fdocs\u002Fentities\u002Fcrm-payments\u002Fproducts-add).\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `entityTypeId` (query) | number | yes | CRM entity type. For a deal, `2` |\n| `entityId` (query) | number | yes | CRM entity ID. For a deal, an ID from [`GET \u002Fv1\u002Fdeals`](\u002Fdocs\u002Fentities\u002Fdeals\u002Flist) |\n\nThe 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.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-payments\u002Favailable-products?entityTypeId=2&entityId=8761\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-payments\u002Favailable-products?entityTypeId=2&entityId=8761\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-payments\u002Favailable-products?entityTypeId=2&entityId=8761', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { data } = await res.json()\nfor (const row of data.productRows) {\n  console.log(`${row.id}: ${row.productName} — ${row.quantity} ${row.measureName} available`)\n}\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-payments\u002Favailable-products?entityTypeId=2&entityId=8761', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` on success |\n| `data.productRows` | array | Product rows of the entity |\n| `data.productRows[].id` | number | ID of the entity's product row. Pass it as `rowId` to [`POST \u002Fv1\u002Fcrm-payments\u002F:id\u002Fproducts`](\u002Fdocs\u002Fentities\u002Fcrm-payments\u002Fproducts-add) |\n| `data.productRows[].ownerId` | number | CRM entity ID |\n| `data.productRows[].ownerType` | string | CRM entity type as a letter code, `D` for a deal |\n| `data.productRows[].productId` | number | Product ID. Catalog: [`GET \u002Fv1\u002Fproducts`](\u002Fdocs\u002Fentities\u002Fproducts\u002Flist). `0` means the row has no catalog product |\n| `data.productRows[].productName` | string | Product name |\n| `data.productRows[].price` | number | Price |\n| `data.productRows[].priceAccount` | number | Price in the reporting currency |\n| `data.productRows[].priceExclusive` | number | Price excluding tax, with discount |\n| `data.productRows[].priceNetto` | number | Net price |\n| `data.productRows[].priceBrutto` | number | Gross price |\n| `data.productRows[].quantity` | number | Quantity not yet included in the entity's payments |\n| `data.productRows[].discountTypeId` | number | How the discount is set: `1` as an amount, `2` as a percentage |\n| `data.productRows[].discountRate` | number | Discount percentage |\n| `data.productRows[].discountSum` | number | Discount amount |\n| `data.productRows[].taxRate` | number \\| null | Tax rate in percent. `null` means no tax is set |\n| `data.productRows[].taxIncluded` | string | Tax included in the price: `Y` or `N` |\n| `data.productRows[].customized` | string | Row edited manually: `Y` or `N` |\n| `data.productRows[].measureCode` | number | Unit of measure code |\n| `data.productRows[].measureName` | string | Unit of measure |\n| `data.productRows[].sort` | number | Sort order |\n| `data.productRows[].xmlId` | string | External row code |\n| `data.productRows[].type` | number | Product type |\n| `data.productRows[].taxName` | string | Tax name |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"productRows\": [\n      {\n        \"id\": 2355,\n        \"ownerId\": 8761,\n        \"ownerType\": \"D\",\n        \"productId\": 0,\n        \"productName\": \"TEST item for payment\",\n        \"price\": 1500,\n        \"priceAccount\": 1500,\n        \"priceExclusive\": 1500,\n        \"priceNetto\": 1500,\n        \"priceBrutto\": 1500,\n        \"quantity\": 1,\n        \"discountTypeId\": 2,\n        \"discountRate\": 0,\n        \"discountSum\": 0,\n        \"taxRate\": null,\n        \"taxIncluded\": \"N\",\n        \"customized\": \"Y\",\n        \"measureCode\": 796,\n        \"measureName\": \"pcs\",\n        \"sort\": 0,\n        \"xmlId\": \"\",\n        \"type\": 1,\n        \"taxName\": \"No VAT\"\n      }\n    ]\n  }\n}\n```\n\n## Error response example\n\n400: `entityTypeId` holds an unknown CRM entity type:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_ENTITY_TYPE\",\n    \"message\": \"This CRM entity type has no payable product rows.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 200 | `Warning: 299` | The filter is ignored by default; previous data is preserved and the warning is sent in the `Warning` header. |\n| 400 (strict mode only) | `UNSUPPORTED_FILTER` | The server mode is disabled by default; until it is enabled, the endpoint preserves HTTP 200 and the previous data. |\n| 400 | `MISSING_REQUIRED_FIELDS` | `entityTypeId` or `entityId` is missing, or the value is not a positive integer |\n| 400 | `INVALID_ENTITY_TYPE` | `entityTypeId` is not a CRM entity type, for example `999` |\n| 404 | `ENTITY_NOT_FOUND` | No CRM entity with this `entityTypeId` and `entityId` exists |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request. The reason is in `error.message` |\n| 403 | `BITRIX_ACCESS_DENIED` | The key's user has no access to the CRM entity or payment in Bitrix24 |\n| 403 | `SCOPE_DENIED` | The API key lacks the `crm` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 401 | `MISSING_API_KEY` | `X-Api-Key` is missing |\n\nFull list of common API errors: [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**The remainder is counted across all payments of the entity.** For a row with quantity `3`, of which `2` are already added to a payment, `quantity` is `1`. After that payment is deleted, the remainder returns to `3`.\n\n## See also\n\n- [Add an item to a payment](\u002Fdocs\u002Fentities\u002Fcrm-payments\u002Fproducts-add)\n- [Create a CRM payment](\u002Fdocs\u002Fentities\u002Fcrm-payments\u002Fcreate)\n- [Deal product rows](\u002Fdocs\u002Fentities\u002Fdeals\u002Fproducts-get)\n- [CRM payments](\u002Fdocs\u002Fentities\u002Fcrm-payments)\n","2026-10-23",{},1794739356493]