Skip to content

List the cylinders held, and what each costs or gives back

GET
/storefront/sites/{host}/account/cylinders
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.

host
required
string

Example

northgate.shop.getbottle.app
customerId

UUID v7

string format: uuid

Example

019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

Cylinders

Media typeapplication/json
object
priceDisplay
required
string
Allowed values: inc ex
customers
required
Array<object>
object
customerId
required

UUID v7

string format: uuid
customerName
required
string
canReport
required
boolean
lines
required
Array<object>
object
productId
required

UUID v7

string format: uuid
name
required
string
gasType
required
object
name
required
string
colour
required
string | null
quantity
required
integer
> 0
since
required
string | null format: date-time
charge
required
One of:
object
kind
required
string
Allowed values: deposit
paidPence
required
integer | null
giveBack
required
object
rule
required

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.

string
Allowed values: full percent scale none
pence
required
integer
scheme
required
string
reported
required
integer
reports
required
Array<object>
object
id
required

UUID v7

string format: uuid
productId
required

UUID v7

string format: uuid
name
required
string
quantity
required
integer
> 0
problem
required

What the customer said happened: lost, stolen, damaged, or moved to another supplier.

string
Allowed values: lost stolen damaged moved_supplier
status
required

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.

string
Allowed values: pending written_off invoiced dismissed withdrawn
note
required
string | null
reportedAt
required
string format: date-time
decidedAt
required
string | null format: date-time
businessNote
required
string | null
invoicePence
required
integer | null

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

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not from the shop itself, or the email is not confirmed yet

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Not a shop. No body.

A real shop not selling now (shop_closed)

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string

Example

{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}

Too many tries

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}