List orders
const url = 'https://example.com/orders?status=placed&customerId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f&fulfilment=delivery&paid=yes&late=true&limit=50&offset=0';const options = { method: 'GET', headers: {cookie: 'bottle.session_token=<bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/orders?status=placed&customerId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f&fulfilment=delivery&paid=yes&late=true&limit=50&offset=0' \ --cookie bottle.session_token=<bottle.session_token>Filter by status, by customer, or by the day they are wanted, which is how a round gets built.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”A tracking reference, or a product on the order.
A tracking reference, or a product on the order.
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
The day they are wanted.
The day they are wanted.
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.
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.
Whether they have been paid for. ‘no’ is orders that still owe money: not on account, not cancelled, not marked paid.
Whether they have been paid for. ‘no’ is orders that still owe money: not on account, not cancelled, not marked paid.
Only placed orders wanted on a day already gone.
Only placed orders wanted on a day already gone.
Only orders delivered or collected on this day.
Only orders delivered or collected on this day.
Responses
Section titled “Responses”Orders
object
object
UUID v7
UUID v7
UUID v7
object
UUID v7
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.
UUID v7
On_account: billed later, nothing to collect. link: a payment link raised in the accounting system. cash: the driver takes it at the door.
object
UUID v7
UUID v7
Pence, excluding VAT.
object
UUID v7
object
UUID v7
Example
{ "items": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "deliveryAddressId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "roundId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "status": "placed", "fulfilment": "delivery", "source": "office", "trackingRef": "7K3M9QWXZ2", "leaveInstruction": "none", "deliveryOptionId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "paymentMethod": "on_account", "lines": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productName": "19kg propane" } ], "collect": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productName": "19kg propane" } ], "paidVia": "stripe", "invoice": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "number": "INV-BTL00042", "status": "sent" } } ]}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed, or a line names something not sold
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}