Invoice the customer for a reported cylinder
const url = 'https://example.com/customers/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/cylinder-reports/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/invoice';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"unitPrice":1,"priceIncludesVat":true,"vatRate":1,"description":"example","note":"example","assetIds":["019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"]}'};
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/customers/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/cylinder-reports/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/invoice \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "unitPrice": 1, "priceIncludesVat": true, "vatRate": 1, "description": "example", "note": "example", "assetIds": [ "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" ] }'Raises an invoice now, numbered and sent the usual way, with one line: the amount typed (for each cylinder reported) and the description. The holding ends from now, as with a write-off, so rent stops. No deposit is refunded. 409 as for a write-off. The customer is emailed about the report; the invoice is sent as any invoice is.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Bodyrequired
Section titled “Request Bodyrequired”object
Basis points: 2000 is 20%. Ignored for a business not registered for VAT.
Shown to the customer on the shop and in the email, such as “Found at your gate”. Optional.
Responses
Section titled “Responses”Invoiced
object
UUID v7
UUID v7
UUID v7
object
What the customer said happened: lost, stolen, damaged, or moved to another supplier.
Pending: waiting for the business. written_off: the holding ended, with no charge. invoiced: the holding ended and the customer was invoiced. dismissed: closed with nothing changed. withdrawn: the customer took it back first.
object
UUID v7
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "problem": "lost", "status": "pending", "invoice": { "id": "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"}No such customer or report
object
Example
{ "error": "not_found", "message": "Customer not found"}Already acted on or withdrawn, or none held now
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}