List the cylinders held, and what each costs or gives back
const url = 'https://example.com/storefront/sites/northgate.shop.getbottle.app/account/cylinders?customerId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f';const options = {method: 'GET'};
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/storefront/sites/northgate.shop.getbottle.app/account/cylinders?customerId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f'Deliberately without a staff session: a shopper on the business’s own shop. For each customer of the account (or the one asked for): the cylinders they hold by product (one size of one gas type), how many, since when, whether they are on a deposit (and what was paid) or on rent (in the customer’s price display basis, and how often), and on a deposit what returning one today gives back under that deposit’s own refund rule, with the rule in words. With how many are reported and waiting, the reports waiting, and those acted on in the last 90 days. canReport says whether this account may report a problem: a consumer, or a trade customer’s manager.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
northgate.shop.getbottle.appQuery Parameters
Section titled “Query Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Responses
Section titled “Responses”Cylinders
object
object
UUID v7
object
UUID v7
object
object
Full: all of it back. percent: refundPercent of it, less refundDeductionPence. scale: by how long it was held, from refundScale. none: nothing; the charge is a charge.
object
UUID v7
UUID v7
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.
Example
{ "priceDisplay": "inc", "customers": [ { "customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "lines": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "charge": { "kind": "deposit" }, "giveBack": { "rule": "full" } } ], "reports": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "problem": "lost", "status": "pending" } ] } ]}Refused: the message says why
object
Example
{ "error": "not_found", "message": "Customer not found"}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not from the shop itself, or the email is not confirmed yet
object
Example
{ "error": "not_found", "message": "Customer not found"}Not a shop. No body.
A real shop not selling now (shop_closed)
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}Too many tries
object
Example
{ "error": "not_found", "message": "Customer not found"}