oneapi
Sign in
Locations v1 / Geometrie & hărți

Geometry of an administrative unit

The official (ANCPI) polygon of the administrative unit (cod_siruta) as GeoJSON. ?simplificat=1 = a small payload.

GET
https://oneapi.ro/api/locations/v1/uat/{cod}/geometrie

Path parameters

NameTypeDescriptionExample
codrequired string SIRUTA code of the administrative-territorial unit (e.g. 54975 for Cluj-Napoca).

Query parameters

NameTypeDescriptionAccepted values
simplificatoptional string | null Geometry with fewer points. e.g. 1

How it behaves

  • The unit's official ANCPI polygon, as GeoJSON. ?simplificat=1 for a small payload.

What it is for

  • Drawing a commune's or town's boundary on a map, as a visual delivery zone.
  • Local point-in-polygon: download the unit's polygon once and test points on the client.
  • Defining a geofence for a coverage or pricing zone.

Response structure

FieldTypeDescription
data.cod string The entity code (the public key of that level).opțional
data.cod_siruta integer The unit's public key (SIRUTA).opțional
data.nume string The name of the entity.
data.simplificat boolean The polygon returned is the simplified one (fewer points), not the full one.
data.geometrie object GeoJSON geometry (MultiPolygon): type + coordinates.
data.geometrie.type string The GeoJSON geometry type (Polygon or MultiPolygon).
data.geometrie.coordinates[] mixed The polygon's coordinates, in GeoJSON order (lng, lat).
meta.actualizat object Prospețimea datelor pe domenii (dată ISO 8601).

Response examples

Coordonatele sunt scurtate aici.

GEThttps://oneapi.ro/api/locations/v1/uat/54975/geometrie?simplificat=1
{
    "data": {
        "cod_siruta": 54975,
        "nume": "Cluj-Napoca",
        "simplificat": true,
        "geometrie": {
            "type": "MultiPolygon",
            "coordinates": [
                [
                    [
                        [
                            23.621322321,
                            46.860083492
                        ]
                    ]
                ]
            ]
        }
    },
    "meta": {
        "actualizat": {
            "administrativ": "2026-08-15T16: 39: 14+03: 00",
            "geo": null
        }
    }
}

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 administrative unit does not exist.
422validareA parameter failed validation (simplificat); detalii says which and why.
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": "A parameter failed validation (simplificat); detalii says which and why.",
        "detalii": {
            "cod": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}