## Get an order property

`GET /v1/order-properties/:id`

Retrieves an order property definition by its ID.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Order property ID. List: [`GET /v1/order-properties`](/docs/entities/order-properties/list) |
| `select` (query) | string | no | Comma-separated fields, for example `?select=id,name,type`. Fields: [`GET /v1/order-properties/fields`](/docs/entities/order-properties/fields). Only selected fields remain in `data` |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/order-properties/125" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

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

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

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/order-properties/125', {
  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 property definition. All fields: [Order property fields](/docs/entities/order-properties/fields) |
| `meta.warnings` | array | Warnings about unknown field names in `select`, with `code`, `message`, and `field`. Included only when warnings exist |

## Response example

Main fields are shown. Full field list: [Order property fields](/docs/entities/order-properties/fields).

```json
{
  "success": true,
  "data": {
    "id": 125,
    "personTypeId": 5,
    "type": "STRING",
    "name": "Comment for the courier",
    "propsGroupId": 9,
    "code": "DELIVERY_COMMENT",
    "defaultValue": "Call before delivery",
    "settings": {
      "maxlength": 200,
      "multiline": "N",
      "size": 40
    },
    "active": false,
    "required": false
  }
}
```

## Error response example

404 — the order property was not found:

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

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `INVALID_PARAMS` | `id` is not a non-negative integer |
| 404 | `ENTITY_NOT_FOUND` | No property exists with this `id`. Error message: `property is not exists` |
| 404 | `ENTITY_NOT_FOUND` | The request completed, but no object was returned. Error message: `orderProperty <id> not found` |
| 422 | `BITRIX_ERROR` | The key's user does not have permission in Bitrix24. The Bitrix24 code is in `error.b24Code`: `200040300010` |
| 403 | `BITRIX_ACCESS_DENIED` | The portal credentials do not have the `sale` scope (`insufficient_scope`) |
| 422 | `BITRIX_ERROR` | Bitrix24 rejects the request. The reason is in `error.message` |
| 403 | `SCOPE_DENIED` | The API key does not have the `sale` scope |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `TOKEN_MISSING` | No Bitrix24 access tokens are configured |

Full list of common API errors: [Error codes](/docs/errors).

## See also

- [List order properties](/docs/entities/order-properties/list)
- [Search order properties](/docs/entities/order-properties/search)
- [Update an order property](/docs/entities/order-properties/update)
- [Order property fields](/docs/entities/order-properties/fields)
- [Order properties](/docs/entities/order-properties)
