## Get a CRM delivery

`GET /v1/crm-deliveries/:id`

Returns a single delivery of a CRM object by ID, for example a deal delivery from its list of deliveries.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Delivery ID. List of an object's deliveries: [`GET /v1/crm-deliveries`](./list.md). The matching shipment in [`GET /v1/shipments`](/docs/entities/shipments/list) has the same ID |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/crm-deliveries/1223" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/crm-deliveries/1223" \
  -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/crm-deliveries/1223', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { data } = await res.json()
console.log(data.deliveryName, data.priceDelivery)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-deliveries/1223', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | `true` on success |
| `data.id` | number | Delivery ID |
| `data.accountNumber` | string | Delivery number: the order number and the sequence number separated by `/` |
| `data.priceDelivery` | number | Delivery cost |
| `data.currency` | string | Currency code of the delivery cost |
| `data.deducted` | string | Shipped flag: `Y` — shipped, `N` — not shipped |
| `data.dateDeducted` | string \| null | Shipping time, or `null` until shipped |
| `data.deliveryId` | number | Delivery service ID. List: [`GET /v1/delivery-services`](/docs/entities/delivery-services/list) |
| `data.deliveryName` | string | Delivery service name |

## Response example

```json
{
  "success": true,
  "data": {
    "id": 1223,
    "accountNumber": "1041/2",
    "priceDelivery": 500,
    "currency": "USD",
    "deducted": "N",
    "dateDeducted": null,
    "deliveryId": 1,
    "deliveryName": "Courier delivery"
  }
}
```

## Error response example

404 — no delivery with this ID:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Delivery has not been found"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_ID` | `id` is not a positive integer |
| 404 | `ENTITY_NOT_FOUND` | No delivery with this `id` |
| 403 | `SCOPE_DENIED` | The key lacks the `crm` scope |
| 401 | `TOKEN_MISSING` | The key has no Bitrix24 connection |

Full list of common API errors — [Errors](/docs/errors).

## See also

- [List CRM deliveries](./list.md)
- [Get a shipment](/docs/entities/shipments/get)
- [CRM deliveries](../crm-deliveries.md)
