## Get a unit of measure

`GET /v1/catalog-measures/:id`

Returns a single catalog unit of measure by its ID.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Unit of measure identifier, a non-negative integer. List: [`GET /v1/catalog-measures`](/docs/entities/catalog-measures/list) |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/catalog-measures/9" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

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

const { success, data } = await res.json()
console.log('Measure:', data.measureTitle ?? data.symbolIntl, '— code', data.code)
```

### JavaScript — OAuth application

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

const { success, data } = await res.json()
console.log('Measure:', data.measureTitle ?? data.symbolIntl, '— code', data.code)
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data.id` | number | Unit of measure identifier. Pass it in a product's `measure` field |
| `data.code` | number | Unit code in the Russian National Classifier of Units of Measurement (OKEI), an integer. Unique within the Bitrix24 account |
| `data.measureTitle` | string \| null | Unit of measure name. Can be `null` — the designation is then set in `symbolIntl` and `symbolLetterIntl` |
| `data.symbol` | string \| null | Short designation |
| `data.symbolIntl` | string \| null | International designation |
| `data.symbolLetterIntl` | string \| null | International letter designation |
| `data.isDefault` | string | Whether this is the default unit in the Bitrix24 account: `Y` or `N` |

## Response example

```json
{
  "success": true,
  "data": {
    "code": 796,
    "id": 9,
    "isDefault": "Y",
    "measureTitle": null,
    "symbol": null,
    "symbolIntl": "pc. 1",
    "symbolLetterIntl": "PCE. NMB"
  }
}
```

## Error response example

404 — no unit of measure with this `id`:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "measure does not exist."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 404 | `ENTITY_NOT_FOUND` | No unit of measure with this `id` exists in the Bitrix24 account, including a deleted one |
| 400 | `INVALID_PARAMS` | `id` is not a non-negative integer, for example `abc`. The request is rejected before execution, and no data in the Bitrix24 account changes |
| 403 | `SCOPE_DENIED` | The API key lacks the `catalog` scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |

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

## See also

- [List units of measure](/docs/entities/catalog-measures/list)
- [Update a unit of measure](/docs/entities/catalog-measures/update)
- [Delete a unit of measure](/docs/entities/catalog-measures/delete)
- [Unit of measure fields](/docs/entities/catalog-measures/fields)
- [Catalog products](/docs/entities/catalog-products)
- [Limits and optimization](/docs/optimization)
