Check an address
Checks a structured address against its country's rules: which fields are required there, what shape the postcode takes, whether the subdivision exists. It does not check that the address exists on the ground.
Request body
Sent as JSON in the request body (Content-Type: application/json) — not in the query string.
{
"tara": "RO",
"nume": "Ion Popescu",
"strada": "Str. Memorandumului 28",
"localitate": "Cluj-Napoca",
"cod_postal": "400114"
}
{
"tara": "RO",
"strada": "x",
"localitate": "Cluj-Napoca",
"cod_postal": "4001"
}
{
"tara": "DE",
"strada": "Unter den Linden 1",
"localitate": "Berlin",
"cod_postal": "10117"
}
Query parameters
How it behaves
- POST, with the address in the body (JSON):
tara(required, ISO alpha-2),nume,organizatie,strada,subzona(district, sector),localitate,regiune(county, state, province),cod_postal,cod_sortare(CEDEX in France). The recipient name and the address are personal data: in a URL they would end up in access logs, in caches and in the referrer of any page calling the route — so aGETgets405 metoda_nepotrivita. Nothing is retained. - This checks FORM, not existence. It confirms that the fields the country requires are filled, that the postal-code pattern matches, and that the region is a recognised one. It does NOT confirm the address exists on the ground — that would need each country's postal register.
- The postal-code pattern is anchored before comparison. The source gives it without anchors, and used as-is,
12would pass for Romania because it would match inside a longer string. - The region is compared without diacritics: "Timis" finds "Timiș". It only checks that it is a REAL subdivision of the country, not that it matches the locality — that would need a locality→county mapping, which the source does not have.
- For Romania, if you need checking against real data — that the street exists in that locality, with that postal code — use
/locations/v1/validare/adresa, which rests on the official nomenclature. adresa_formatatais returned even when the address is invalid, so you can see how it would look. Missing fields leave empty lines, which are dropped, and orphaned separators (stray commas) are cleaned up.
What it is for
- Check at checkout whether the address entered is complete for the chosen country, before accepting the order.
- Clean an address import, flagging rows whose postal code does not match the country pattern.
- Compose the formatted address for a label, in the country's correct order.
Response structure
All fields below live inside data.
true only if no formal problem was found.
Response examples
body: {"tara": "RO", "nume": "Ion Popescu", "strada": "Str. Memorandumului 28", "localitate": "Cluj-Napoca", "cod_postal": "400114"}
{
"data": {
"tara": "RO",
"valida": true,
"probleme": [],
"adresa_formatata": [
"Ion Popescu",
"STR. MEMORANDUMULUI 28",
"400114 CLUJ-NAPOCA"
],
"observatie": "Verificarea e de FORMĂ: câmpuri cerute, tiparul codului poștal, subdiviziune recunoscută. NU confirmă că adresa există la fața locului.",
"sursa": {
"nume": "Google libaddressinput — metadatele de adresare folosite de Chrome",
"licenta": "Apache-2.0."
}
}
}
body: {"tara": "RO", "strada": "x", "localitate": "Cluj-Napoca", "cod_postal": "4001"}
{
"data": {
"tara": "RO",
"valida": false,
"probleme": [
{
"camp": "cod_postal",
"problema": "nu se potrivește cu tiparul țării",
"tipar": "\\d{6}",
"exemple": [
"060274",
"061357",
"200716"
]
}
],
"adresa_formatata": [
"X",
"4001 CLUJ-NAPOCA"
],
"observatie": "Verificarea e de FORMĂ: câmpuri cerute, tiparul codului poștal, subdiviziune recunoscută. NU confirmă că adresa există la fața locului.",
"sursa": {
"nume": "Google libaddressinput — metadatele de adresare folosite de Chrome",
"licenta": "Apache-2.0."
}
}
}
body: {"tara": "DE", "strada": "Unter den Linden 1", "localitate": "Berlin", "cod_postal": "10117"}
{
"data": {
"tara": "DE",
"valida": true,
"probleme": [],
"adresa_formatata": [
"Unter den Linden 1",
"10117 Berlin"
],
"observatie": "Verificarea e de FORMĂ: câmpuri cerute, tiparul codului poștal, subdiviziune recunoscută. NU confirmă că adresa există la fața locului.",
"sursa": {
"nume": "Google libaddressinput — metadatele de adresare folosite de Chrome",
"licenta": "Apache-2.0."
}
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 404 | negasit | We hold no addressing rules for the given country. |
| 405 | eroare | metoda_nepotrivita: the route only accepts POST, with the address in the body. |
| 422 | validare | tara is missing or a field exceeds its maximum length. |
| 429 | cota_depasita | The 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": "tara is missing or a field exceeds its maximum length."
}
}