Delivery zones
Check delivery zone coverage
Checks whether a coordinate falls inside any active delivery zone of a connected location and returns the matching zone and delivery fee.
Esta página aún no está disponible en tu idioma.
https://api.maple.inc/v1/locations/{locationId}/delivery_zones/checkAPI keyChecks 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
locationIdstring required
Request body
application/json, required.
-
latitudenumber required -
longitudenumber required
Responses
200 OK
-
objectstring requiredAlways
delivery_zone_check. -
in_zoneboolean required -
zoneobject or null required -
zone.objectstring requiredAlways
delivery_zone. -
zone.idstring required -
zone.location_idstring required -
zone.namestring required -
zone.zone_typestring requiredOne of
polygon,circle. -
zone.polygonobject requiredA GeoJSON Polygon. Coordinates are
[longitude, latitude]rings; the first ring must be closed. -
zone.polygon.typestring requiredAlways
Polygon. -
zone.polygon.coordinates[number, number][][] required -
zone.radius_milesnumber or null required -
zone.delivery_fee_centsnumber required -
zone.min_order_centsnumber or null required -
zone.max_distance_milesnumber or null required -
zone.is_activeboolean required -
zone.prioritynumber required -
zone.created_atstring required -
zone.updated_atstring required -
delivery_fee_centsnumber or null required
Errors
-
400Bad request -
401Unauthorized -
403Forbidden -
404Not found -
429Too many requests
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.