Zone Groups

Get Zone for Location

Finds which zone of a zone group contains a location, for example to work out a delivery area before you create an order. Pass the zone group id in the path. You can get it from GET /zone-groups.

Send location.lat and location.lng if you have them. If either is missing, the address, postcode and country are geocoded first. If the location can't be geocoded, you get 400 INVALID_INPUT.

  • If the point is inside a zone, the response is {"zone": {"id", "name", "zone_group": {"id", "name"}}}.
  • If the point is outside every zone in the group, the response is 200 with {"zone": null}.
  • If zones overlap, only one matching zone is returned.
  • If the zone group doesn't exist in this depot, or has no zones, the response is 404 RESOURCE_NOT_FOUND.
post/zone-groups/{id}/bounds/contains

Request

  • Base URL: https://api.smartroutes.io/v2
  • URL: https://api.smartroutes.io/v2/zone-groups/{id}/bounds/contains
  • Auth: none declared

Path parameters

idnumber required

ID of the zone group.

Request body

Response

Successful response

Changes

No recorded changes to this operation across all 1 revision of this API.