Locations v1 / Geometrie & hărți
Geometry of a county
The county's official (ANCPI) polygon as GeoJSON. ?simplificat=1 = a small payload for the web.
GET
https://oneapi.ro/api/locations/v1/judete/{cod}/geometrie
Path parameters
NameTypeDescriptionExample
codrequired
string
County code, two letters (e.g.
CJ). Bucharest is B.
Query parameters
NameTypeDescriptionAccepted values
simplificatoptional
string | null
Geometry with fewer points.
e.g. 1
How it behaves
- The official ANCPI polygon, as standard GeoJSON — hand it straight to Leaflet or Mapbox.
?simplificat=1cuts the payload dramatically (e.g. a county: ~1 MB → ~21 kB), ideal for the web.
What it is for
- Drawing a county's outline on a Leaflet or Mapbox map, as an administrative overlay.
- A choropleth by county: each polygon gets a colour from a metric (sales, density).
- Geographic clipping or masking — restricting a layer or a query to the county boundary.
Response structure
FieldTypeDescription
data.cod
string
The entity code (the public key of that level).opțional
data.cod_siruta
integer
The SIRUTA code (the entity's public key).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/judete/CJ/geometrie?simplificat=1
{
"data": {
"cod": "CJ",
"nume": "Cluj",
"simplificat": true,
"geometrie": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
23.595830529,
46.48709052
]
]
]
]
}
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"geo": null
}
}
}
GEThttps://oneapi.ro/api/locations/v1/judete/AB/geometrie
{
"data": {
"cod": "AB",
"nume": "Alba",
"simplificat": false,
"geometrie": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
22.811951729,
46.568869031
]
]
]
]
}
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"geo": null
}
}
}
GEThttps://oneapi.ro/api/locations/v1/judete/CJ/geometrie
{
"data": {
"cod": "CJ",
"nume": "Cluj",
"simplificat": false,
"geometrie": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
24.022721145,
47.361963181
]
]
]
]
}
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"geo": null
}
}
}
GEThttps://oneapi.ro/api/locations/v1/judete/B/geometrie
{
"data": {
"cod": "B",
"nume": "București",
"simplificat": false,
"geometrie": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
26.10083726,
44.54079319
]
]
]
]
}
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"geo": null
}
}
}
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 county does not exist. |
| 422 | validare | A parameter failed validation (simplificat); detalii says which and why. |
| 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": "A parameter failed validation (simplificat); detalii says which and why.",
"detalii": {
"cod": [
"The value sent does not satisfy the parameter rule."
]
}
}
}