Update an order
const url = 'https://example.com/orders/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f';const options = { method: 'PATCH', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"expectedUpdatedAt":"2026-04-15T12:00:00Z","surchargeChoice":"add","status":"draft","empties":[{"productId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","quantity":1}],"deliveryMethod":"own_driver","deliveryAddressId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","deliverToName":"example","deliverToAddress":"example","deliveryOptionId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","paymentMethod":"on_account","billingOwner":"bottle","fulfilment":"delivery","wantedOn":"2026-04-15","notes":"example","customerReference":"example","lines":[{"productId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","quantity":1,"unitPrice":1,"priceIncludesVat":true,"faultySwap":true}],"collect":[{"productId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","quantity":1}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/orders/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "expectedUpdatedAt": "2026-04-15T12:00:00Z", "surchargeChoice": "add", "status": "draft", "empties": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "quantity": 1 } ], "deliveryMethod": "own_driver", "deliveryAddressId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "deliverToName": "example", "deliverToAddress": "example", "deliveryOptionId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "paymentMethod": "on_account", "billingOwner": "bottle", "fulfilment": "delivery", "wantedOn": "2026-04-15", "notes": "example", "customerReference": "example", "lines": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "quantity": 1, "unitPrice": 1, "priceIncludesVat": true, "faultySwap": true } ], "collect": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "quantity": 1 } ] }'Sending lines replaces them and re-prices the order. Marking it delivered records when, and for a delivery can say who delivered it with deliveryMethod. An order a delivery partner has is recorded as delivery_partner if deliveryMethod is left out, and own_driver takes it off the partner. delivery_partner also takes it off any round it is waiting on, which needs rounds:write and a plan with rounds, and moving it back from delivered does not put it back. If marking delivered fails after the status is saved, sending status delivered again finishes moving the stock, once.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fOwn_driver: the business’s own driver delivered it. delivery_partner: another company delivered it for the business.
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fOn_account: billed later, nothing to collect. link: a payment link raised in the accounting system. cash: the driver takes it at the door.
Bottle: Bottle invoices and takes payment as usual. elsewhere: already invoiced or paid outside Bottle. Bottle sends no invoice or payment link, drivers collect nothing, and the payment method is kept as on_account.
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.
object
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fobject
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fResponses
Section titled “Responses”Updated
object
UUID v7
UUID v7
Consumer: use consumer list prices. trade: use trade prices where set. Agreed rates, customer price lists and price rules still take priority.
UUID v7
object
UUID v7
object
UUID v7
object
UUID v7
The drop that failed, while the order is open, for delivery and not back on a round. Only the full order fills it: not the items of GET /orders.
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
Bottle: Bottle owns invoicing and payment. shop: the connected shop owns both, so Bottle must only fulfil the order. elsewhere: the business invoiced or took payment outside Bottle, so Bottle only fulfils the order.
object
object
object
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, as agreed when the order was written, and as typed.
object
UUID v7
object
UUID v7
object
object
object
UUID v7
UUID v7
object
object
UUID v7
Own_driver: the business’s own driver delivered it. delivery_partner: another company delivered it for the business.
object
UUID v7
UUID v7
object
UUID v7
UUID v7
object
object
UUID v7
UUID v7
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "pricingAudience": "consumer", "deliveryAddressId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "placement": "drop", "roundId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "round": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "status": "planned" }, "deliveredBy": { "roundId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "failedDrop": { "reason": "nobody_in", "roundId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "status": "draft", "fulfilment": "delivery", "source": "office", "shopId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "billingOwner": "bottle", "trackingRef": "7K3M9QWXZ2", "leaveInstruction": "none", "deliveryOptionId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "surchargeAppliesTo": "all_orders", "surchargeChargeBy": "per_order", "surchargeTargetIds": [ "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" ], "paymentMethod": "on_account", "cylinderCharge": "deposit", "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" } ], "returned": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productName": "19kg propane" } ], "availableDepositRefund": { "lines": [ { "depositProductId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "cylinderProductId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ] }, "payments": [ { "method": "cash", "cashLocation": "office" } ], "paidVia": "online", "invoice": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "number": "INV-BTL00042", "status": "sent" }, "deliveryMethod": "own_driver", "partnerDelivery": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "partnerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "sentVia": "email", "edited": [ "products" ] }, "deliveryCorrections": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "kind": "delivered", "lineId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "deliveryProofs": [ { "kind": "signature" } ], "deliveryNotes": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "orderId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ]}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"}Not found
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" } ]}