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

Points in a zone (batch)

⭐ Tests which points from a list fall inside a zone — either an administrative unit (uat=cod_siruta) or a GeoJSON polygon (poligon). Filtering orders by zone, in a single call.

POST
https://oneapi.ro/api/locations/v1/puncte-in-zona

Request body

Sent as JSON in the request body (Content-Type: application/json) — not in the query string.

NameTypeDescriptionAccepted values
uatoptional integer | null The cod_siruta of the zone's administrative unit (or use poligon).
poligonoptional array | null A GeoJSON polygon (an alternative to uat).
puncterequired object[] A list of {id?, lat, lng}, at most 1000.
Within one unit Request body
{
    "uat": 54975,
    "puncte": [
        {
            "id": "centru",
            "lat": 46.7712,
            "lng": 23.6236
        },
        {
            "id": "departe",
            "lat": 44.4268,
            "lng": 26.1025
        }
    ]
}
Two points in Timișoara Request body
{
    "uat": 155243,
    "puncte": [
        {
            "id": "piata-unirii",
            "lat": 45.7565,
            "lng": 21.229
        },
        {
            "id": "aeroport",
            "lat": 45.8099,
            "lng": 21.3379
        }
    ]
}
With your own polygon, not a UAT Request body
{
    "poligon": {
        "type": "Polygon",
        "coordinates": [
            [
                [
                    23.55,
                    46.75
                ],
                [
                    23.65,
                    46.75
                ],
                [
                    23.65,
                    46.8
                ],
                [
                    23.55,
                    46.8
                ],
                [
                    23.55,
                    46.75
                ]
            ]
        ]
    },
    "puncte": [
        {
            "id": "a",
            "lat": 46.7712,
            "lng": 23.6236
        },
        {
            "id": "b",
            "lat": 44.4268,
            "lng": 26.1025
        }
    ]
}
A single point, in a commune Request body
{
    "uat": 1071,
    "puncte": [
        {
            "id": "ciugud",
            "lat": 46.028,
            "lng": 23.61
        }
    ]
}

Query parameters

This route accepts no query parameters.

How it behaves

  • Tests which points from a list fall inside a zone — either an administrative unit (uat=cod_siruta) or a GeoJSON polygon (poligon).
  • One call to filter orders by zone. Each point can carry its own id (otherwise its index is used).

What it is for

  • Filtering a batch of orders by delivery zone: you send every coordinate in one call and learn which are deliverable.
  • Bucketing customers by unit or polygon, for campaigns or for routing to the right warehouse.
  • Bulk-validating the points of a fleet or a network of sites against a defined zone.

Response structure

FieldTypeDescription
data.in_zona[] string The indices of the request's points that fall in the zone, in the order they were sent.
data.rezultate[].id string The point's id — the one you sent, otherwise its index in the list.
data.rezultate[].in_zona boolean true if the point falls in the zone.
meta.actualizat object Prospețimea datelor pe domenii (dată ISO 8601).

Response examples

body: {"uat": 54975, "puncte": [{"id": "centru", "lat": 46.7712, "lng": 23.6236}, {"id": "departe", "lat": 44.4268, "lng": 26.1025}]} — “centru” is in Cluj-Napoca, “departe” in Bucharest.

POSThttps://oneapi.ro/api/locations/v1/puncte-in-zona
{
    "data": {
        "in_zona": [
            "centru"
        ],
        "rezultate": [
            {
                "id": "centru",
                "in_zona": true
            }
        ]
    },
    "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.
422parametri_invalizipuncte or the zone (uat/poligon) is missing.
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": "parametri_invalizi",
        "mesaj": "puncte or the zone (uat/poligon) is missing."
    }
}