Write off a reported cylinder
const url = 'https://example.com/customers/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/cylinder-reports/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/write-off';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"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/write-off \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "note": "example", "assetIds": [ "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" ] }'The holding ends from now, with no charge: one stock movement from the customer to nowhere, so rent stops from now. No deposit is refunded. Never more than they hold now. 409 already_decided once acted on or withdrawn, 409 not_held_now when they hold none of it any more. The customer is emailed, with the note if given.
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
Shown to the customer on the shop and in the email, such as “Found at your gate”. Optional.
Responses
Section titled “Responses”Written off
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" } ]}