Update a delivery option
PATCH
/delivery-options/{id}
const url = 'https://example.com/delivery-options/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f';const options = { method: 'PATCH', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"name":"example","minDays":1,"maxDays":1,"pricePence":1,"sortOrder":1,"archived":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/delivery-options/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f \ --header 'Content-Type: application/json' \ --cookie bottle.session_token=<bottle.session_token> \ --data '{ "name": "example", "minDays": 1, "maxDays": 1, "pricePence": 1, "sortOrder": 1, "archived": true }'Orders already taken keep the days and charge they were sold under. Archiving hides an option from the order form; it stays on the orders that named it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
minDays
integer
maxDays
integer
pricePence
integer
sortOrder
integer
archived
boolean
Examplegenerated
{ "name": "example", "minDays": 1, "maxDays": 1, "pricePence": 1, "sortOrder": 1, "archived": true}Responses
Section titled “Responses”The option as it now stands
Media typeapplication/json
object
id
required
UUID v7
string format: uuid
name
required
string
minDays
required
integer
maxDays
required
integer
pricePence
required
integer
sortOrder
required
integer
archivedAt
required
string | null format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "name": "Next day"}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}No such option
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}