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
Parameterid (path) Typestring Requiredyes DescriptionCurrency 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
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionThe currency with all fields
Fielddata.id Typestring DescriptionCurrency code (USD, EUR, …)
Fielddata.amountCnt Typenumber DescriptionNumber of units for the rate
Fielddata.amount Typenumber DescriptionExchange rate
Fielddata.sort Typenumber DescriptionSort order
Fielddata.base Typeboolean DescriptionBase currency
Fielddata.fullName Typestring DescriptionName (US Dollar, $)
Fielddata.lid Typestring DescriptionID of the site the currency is bound to
Fielddata.formatString Typestring DescriptionDisplay format
Fielddata.decPoint Typestring DescriptionDecimal separator
Fielddata.thousandsSep Typestring DescriptionThousands separator
Fielddata.decimals Typenumber DescriptionDecimal places
Fielddata.dateUpdate Typedatetime DescriptionDate of the last update
Fielddata.lang Typeobject DescriptionPer-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
HTTP404 CodeENTITY_NOT_FOUND DescriptionCurrency not found
HTTP403 CodeSCOPE_DENIED DescriptionAPI key does not have the crm scope
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is missing

Full list of errors — Errors.

See also