Skip to content

List standing orders

GET
/standing-orders
curl --request GET \
--url 'https://example.com/standing-orders?customerId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f' \
--cookie bottle.session_token=<bottle.session_token>

Every arrangement running, by customer. Each says when it next falls due and which days have already been written as orders.

customerId

UUID v7

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

UUID v7

Standing orders

Media typeapplication/json
Array<object>
object
id
required

UUID v7

string format: uuid
customerId
required

UUID v7

string format: uuid
customerName
required
string
deliveryAddressId
required

UUID v7

string | null format: uuid
deliveryAddressLabel
required
string | null
cadence
required

How often it comes round. weekly, fortnightly and four_weekly count from the first delivery. monthly repeats on the same date each month, moved back to the last day in a month that is too short.

string
Allowed values: weekly fortnightly four_weekly monthly
startOn
required
string format: date
endOn
required
string | null format: date
paymentMethod
required

On_account: billed later, nothing to collect. link: a payment link raised in the accounting system. cash: the driver takes it at the door.

string
Allowed values: on_account link cash
notes
required
string | null
paused
required
boolean
lines
required
Array<object>
object
id
required

UUID v7

string format: uuid
productId
required

UUID v7

string format: uuid
productName
required
string
quantity
required
integer
> 0
nextOn
required
string | null format: date
upcoming
required

Orders already generated from this arrangement, for days to come.

Array<object>
object
wantedOn
required
string format: date
orderId
required

UUID v7

string | null format: uuid
Example
[
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"deliveryAddressId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"cadence": "weekly",
"paymentMethod": "on_account",
"lines": [
{
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"productName": "19kg propane"
}
],
"upcoming": [
{
"orderId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
}
]
}
]

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"
}

Validation failed, or a line names something not sold

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"
}
]
}