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

Get currency

GET /v1/currencies/:id

Returns a currency by code (USD, EUR, …).

Path parameters

Parameter Type Required Description
id (path) string yes Currency code, for example USD, EUR. List: GET /v1/currencies

Examples

curl — personal key

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

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/currencies/USD" \
  -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/USD', {
  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/USD', {
  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 The currency with all fields
data.id string Currency code (USD, EUR, …)
data.amountCnt number Number of units for the rate
data.amount number Exchange rate
data.sort number Sort order
data.base boolean Base currency
data.fullName string Name (US Dollar, $)
data.lid string ID of the site the currency is bound to
data.formatString string Display format
data.decPoint string Decimal separator
data.thousandsSep string Thousands separator
data.decimals number Decimal places
data.dateUpdate datetime Date of the last update
data.lang object Per-language display settings — format, name, separators. The object key is the language ID, e.g. en

Response example

The lang object is trimmed to one language.

JSON
{
  "success": true,
  "data": {
    "id": "USD",
    "fullName": "US Dollar",
    "amount": 92.5,
    "amountCnt": 1,
    "base": false,
    "sort": 200,
    "lid": "en",
    "formatString": "$#",
    "decimals": 2,
    "decPoint": ".",
    "thousandsSep": ",",
    "dateUpdate": "2024-11-12T07:20:08.000Z",
    "lang": {
      "en": {
        "FORMAT_STRING": "$#",
        "FULL_NAME": "US Dollar",
        "DEC_POINT": ".",
        "THOUSANDS_SEP": ",",
        "DECIMALS": "2",
        "THOUSANDS_VARIANT": "C",
        "HIDE_ZERO": "Y"
      }
    }
  }
}

Error response example

404 — no currency with this code:

JSON
{
  "success": false,
  "error": { "code": "ENTITY_NOT_FOUND", "message": "Not found" }
}

Errors

HTTP Code Description
404 ENTITY_NOT_FOUND Currency not found
403 SCOPE_DENIED API key does not have the crm scope
401 MISSING_API_KEY The X-Api-Key header is missing

Full list of errors — Errors.

See also