## Currency localization fields

`GET /v1/currencies/:id/localizations/fields`

Describes the currency name and amount format settings for each language. Use this reference before writing localizations.

Scope: `crm`. A key in `READONLY` mode is accepted.

## Parameters

| Parameter | Type | Required | Default | Description |
|----------|-----|:-----:|-----------|----------|
| `id` (path) | string | yes | — | Currency code from the [currency list](/docs/entities/currencies/list). The metadata is shared by all currencies; the code's existence is not checked |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/currencies/QVC/localizations/fields" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/currencies/QVC/localizations/fields" \
  -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/currencies/QVC/localizations/fields', {
  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/currencies/QVC/localizations/fields', {
  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 | Map of localization field metadata |
| `data.fullName` | object | Full currency name. Setting metadata |
| `data.fullName.bitrixName` | string | Source field name: `FULL_NAME` |
| `data.fullName.type` | string | Value type: `string` |
| `data.fullName.readonly` | boolean | `false` — the setting can be passed on write |
| `data.formatString` | object | Amount display template, `#` is the placeholder for the number. Setting metadata |
| `data.formatString.bitrixName` | string | Source field name: `FORMAT_STRING` |
| `data.formatString.type` | string | Value type: `string` |
| `data.formatString.readonly` | boolean | `false` — the setting can be passed on write |
| `data.decPoint` | object | Decimal separator. Setting metadata |
| `data.decPoint.bitrixName` | string | Source field name: `DEC_POINT` |
| `data.decPoint.type` | string | Value type: `string` |
| `data.decPoint.readonly` | boolean | `false` — the setting can be passed on write |
| `data.thousandsVariant` | object | Thousands separator variant. Setting metadata |
| `data.thousandsVariant.bitrixName` | string | Source field name: `THOUSANDS_VARIANT` |
| `data.thousandsVariant.type` | string | Value type: `string` |
| `data.thousandsVariant.readonly` | boolean | `false` — the setting can be passed on write |
| `data.thousandsSep` | object | Thousands separator character. Setting metadata |
| `data.thousandsSep.bitrixName` | string | Source field name: `THOUSANDS_SEP` |
| `data.thousandsSep.type` | string | Value type: `string` |
| `data.thousandsSep.readonly` | boolean | `false` — the setting can be passed on write |
| `data.decimals` | object | Number of digits after the decimal separator. Setting metadata |
| `data.decimals.bitrixName` | string | Source field name: `DECIMALS` |
| `data.decimals.type` | string | Value type: `number` |
| `data.decimals.readonly` | boolean | `false` — the setting can be passed on write |
| `data.hideZero` | object | Hide trailing zeros in the fractional part. Setting metadata |
| `data.hideZero.bitrixName` | string | Source field name: `HIDE_ZERO` |
| `data.hideZero.type` | string | Value type: `boolean` |
| `data.hideZero.readonly` | boolean | `false` — the setting can be passed on write |

## Response example

```json
{
  "success": true,
  "data": {
    "fullName": {
      "bitrixName": "FULL_NAME",
      "type": "string",
      "readonly": false
    },
    "formatString": {
      "bitrixName": "FORMAT_STRING",
      "type": "string",
      "readonly": false
    },
    "decPoint": {
      "bitrixName": "DEC_POINT",
      "type": "string",
      "readonly": false
    },
    "thousandsVariant": {
      "bitrixName": "THOUSANDS_VARIANT",
      "type": "string",
      "readonly": false
    },
    "thousandsSep": {
      "bitrixName": "THOUSANDS_SEP",
      "type": "string",
      "readonly": false
    },
    "decimals": {
      "bitrixName": "DECIMALS",
      "type": "number",
      "readonly": false
    },
    "hideZero": {
      "bitrixName": "HIDE_ZERO",
      "type": "boolean",
      "readonly": false
    }
  }
}
```

## Error response example

403 — the key has no `crm` scope:

```json
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This endpoint requires 'crm' scope",
    "hint": "This request needs the 'crm' scope, which the calling key does not carry. Add 'crm' to this key in the developer cabinet (or through the management API), then repeat the call.",
    "cause": "key_scope_missing",
    "requiredScope": "crm",
    "keyScopes": [
      "task",
      "im"
    ],
    "fix": {
      "action": "edit_key_scopes",
      "via": "cabinet"
    },
    "userMessage": "The app's API key lacks the “CRM” permission. You can add it in the key settings in the developer cabinet."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the reference request |
| 403 | `BITRIX_ACCESS_DENIED` | The user has no permission for the operation in Bitrix24 |
| 403 | `SCOPE_DENIED` | The API key has no `crm` scope |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `TOKEN_MISSING` | The API key has no configured Bitrix24 tokens |
| 502 | `BITRIX_RESPONSE_INVALID` | A response with an unexpected structure was received |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable |

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

## See also

- [Set currency localizations](/docs/entities/currencies/localizations/set)
- [Get currency localizations](/docs/entities/currencies/localizations/get)
- [Delete currency localizations](/docs/entities/currencies/localizations/delete)
