Delivery zones
Update delivery zone
Updates a delivery zone belonging to a connected location; only the provided fields change.
此内容尚不支持你的语言。
https://api.maple.inc/v1/locations/{locationId}/delivery_zones/{zoneId}API keyUpdates a delivery zone belonging to a connected location; only the provided fields change. Zones synced from a POS (such as Linga) cannot be updated; change them in the POS. Requires delivery_zones:write 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 -
zoneIdstring required
Request body
application/json, required.
-
namestring or null -
polygonobject or null -
polygon.typestring requiredAlways
Polygon. -
polygon.coordinates[number, number][][] required -
delivery_fee_centsnumber or null -
min_order_centsinteger or null -
max_distance_milesnumber or null -
is_activeboolean or null -
prioritynumber or null -
zone_typestring or null -
radius_milesnumber or null
Responses
200 OK
A delivery zone. delivery_fee_cents and min_order_cents are integer USD cents; created_at / updated_at are ISO 8601 timestamps.
-
objectstring requiredAlways
delivery_zone. -
idstring required -
location_idstring required -
namestring required -
zone_typestring requiredOne of
polygon,circle. -
polygonobject requiredA GeoJSON Polygon. Coordinates are
[longitude, latitude]rings; the first ring must be closed. -
polygon.typestring requiredAlways
Polygon. -
polygon.coordinates[number, number][][] required -
radius_milesnumber or null required -
delivery_fee_centsnumber required -
min_order_centsnumber or null required -
max_distance_milesnumber or null required -
is_activeboolean required -
prioritynumber required -
created_atstring required -
updated_atstring 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.