oneapi
Sign in
Utile v1 / Coduri

Currency detail

A whole currency: the numeric code, the name, how many decimals it has and which countries use it as official tender.

GET
https://oneapi.ro/api/utile/v1/coduri/valute/{cod}

Path parameters

NameTypeDescriptionExample
codrequired string ISO 4217 currency code (e.g. RON).

Query parameters

This route accepts no query parameters.

How it behaves

  • A three-letter code CLDR does not know returns 404, not an empty response whose name equals the code.

What it is for

  • Find how many decimals a currency has before issuing an invoice in it.
  • Check whether a received currency code is valid.
  • See how many countries use the currency, to tell whether it is regional or national.

Response structure

All fields below live inside data.

FieldTypeDescription
valuta.cod string Code from the source code list — the key you filter on.
valuta.nume string The name, exactly as the source publishes it.
valuta.nume_en string
valuta.simbol null
valuta.zecimale integer How many decimals the currency has.
valuta.tari array The territories using it.
sursa.nume string Name of the official source.
sursa.versiune string Version of the dataset or artefact the values come from.
sursa.licenta string The licence under which the source allows reuse.
sursa.observatie string What to know about the source before using the data.

Response examples

GEThttps://oneapi.ro/api/utile/v1/coduri/valute/RON
{
    "data": {
        "valuta": {
            "cod": "RON",
            "nume": "leu românesc",
            "nume_en": "Romanian Leu",
            "simbol": null,
            "zecimale": 2,
            "tari": [
                "RO"
            ]
        },
        "sursa": {
            "nume": "ICU / CLDR (Unicode Common Locale Data Repository), prin runtime-ul PHP",
            "versiune": "76.1",
            "licenta": "Unicode License.",
            "observatie": "Se actualizează la un upgrade de imagine, nu printr-un import — de aceea versiunea CLDR e în răspuns."
        }
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404negasitNo currency exists with the given code.
429cota_depasitaThe plan's monthly quota has been exceeded (see Retry-After).

All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.

{
    "eroare": {
        "cod": "negasit",
        "mesaj": "No currency exists with the given code."
    }
}