Return the undelivered remainder
const url = 'https://example.com/orders/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/return-remainder';const options = { method: 'POST', 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 POST \ --url https://example.com/orders/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/return-remainder \ --cookie bottle.session_token=<bottle.session_token>For a part delivery the driver could not settle at the door. What was delivered stays delivered; what came back to the yard comes off the order and a refund is recorded against it. Bottle records the refund; the accounting system raises the credit note when one is connected.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Responses
Section titled “Responses”Returned
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
{ "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"}Not found
object
Example
{ "error": "not_found", "message": "Customer not found"}Nothing is outstanding on this order
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" } ]}