Skip to content

List the cylinders held

GET
/storefront/sites/{host}/account/holdings
curl --request GET \
--url 'https://example.com/storefront/sites/northgate.shop.getbottle.app/account/holdings?customerId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f'

Deliberately without a staff session: a shopper on the business’s own shop. Cylinders each customer of the account holds, by delivery address (from the order each went out on; ones not tied to an order are under a null address), with totals by product. Totals are the customer’s whole holding; a cylinder that came back at a different address than it went to can leave the by-address figures a little apart from the totals.

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
totals
required
Array<object>
object
productId
required

UUID v7

string format: uuid
name
required
string
gasType
required
object
name
required
string
colour
required
string
quantity
required
integer
byAddress
required
Array<object>
object
address
required
object
id
required

UUID v7

string format: uuid
label
required
string
postcode
required
string | null
customerId
required

UUID v7

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

UUID v7

string format: uuid
name
required
string
gasType
required
object
name
required
string
colour
required
string
quantity
required
integer
since
required
string | null format: date-time
Example
{
"totals": [
{
"productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
}
],
"byAddress": [
{
"address": {
"id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
},
"customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"lines": [
{
"productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
}
]
}
]
}

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"
}