oneapi
Sign in
Utile v1 / Coduri

Country codes

The ISO 3166-1 country list, with alpha-2, alpha-3, the numeric code and the name in Romanian and English. The base for any country field.

GET
https://oneapi.ro/api/utile/v1/coduri/tari

Query parameters

NameTypeDescriptionAccepted values
continentoptional string | null Filter: Africa, America, Asia, Europa, Oceania, Antarctica. AfricaAmericaAsiaEuropaOceaniaAntarctica
valutaoptional string | null Filter to countries using the given currency (ISO 4217 code, e.g. EUR). max 3 car.

How it behaves

  • The list includes XK (Kosovo), which is a private-use code rather than official ISO 3166-1 but is used everywhere in practice. Retired codes (SU, YU, ZR, DD) and groupings that are not countries (EU, ZZ) are excluded.
  • The weekend is not Saturday+Sunday everywhere. In Saudi Arabia and Israel it is Friday+Saturday; in India it is Sunday only. weekend and prima_zi_saptamana come from CLDR and are exactly what the holidays zone uses when counting working days.
  • Day numbers are ISO 8601: 1 = Monday, 7 = Sunday. CLDR counts from Sunday; the translation happens here, so two conventions do not circulate.
  • The data comes from ICU/CLDR, which ships with the runtime. It moves with an image upgrade rather than an import — hence the CLDR version in the response.

What it is for

  • Populate a country picker with names in Romanian rather than English.
  • Translate between alpha-2, alpha-3 and numeric codes when integrating two systems that use different forms.
  • Find out which days are the weekend in a country, before scheduling deliveries or shifts.

Response structure

All fields below live inside data.

FieldTypeDescription
inregistrari integer How many records the response holds.
tari[].alpha_2 string The two-letter code (RO).
tari[].alpha_3 string The three-letter code (ROU).
tari[].numeric string The numeric code (642).
tari[].nume string The name in Romanian.
tari[].nume_en string The name in English.
tari[].continent string The continent, from the UN M49 tree.
tari[].valuta string Official currency code, or null for territories without their own.
tari[].prima_zi_saptamana integer Which day the week starts on, ISO 8601 (1 in Romania, 7 in the US).
tari[].weekend array The weekend days, as ISO numbers.
observatie string A note on how to read the response: a computation convention or a limit of the data.
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/tari
{
    "data": {
        "inregistrari": 251,
        "tari": [
            {
                "alpha_2": "AD",
                "alpha_3": "AND",
                "numeric": "020",
                "nume": "Andorra",
                "nume_en": "Andorra",
                "continent": "Europa",
                "valuta": "EUR",
                "prima_zi_saptamana": 1,
                "weekend": [
                    6,
                    7
                ]
            }
        ],
        "observatie": "Lista conține și XK (Kosovo), care e cod de uz privat, nu ISO 3166-1 oficial, dar e folosit peste tot în practică. Codurile ieșite din uz (SU, YU, ZR) sunt excluse.",
        "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.
422validareAn undeclared parameter or a value that fails validation (continent, valuta). The offending field is in detalii.
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": "validare",
        "mesaj": "An undeclared parameter or a value that fails validation (continent, valuta). The offending field is in detalii.",
        "detalii": {
            "continent": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}