Skip to content

List the ids of matching orders

GET
/orders/ids
curl --request GET \
--url 'https://example.com/orders/ids?status=draft&excludeCancelled=true&excludeRefunded=true&customerId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f&unassigned=true&deliveryStage=waiting&fulfilment=delivery&shopId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f&paid=yes&late=true&sort=placed&order=asc' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token>

Every match for the same filters as GET /orders, in the same order, up to 500, with the full count: for selecting all of them across pages.

q

Customer name, order reference, invoice number or product name.

string
<= 80 characters

Customer name, order reference, invoice number or product name.

status
string
Allowed values: draft placed delivered cancelled
excludeCancelled

Exclude cancelled orders before counting and pagination.

string
Allowed values: true false

Exclude cancelled orders before counting and pagination.

excludeRefunded

Exclude orders with a full or partial shop refund or a recorded Bottle refund.

string
Allowed values: true false

Exclude orders with a full or partial shop refund or a recorded Bottle refund.

customerId

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

ids

Only these orders: up to 200 order ids, separated by commas. Ids from another business are ignored.

string

Only these orders: up to 200 order ids, separated by commas. Ids from another business are ignored.

invoiceIds

Only the orders on these invoices: up to 200 invoice ids, separated by commas. Covers both an invoice raised for one order and a weekly, monthly or quarterly invoice that billed several.

string

Only the orders on these invoices: up to 200 invoice ids, separated by commas. Covers both an invoice raised for one order and a weekly, monthly or quarterly invoice that billed several.

wantedOn

The day they are wanted.

string format: date

The day they are wanted.

unassigned

Only orders that are not currently on a round.

string
Allowed values: true false

Only orders that are not currently on a round.

deliveryStage

Only open deliveries waiting to be planned, assigned to a planned round, or currently out.

string
Allowed values: waiting planned out

Only open deliveries waiting to be planned, assigned to a planned round, or currently out.

createdFrom

Placed on or after this day.

string format: date

Placed on or after this day.

createdTo

Placed on or before this day.

string format: date

Placed on or before this day.

fulfilment

Delivery: goes on a round. collection: the customer picks it up from the yard; never planned onto a van, and comes off stock when marked collected.

string
Allowed values: delivery collection

Delivery: goes on a round. collection: the customer picks it up from the yard; never planned onto a van, and comes off stock when marked collected.

shopId

Only orders that came from this connected shop.

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

Only orders that came from this connected shop.

paid

Whether they have been paid for. ‘no’ is orders that still owe money: not on account, not cancelled, not marked paid.

string
Allowed values: yes no

Whether they have been paid for. ‘no’ is orders that still owe money: not on account, not cancelled, not marked paid.

late

Only placed orders wanted on a day already gone.

string
Allowed values: true false

Only placed orders wanted on a day already gone.

deliveredOn

Only orders delivered or collected on this day.

string format: date

Only orders delivered or collected on this day.

sort

What to put the list in order by: placed (when it was taken, the default), wanted (the day wanted) or customer (the customer name).

string
Allowed values: placed wanted customer

What to put the list in order by: placed (when it was taken, the default), wanted (the day wanted) or customer (the customer name).

order

Which way. Placed is newest first unless asc; wanted is soonest first and customer A to Z unless desc.

string
Allowed values: asc desc

Which way. Placed is newest first unless asc; wanted is soonest first and customer A to Z unless desc.

Ids

Media typeapplication/json
object
ids
required
Array<string>
total
required
integer

Example

{
"ids": [
"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"
}
]
}