API

DeliveryZone

A store's delivery zones, replaced as a set.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
PUT /v1/stores/{storeId}/delivery-zones update No Content

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

updated, err := client.DeliveryZone(nil).Update(map[string]any{"store_id": "example", "delivery_zones": []any{}}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)

Lua

Construct client as shown in the Lua setup, then call the operations:

local updated, err = client:DeliveryZone():update({ store_id = "example", delivery_zones = {} })

PHP

Construct client as shown in the PHP setup, then call the operations:

$updated = $client->DeliveryZone()->update(["store_id" => "example", "delivery_zones" => []]);

Python

Construct client as shown in the Python setup, then call the operations:

updated = client.DeliveryZone().update({"store_id": "example", "delivery_zones": []})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

updated = client.DeliveryZone.update({ "store_id" => "example", "delivery_zones" => [] })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const updated = await client.DeliveryZone().update({ store_id: "example", delivery_zones: [] })

Fields

Field Type Required Description
delivery_zones array No Delivery Zones

update

PUT /v1/stores/{storeId}/delivery-zones

Operation ID: PUT/v1/stores/{storeId}/delivery-zones.

Authentication: oauth2 (AccessToken).

Parameters

Parameter In Type Required Description
storeId path string Yes Store Identifier

Request body

application/json

Property Type Required Description
[].charge integer Yes Charge for delivery to this zone - specified in the lowest denominiation (eg pence/cents)
[].circle object No
[].circle.point array of number Yes A longitude, latitude point
[].circle.radius number Yes Defines the size of the circle
[].free_delivery_above integer Yes Delivery free if order is above this value - specified in the lowest denominiation (eg pence/cents)
[].minimum_order integer Yes Minimum order value for delivery in this zone - specified in the lowest denominiation (eg pence/cents)
[].name string Yes Display name of this zone
[].polygon object No
[].polygon.points array of array of number Yes Defines a polygon as a series of points. The first and last point should be the same and the polygon should be plotted anti-clockwise around the represented area.
[].priority integer Yes Priority of this zone in the case of overlapping zones

Responses

204: No Content
400: Bad Request

application/json

Property Type Required Description
error string Yes 400 Bad Request is the status code that indicates the server cannot or will not process the request due to something that is perceived to be a client error
401: Unauthorized

application/json

Property Type Required Description
error string Yes 401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials.
403: Forbidden

application/json

Property Type Required Description
error string Yes 403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource.
429: Too Many Requests

application/json

Property Type Required Description
error string Yes 429 Too Many Requests is the status code that indicates the client application has surpassed its rate limit, or number of requests they can send in a given period of time