Locations v1 / Coduri poștale
Postcodes of a locality
The paginated list of a locality's postal codes (identified by cod_siruta), each with the street it covers (null at locality level).
GET
https://oneapi.ro/api/locations/v1/localitati/{cod}/coduri-postale
Path parameters
NameTypeDescriptionExample
codrequired
string
SIRUTA code of the locality (e.g.
54984).
Query parameters
This route accepts no query parameters.
How it behaves
- Urban = many codes (one per street), rural = a single one. That is why it is paginated.
What it is for
- Suggesting valid postal codes once the user has picked the locality (a code dropdown in urban areas).
- Reverse validation: checking that a code the user typed belongs to the selected locality.
- Building the street → code map for an urban locality, for shipping labels.
Response structure
FieldTypeDescription
data[].cod_postal
string
The postal code.
data[].strada
string | null
The street covered (null at locality level).
data[].nivel
string
What the code applies to: the whole locality or a street.
meta.paginare.pagina
integer
Pagina curentă.
meta.paginare.per_pagina
integer
Rezultate pe pagină.
meta.paginare.total
integer
Total rezultate.
meta.paginare.pagini
integer
Număr de pagini.
meta.actualizat
object
Prospețimea datelor pe domenii (dată ISO 8601).
Response examples
GEThttps://oneapi.ro/api/locations/v1/localitati/54984/coduri-postale
{
"data": [
{
"cod_postal": "400326",
"strada": "1 Decembrie 1918",
"nivel": "strada"
}
],
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"adrese": "2026-10-04T19: 50: 09+03: 00"
},
"paginare": {
"pagina": 1,
"per_pagina": 20,
"total": 218,
"pagini": 11
}
}
}
GEThttps://oneapi.ro/api/locations/v1/localitati/179196/coduri-postale
{
"data": [
{
"cod_postal": "061621",
"strada": "1 Mai",
"nivel": "strada"
}
],
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"adrese": "2026-10-04T19: 50: 09+03: 00"
},
"paginare": {
"pagina": 1,
"per_pagina": 20,
"total": 1069,
"pagini": 54
}
}
}
GEThttps://oneapi.ro/api/locations/v1/localitati/155252/coduri-postale
{
"data": [
{
"cod_postal": "300172",
"strada": "16 Decembrie 1989",
"nivel": "strada"
}
],
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"adrese": "2026-10-04T19: 50: 09+03: 00"
},
"paginare": {
"pagina": 1,
"per_pagina": 20,
"total": 1044,
"pagini": 53
}
}
}
GEThttps://oneapi.ro/api/locations/v1/localitati/8176/coduri-postale
{
"data": [
{
"cod_postal": "517786",
"strada": null,
"nivel": "localitate"
}
],
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"adrese": "2026-10-04T19: 50: 09+03: 00"
},
"paginare": {
"pagina": 1,
"per_pagina": 20,
"total": 1,
"pagini": 1
}
}
}
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 | The locality does not exist. |
| 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": "negasit",
"mesaj": "The locality does not exist."
}
}