Update the default account settings for deliveries that apply to all customers.
Request
PATCH /account/settings/deliveries
Request properties
Any combination of these properties can be updated.
allow_delivery_comments
: Whether a top level comment is allowed when ordering.allow_product_comments
: Whether per product comments are allowed when ordering.delivery_days
: An object where keys are numbers0
(Sunday) to6
(Saturday) and values are objects with the following properties. Set tonull
to clear delivery days.lead_days
: The number of days that customers have to order in advance. Use0
for same day delivery. Required.cutoff
: The time until when orders have to be placed in the formatHH:mm
. After this timelead_days
is incremented by one. Optional, defaults to23:59
.
delivery_date_overrides
: An object where keys are ISO dates (e.g. 2023-12-26) and values are objects with the following properties. Set tonull
to clear delivery date overrides.lead_days
: The number of days that customers have to order in advance. Use0
for same day delivery. Required.cutoff
: The time until when orders have to be placed in the formatHH:mm
. After this timelead_days
is incremented by one. Optional, defaults to23:59
.
dates_with_no_delivery
: An array of dates in ISO date format. Customers cannot send orders for these dates. Set tonull
to clear the dates with no delivery.
Status codes
200
on success400
if the request is invalid
Response properties
The full account delivery settings as returned by GET /account/settings/deliveries
.
Example request
{
"allow_delivery_comments": true,
"allow_product_comments": true,
"delivery_days": {
"1": { "lead_days": 3 },
"2": { "lead_days": 1, "cutoff": "11:00" },
"3": { "lead_days": 1, "cutoff": "11:00" },
"4": { "lead_days": 1, "cutoff": "11:00" },
"5": { "lead_days": 1, "cutoff": "11:00" }
},
"delivery_date_overrides": {
"2023-12-27": {
"lead_days": 4,
"cutoff": "16:00"
}
},
"dates_with_no_delivery": ["2023-12-26"]
}