
## Get an order

`GET /v1/orders/:id`

Returns a single order by ID with all fields.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Order ID |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/orders/845" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

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

const { success, data } = await res.json()
console.log('Order:', data.accountNumber, '—', data.price, data.currency)
```

### JavaScript — OAuth application

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

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

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | object | Order with all fields. For the object structure, see [Order fields](./fields.md). Nested data is listed below |
| `data.basketItems` | array | Full [basket item](../basket-items.md) objects for this order |
| `data.payments` | array \| null | Full [payment](../payments.md) objects for this order. `null` if there are no payments |
| `data.propertyValues` | array | Order property values: full name, email, phone number, shipping address, and others. The set depends on the Bitrix24 account configuration |
| `data.clients` | array | CRM links to contacts and companies. Each item: `{entityTypeId, entityId, isPrimary, roleId, sort}` |
| `data.requisiteLink` | object \| array | Link to the recipient details. An empty array if no link is set |
| `data.tradeBindings` | array | Links to external marketplaces |

The `clients`, `payments`, `basketItems`, `propertyValues` arrays are returned only by `GET /v1/orders/:id`; they are absent from the [`GET /v1/orders`](./list.md) list response. All four are read-only. Boolean fields in nested objects are returned as `true`/`false`, including `clients[].isPrimary`, `payments[].paid`, `basketItems[].vatIncluded`, and others. Dates use the UTC format `…Z`.

## Response example

```json
{
  "success": true,
  "data": {
    "id": 845,
    "accountNumber": "443",
    "lid": "s1",
    "personTypeId": 5,
    "currency": "USD",
    "price": 100,
    "discountValue": 0,
    "taxValue": 0,
    "statusId": "N",
    "dateInsert": "2026-04-21T06:48:16.000Z",
    "dateUpdate": "2026-04-21T06:48:16.000Z",
    "dateStatus": "2026-04-21T06:48:16.000Z",
    "payed": false,
    "canceled": false,
    "marked": false,
    "deducted": false,
    "responsibleId": 1,
    "userId": 1,
    "companyId": 15,
    "clients": [
      { "entityTypeId": 3, "entityId": 2471, "isPrimary": true, "roleId": 0, "sort": 0 },
      { "entityTypeId": 4, "entityId": 15, "isPrimary": true, "roleId": 0, "sort": 0 }
    ],
    "basketItems": [
      {
        "id": 187,
        "productId": 1119,
        "name": "Pink Whirlwind Tracksuit",
        "price": 12,
        "currency": "USD",
        "quantity": 1,
        "vatRate": 0,
        "vatIncluded": true
      }
    ],
    "payments": [
      {
        "id": 117,
        "paySystemId": 11,
        "paySystemName": "Cash",
        "sum": 100,
        "currency": "USD",
        "paid": true,
        "datePaid": "2026-04-21T06:48:16.000Z"
      }
    ],
    "propertyValues": [
      { "id": 9311, "orderPropsId": 41, "code": "EMAIL", "name": "E-Mail", "value": "buyer@example.com" }
    ],
    "comments": "",
    "xmlId": "",
    "externalOrder": false
  }
}
```

## Error response example

404 — order not found:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "order is not exists"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 404 | `ENTITY_NOT_FOUND` | No order with this ID was found |
| 403 | `SCOPE_DENIED` | The API key does not have the `sale` scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |

For the full list of common API errors, see [Errors](/docs/errors).

## See also

- [Order fields](./fields.md)
- [Update an order](./update.md)
- [Delete an order](./delete.md)
- [List orders](./list.md)
- [Order basket items](../basket-items.md)
- [Order payments](../payments.md)
- [Limits and optimization](/docs/optimization)
