For AI agents: markdown of this page — /docs-content-en/entities/currencies/fields.md documentation index — /llms.txt

Currency fields

GET /v1/currencies/fields

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

Examples

curl — personal key

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

curl — OAuth application

Terminal
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 Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionCurrency field descriptions and the operations available in batch mode
Fielddata.fields Typeobject DescriptionMap of currency fields. The key is the field name as it appears in API responses; the value is its description
Fielddata.batch Typearray DescriptionOperations available in a batch request: create, update, delete

Each field in the fields map is described by its type, the readonly flag, a label and a description. The label and description values are returned in English. Request headers do not switch the language.

Currency fields in the fields map:

Field Type RO Description
Fieldid Typestring RO DescriptionCurrency code (USD, EUR, …). Set when the currency is created
Fieldamount Typenumber RO DescriptionExchange rate
FieldamountCnt Typenumber RO DescriptionNumber of units for the rate
Fieldbase Typeboolean RO DescriptionBase currency
Fieldsort Typenumber RO DescriptionSort order
FieldfullName Typestring RO DescriptionName ($, €)
FieldformatString Typestring RO DescriptionDisplay format
FielddecPoint Typestring RO DescriptionDecimal separator
FieldthousandsSep Typestring RO DescriptionThousands separator
Fielddecimals Typenumber RO DescriptionDecimal places
Fieldlid Typestring ROyes DescriptionID of the site the currency is bound to
FielddateUpdate Typedatetime ROyes DescriptionDate of the last update
Fieldlang Typeobject ROyes DescriptionPer-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

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 POST /v1/currencies and GET /:id. Absent from list." }
    },
    "batch": ["create", "update", "delete"]
  }
}

Error response example

403 — the API key lacks the 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
HTTP403 CodeSCOPE_DENIED DescriptionAPI key does not have the crm scope
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is missing
HTTP429 CodeRATE_LIMITED DescriptionRate limit exceeded: 300 requests per minute per portal. All API keys of the portal share one limit. The current limit is returned in the x-ratelimit-limit header. Retry after the delay in the Retry-After header

For the full list of errors, see Errors.

See also