oneapi
Sign in
Locations v1 / Ierarhie & dropdown-uri

Type dictionaries

The code→name dictionaries for the types exposed as raw codes elsewhere in the API (unit type, locality type, urban/rural, street type). Interfaces fetch them once and map locally.

GET
https://oneapi.ro/api/locations/v1/nomenclatoare/tipuri

Query parameters

This route accepts no query parameters.

How it behaves

  • The counterpart of the „raw codes everywhere" decision: here you fetch the names for tip/mediu once and map them locally.

What it is for

  • Populating UI filters and legends by mapping raw codes (tip/mediu) to names.
  • Translating codes from responses (e.g. unit type) into readable labels, fetched once.
  • Validating tip values locally before sending filters to the API.

Response structure

All fields below live inside data.

FieldTypeDescription
tip_uat[] array The types of administrative-territorial unit (municipality, town, commune), with code and name.
tip_uat[].cod string municipiu | oras | comuna.
tip_uat[].denumire string Denumirea lizibilă.
tip_localitate[] array The locality types (seat, belonging village, component village).
tip_localitate[].cod string sat | localitate_componenta | resedinta_oras | resedinta_municipiu | sector.
tip_localitate[].denumire string Denumirea lizibilă.
mediu[] array Area type: urban or rural.
mediu[].cod string urban | rural.
mediu[].denumire string Denumirea lizibilă.
tip_strada[] array Thoroughfare types (street, boulevard, alley, way…), with the abbreviation used in the nomenclature.
tip_strada[].cod string Cod normalizat (strada, bulevard…).
tip_strada[].denumire string Denumirea lizibilă.
*[].cod The raw code, exactly as it appears in the module's other responses.
*[].denumire What the code means. This route exists precisely so it needn't be guessed from a response.

Response examples

GEThttps://oneapi.ro/api/locations/v1/nomenclatoare/tipuri
{
    "data": {
        "tip_uat": [
            {
                "cod": "municipiu",
                "denumire": "Municipiu"
            }
        ],
        "tip_localitate": [
            {
                "cod": "resedinta_municipiu",
                "denumire": "Reședință de municipiu"
            }
        ],
        "mediu": [
            {
                "cod": "urban",
                "denumire": "Urban"
            }
        ],
        "tip_strada": [
            {
                "cod": "alee",
                "denumire": "Alee"
            }
        ]
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422validareThe route takes no parameters apart from lang: any other parameter returns 422 instead of being ignored.
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": "The route takes no parameters apart from lang: any other parameter returns 422 instead of being ignored."
    }
}