Skip to content

Set delivery times

PUT
/addresses/{id}/hours
curl --request PUT \
--url https://example.com/addresses/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/hours \
--header 'Content-Type: application/json' \
--cookie bottle.session_token=<bottle.session_token> \
--data '{ "rules": [ { "weekday": 1, "closed": true, "opensAt": "07:30", "closesAt": "07:30", "note": "example" } ] }'

The whole set at once, replacing whatever was there. The planner holds a van that arrives early and takes a drop off the round altogether when the van would get there after the door has shut.

id
required

UUID v7

string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

Media typeapplication/json
object
rules
required
Array<object>
<= 30 items
object
weekday
integer | null
>= 1 <= 7
closed
boolean
opensAt
string | null
/^([01]\d|2[0-3]):[0-5]\d$/
Example
07:30
closesAt
string | null
/^([01]\d|2[0-3]):[0-5]\d$/
Example
07:30
note
string | null
<= 200 characters

Set

Media typeapplication/json
object
items
required
Array<object>
object
id
required

UUID v7

string format: uuid
deliveryAddressId
required

UUID v7

string format: uuid
weekday
required
integer | null
>= 1 <= 7
closed
required
boolean
opensAt
required
string | null
/^([01]\d|2[0-3]):[0-5]\d$/
closesAt
required
string | null
/^([01]\d|2[0-3]):[0-5]\d$/
note
required
string | null
Example
{
"items": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"deliveryAddressId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"opensAt": "07:30",
"closesAt": "07:30"
}
]
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not a member of that tenant

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not found

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
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}