Zones API

Lookup assets using zone intersection.
  1. General
  2. Importing multiple zones
  3. Updating multiple Zones
  4. Remove all zones
  5. List your zones
  6. Get a single zone using it’s id
  7. Delete a single zone using it’s id
  8. Data Types
    1. Zone
    2. ZoneList
    3. Message


The general principle is that sometimes searching assets using crowfly distance is not good enough.

For example to search the restaurant that will do the delivery for a specified address, each restaurant has a delivery zone and for topological or business reasons it’s not always the nearest restaurant in charge of your delivery.

The Zones api allows you to associate a delivery zone to each of the restaurants.

You specify the zone=true argument in the search query, and you will get the stores that have a zone intersecting your point.

$ http{YOUR_PUBLIC_KEY}&lat={latitude}&lng={longitude}&zone=true

Importing multiple zones

Importing Zones.

POST /zones

application/json : ZoneList

the zone_id must be unique for a given project.

Request body exemple

    "zones": [
            "zone_id": " a_zone_id",
            "store_id": "a_store_id",
            "polygon": "POLYGON((3.879429393916439 43.60530443381857,3.880003386645626 43.606256108720885,3.880352073817562 43.605211207712344,3.8804379045060386 43.60512963475087,3.880207234530758 43.60505971498156,3.8801857768586387 43.60502087063016,3.879429393916439 43.60530443381857))",
            "types": ["delivery"]

Updating multiple Zones

Update multiple Zones. The zones must exists to be updated.

method: PUT

application/json : ZoneList

Remove all zones

Remove Zones
method: DELETE

List your zones

List all zones for the current project, sorted by zone_id.

GET /zones


name description
limit limit
offset offset

Response application/json: ZoneList

Get a single zone using it’s id

GET /zones/:zone_id

Response application/json : Zone

Delete a single zone using it’s id

DELETE /zones/:zone_id

Response application/json : Message

Data Types


Type: Object

property type description
store_id String required
zone_id String required
polygon WKTString required
description String? optional
types Array.<String>? optional


    "store_id": "1",
    "zone_id": "1",
    "polygon": "POLYGON(...)",
    "description": "Delivery Zone for store 1",
    "types": ["delivery"]


Type: Object

property type description
zones Array.<Zone> the zones list


    "zones": [
            "zone_id": "zone_1",


Type: Object

property type description
message String the error message
status String the status as string
Was this article helpful?
Have more questions? Submit a request