Skip to content

Create a standing order

POST
/standing-orders
curl --request POST \
--url https://example.com/standing-orders \
--header 'Content-Type: application/json' \
--cookie bottle.session_token=<bottle.session_token> \
--data '{ "customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "deliveryAddressId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "cadence": "weekly", "startOn": "2026-04-15", "endOn": "2026-04-15", "paymentMethod": "on_account", "notes": "example", "lines": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "quantity": 1 } ] }'

Who, what, and how often. Orders are written from it a few days ahead, at the price agreed with that customer on the day, and each one can be changed or cancelled on its own.

Media typeapplication/json
object
customerId
required

UUID v7

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

UUID v7

string | null format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
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
string | null format: date
paymentMethod

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
string | null
<= 2000 characters
lines
required
Array<object>
>= 1 items
object
productId
required

UUID v7

string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
quantity
required
integer
> 0 <= 1000

Set up

Media typeapplication/json
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"
}

Not found

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