oneapi
Sign in
Locations v1 / Validare adrese

Validate an address

⭐ Checks the coherence of an address (county / locality / street / postal code) and returns validity per component plus suggested corrections. Matching is by name (exact first, then fuzzy).

GET
https://oneapi.ro/api/locations/v1/validare/adresa

Query parameters

NameTypeDescriptionAccepted values
judetoptional text Maximum 100. max 100 car.
localitaterequired text Maximum 150. max 150 car.
stradaoptional text Maximum 200. max 200 car.
cod_postaloptional text Maximum 10. max 10 car.

How it behaves

  • Checks an address (county/locality/street/postal code) and returns validity per component, plus corrections.
  • Matching is by name: exact first, then fuzzy for suggestions. No street geometry is involved.

What it is for

  • Ecommerce checkout with dropdowns: validating that county, locality, street and postal code agree before the order is placed; on a wrong code you return the correct ones.
  • Invoicing: checking the coherence of the billing address before generating the document.
  • Cleaning a customer database: running the list through validation and applying the suggested corrections in bulk.

Response structure

All fields below live inside data.

FieldTypeDescription
valid boolean Adresa e coerentă în întregime.
componente object One {valid, …} object per component sent.
componente.judet.valid boolean The county was recognised in the nomenclature.
componente.localitate.valid boolean The locality was recognised, within the given county.
componente.localitate.sugestie string Cea mai apropiată localitate, la nepotrivire.
componente.strada.valid boolean The street was recognised, within the given locality.
componente.cod_postal.valid boolean The postal code is coherent with the rest of the address.
componente.cod_postal.asteptat[] string Codurile corecte, la nepotrivire.
corectii[] string Readable messages saying what does not match and what we suggest.

Response examples

GEThttps://oneapi.ro/api/locations/v1/validare/adresa?judet=CJ&localitate=Cluj-Napoca&strada=Moților&cod_postal=400001
{
    "data": {
        "valid": true,
        "componente": {
            "judet": {
                "valid": true,
                "cod": "CJ",
                "nume": "Cluj"
            },
            "localitate": {
                "valid": true,
                "cod_siruta": 54984,
                "nume": "Cluj-Napoca"
            },
            "strada": {
                "valid": true,
                "nume": "Moților"
            },
            "cod_postal": {
                "valid": true,
                "cod": "400001"
            }
        },
        "corectii": []
    },
    "meta": {
        "actualizat": {
            "administrativ": "2026-08-15T16: 39: 14+03: 00",
            "adrese": "2026-10-04T19: 50: 09+03: 00"
        }
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422parametri_invalizilocalitate is missing.
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": "parametri_invalizi",
        "mesaj": "localitate is missing.",
        "detalii": {
            "judet": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}