Skip to content
Maple

Delivery zones

Checks whether a coordinate falls inside any active delivery zone of a connected location and returns the matching zone and delivery fee.

POSThttps://api.maple.inc/v1/locations/{locationId}/delivery_zones/checkAPI key

Checks whether a coordinate falls inside any active delivery zone of a connected location and returns the matching zone and delivery fee. Requires delivery_zones:read and an active connection to the location.

Authorization

Send your API key as Authorization: Bearer <key>: mpk_test_… against the sandbox (https://api.staging.maple.inc/v1), mpk_live_… against production. See Authentication. The samples read the key from MAPLE_KEY and the base URL from MAPLE_BASE, as set up in the Quickstart.

Parameters

  • locationId string path required

Request body

application/json, required.

  • latitude number required

  • longitude number required

Responses

200 OK

  • object string required

    Always delivery_zone_check.

  • in_zone boolean required

  • zone object or null required

  • zone.object string required

    Always delivery_zone.

  • zone.id string required

  • zone.location_id string required

  • zone.name string required

  • zone.zone_type string required

    One of polygon, circle.

  • zone.polygon object required

    A GeoJSON Polygon. Coordinates are [longitude, latitude] rings; the first ring must be closed.

  • zone.polygon.type string required

    Always Polygon.

  • zone.polygon.coordinates [number, number][][] required

  • zone.radius_miles number or null required

  • zone.delivery_fee_cents number required

  • zone.min_order_cents number or null required

  • zone.max_distance_miles number or null required

  • zone.is_active boolean required

  • zone.priority number required

  • zone.created_at string required

  • zone.updated_at string required

  • delivery_fee_cents number or null required

Errors

  • 400 Bad request DeveloperApiBadRequest

  • 401 Unauthorized DeveloperApiUnauthorized

  • 403 Forbidden DeveloperApiForbidden

  • 404 Not found DeveloperApiNotFound

  • 429 Too many requests DeveloperApiRateLimited

Every error body names the error in _tag, explains it in message, and says where to report it in feedback. See Errors.

A 429 also sends Retry-After: Seconds to wait before retrying; also returned as retry_after in the body.