List customers
const url = 'https://example.com/customers?includeArchived=true&limit=50&offset=0&sort=name&dir=asc&owing=true&kind=commercial&marketing=email&surcharge=add&ordering=stopped&shop=confirmed&activity=returning';const options = { method: 'GET', headers: {cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>'}};
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/customers?includeArchived=true&limit=50&offset=0&sort=name&dir=asc&owing=true&kind=commercial&marketing=email&surcharge=add&ordering=stopped&shop=confirmed&activity=returning' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>Returns the tenant’s customers, ordered by trading name. Archived customers are excluded unless includeArchived=true.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Search trading name
Search trading name
Only customers whose consent on this channel is granted.
Only customers whose consent on this channel is granted.
Add: on the chosen list for the business surcharge. exclude: on the excluded list.
Add: on the chosen list for the business surcharge. exclude: on the excluded list.
Stopped: orders or deliveries are stopped now, for money owed. rule: set to stop while unpaid, owing or not.
Stopped: orders or deliveries are stopped now, for money owed. rule: set to stop while unpaid, owing or not.
Confirmed: at least one shop sign-in for this customer has a confirmed email. unconfirmed: has a shop sign-in, none confirmed. none: no shop sign-in.
Confirmed: at least one shop sign-in for this customer has a confirmed email. unconfirmed: has a shop sign-in, none confirmed. none: no shop sign-in.
Responses
Section titled “Responses”Customers
object
object
object
UUID v7
A language: en-GB English, ar Arabic, ur Urdu, pa Punjabi (Gurmukhi), hi Hindi, bn Bengali, gu Gujarati, zh-Hans Chinese (Simplified), pl Polish, ro Romanian, es Spanish, fr French, de German.
UUID v7
Deposit: paid once with the cylinder and refunded on return. rent: charged while they keep it, no deposit.
UUID v7
UUID v7
object
UUID v7
object
UUID v7
object
UUID v7
Example
{ "items": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "tradingName": "Camden Lock Grill", "accountNumber": "BTL00313", "kind": "commercial", "legalName": "Camden Lock Grill Ltd", "contactName": "Priya Shah", "email": "orders@camdenlockgrill.co.uk", "phone": "07700 900123", "paymentTerms": "prepaid", "surchargeRule": "add", "preferredLocale": "en-GB", "billingAddressId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "hireBillingPeriod": "weekly", "cylinderCharge": "deposit", "rateSetId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "invoiceSchedule": { "mode": "business" }, "mergedIntoId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "contacts": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "phone": "07700 900123", "kind": "normal", "relationship": "Accounts" } ], "shopperAccounts": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "role": "manager" } ], "shopperInvitations": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "role": "manager" } ] } ]}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not a member of that tenant
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}