oneapi
Sign in
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
        }
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
404negasitThe locality does not exist.
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": "negasit",
        "mesaj": "The locality does not exist."
    }
}