Para agentes de IA: markdown desta página — /docs-content-en/entities/crm-deliveries.md índice da documentação — /llms.txt
Os artigos da documentação estão disponíveis atualmente em inglês.
CRM deliveries
Reading the deliveries of a CRM item, such as a deal: delivery service, cost and the "shipped" mark. Creating deliveries and acting on them is covered in the Shipments section.
Bitrix24 API: crm.item.delivery.*
Scope: crm
List CRM deliveries
GET /v1/crm-deliveries
Returns all deliveries of a CRM item, such as a deal, in one call.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParameterentityTypeId (query) |
Typenumber | Requiredyes | DescriptionCRM item type, a positive integer. For a deal — 2 |
ParameterentityId (query) |
Typenumber | Requiredyes | DescriptionCRM item ID, a positive integer. For a deal — the ID from GET /v1/deals |
There is no pagination, filter or sorting: all deliveries of the item are returned, and other query parameters are ignored.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/crm-deliveries?entityTypeId=2&entityId=8847" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/crm-deliveries?entityTypeId=2&entityId=8847" \
-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-deliveries?entityTypeId=2&entityId=8847', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data, meta } = await res.json()
console.log(`Deliveries: ${meta.total}`)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-deliveries?entityTypeId=2&entityId=8847', {
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 | DescriptionThe item's deliveries. An empty array for an existing item with no deliveries |
Fielddata[].id |
Typenumber | DescriptionDelivery ID. The shipment in GET /v1/shipments/:id has the same ID |
Fielddata[].accountNumber |
Typestring | DescriptionDelivery number: the order number and a sequence number separated by / |
Fielddata[].deducted |
Typestring | DescriptionShipped flag: Y — shipped, N — not shipped |
Fielddata[].dateDeducted |
Typestring | null | DescriptionShipping time, or null until shipped |
Fielddata[].deliveryId |
Typenumber | DescriptionDelivery service ID. List: GET /v1/delivery-services |
Fielddata[].priceDelivery |
Typenumber | DescriptionDelivery cost |
Fielddata[].currency |
Typestring | DescriptionCurrency code of the cost |
Fielddata[].deliveryName |
Typestring | DescriptionDelivery service name |
Fieldmeta.total |
Typenumber | DescriptionNumber of deliveries in data |
Response example
{
"success": true,
"data": [
{
"id": 1223,
"accountNumber": "1041/2",
"deducted": "N",
"dateDeducted": null,
"deliveryId": 1,
"priceDelivery": 500,
"currency": "USD",
"deliveryName": "Courier delivery"
}
],
"meta": {
"total": 1
}
}
Error response example
400 — entityId not provided:
{
"success": false,
"error": {
"code": "MISSING_REQUIRED_FIELDS",
"message": "entityTypeId and entityId are required positive integers."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeMISSING_REQUIRED_FIELDS |
DescriptionentityTypeId or entityId not provided, or the value is not a positive integer |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionNo CRM item with these entityTypeId and entityId |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the crm scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no Bitrix24 connection |
Full list of common API errors — Errors.
Known specifics
deducted is a string here. The same delivery in GET /v1/shipments/:id returns deducted as true or false. Compare with "Y", not with true.