
## Currency fields

`GET /v1/currencies/fields`

Returns a description of all entity fields with their types and attributes.

## Examples

### curl — personal key

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

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/currencies/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/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/fields', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const { success, data } = await res.json()
```


## Response fields

| Field | Type | RO | Description |
|------|-----|:--:|---------|
| `id` | string | | Currency code (USD, EUR, …). Set when the currency is created |
| `amount` | number | | Exchange rate |
| `amountCnt` | number | | Number of units for the rate |
| `base` | boolean | | Base currency |
| `sort` | number | | Sort order |
| `fullName` | string | | Name ($, €) |
| `formatString` | string | | Display format |
| `decPoint` | string | | Decimal separator |
| `thousandsSep` | string | | Thousands separator |
| `decimals` | number | | Decimal places |
| `lid` | string | yes | ID of the site the currency is bound to |
| `dateUpdate` | datetime | yes | Date of the last update |
| `lang` | object | yes | Per-language display settings — format, name, separators, keyed by language id. Returned by `POST /v1/currencies` and `GET /v1/currencies/:id`. Not returned by the `GET /v1/currencies` list |

## Response example

`GET /v1/currencies/fields` returns field descriptions under the `data.fields` key (names are camelCase, as in API responses), where each field is `{ type, readonly, label, description }`. The `label`/`description` values are returned in English. Plus `data.batch` with the list of available batch operations.

```json
{
  "success": true,
  "data": {
    "fields": {
      "id": { "type": "string", "readonly": false, "label": "Currency code", "description": "ISO 4217 currency code (USD, EUR, …). Set on creation." },
      "amount": { "type": "number", "readonly": false, "label": "Exchange rate", "description": "Exchange rate against the base currency." },
      "amountCnt": { "type": "number", "readonly": false, "label": "Rate nominal", "description": "Number of currency units the exchange rate is quoted for." },
      "base": { "type": "boolean", "readonly": false, "label": "Base currency", "description": "Whether this is the Bitrix24 account's base currency." },
      "sort": { "type": "number", "readonly": false, "label": "Sort", "description": "Sort order in the currency list." },
      "fullName": { "type": "string", "readonly": false, "label": "Name", "description": "Human-readable currency name." },
      "formatString": { "type": "string", "readonly": false, "label": "Format string", "description": "Display template for amounts in this currency (# is the number placeholder)." },
      "decimals": { "type": "number", "readonly": false, "label": "Decimal places", "description": "Number of digits shown after the decimal point." },
      "decPoint": { "type": "string", "readonly": false, "label": "Decimal point", "description": "Character used as the decimal separator." },
      "thousandsSep": { "type": "string", "readonly": false, "label": "Thousands separator", "description": "Character used to separate thousands." },
      "lid": { "type": "string", "readonly": true, "label": "Site", "description": "Identifier of the site the currency is bound to." },
      "dateUpdate": { "type": "datetime", "readonly": true, "label": "Updated at", "description": "When the currency was last updated." },
      "lang": { "type": "object", "readonly": true, "label": "Language bindings", "description": "Per-language display settings (format, name, separators), keyed by language id. Returned by GET /:id only." }
    },
    "batch": ["create", "update", "delete"]
  }
}
```

The `lang` description in this response says the field is returned by `GET /v1/currencies/:id` only. This is a known discrepancy: `lang` is also returned by `POST /v1/currencies`. The schema description will be corrected — the table above reflects the actual behavior.


## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 403 | `SCOPE_DENIED` | API key does not have the `crm` scope |
| 401 | `TOKEN_MISSING` | No API key provided |

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

## See also

- [Currencies](/docs/entities/currencies) — entity overview
- [List currencies](/docs/entities/currencies/list) — fetch currencies
