Skip to content

List which customers hold which cylinders

GET
/stock/customer-holdings
curl --request GET \
--url 'https://example.com/stock/customer-holdings?show=all&productId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f&sort=name&dir=asc&limit=20&offset=0' \
--cookie __Host-bottle.session_token=<__Host-bottle.session_token>

Every customer who is not archived, with the cylinders they hold per size and whether their opening balance has been confirmed. Until it has, the count covers only what Bottle recorded and may leave out cylinders held before Bottle.

q

A name, typed roughly

string
<= 100 characters

A name, typed roughly

show

Everyone, those holding cylinders, or balances not yet checked

string
default: all
Allowed values: all holding notChecked

Everyone, those holding cylinders, or balances not yet checked

productId

Only customers holding this cylinder

string format: uuid

Example

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

Only customers holding this cylinder

sort

Order by name or by cylinders held. Left out: the closest name when searching, otherwise the most cylinders first

string
Allowed values: name cylinders

Order by name or by cylinders held. Left out: the closest name when searching, otherwise the most cylinders first

dir

Which way to order them

string
Allowed values: asc desc

Which way to order them

limit

How many customers to return

integer
default: 20 >= 1 <= 100

How many customers to return

offset

How many customers to skip

integer | null
0

How many customers to skip

One page of customers, with figures for the whole business

Media typeapplication/json
object
items
required
Array<object>
object
customerId
required

UUID v7

string format: uuid
customerName
required
string
cylinders
required
integer
holdings
required
Array<object>
object
productId
required

UUID v7

string format: uuid
productName
required
string
gasTypeId
required

UUID v7

string | null format: uuid
quantity
required
integer
since
required
string | null format: date-time
balanceConfirmedAt
required
string | null format: date-time
total
required
integer
summary
required
object
cylinders
required
integer
customersHolding
required
integer
customersNotChecked
required
integer

Example

{
"items": [
{
"customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"holdings": [
{
"productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f",
"gasTypeId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
}
]
}
]
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string

Example

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

Not a member, or without the permission this needs

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