Analytics API
Read CallListCustomers2
Returns a list of customers and their loyalty program data.
| Kind | Read API call |
|---|---|
| Method | GET or POST |
| URL | https://app.bubblehouse.com/api/v20230601/<shop>/ListCustomers2 |
| Authentication | Shop Token |
The returned customer records are orders by latest_change_id if include_updates is true, otherwise .
Note that the output is in a tabular data format determined by the format parameter.
Input
-
The response format you want: JSON, JSONL or CSV.
-
limitinteger optionalThe number of objects to return.
The default limit is 1000 (unless you're streaming), but feel free to use any number here. You can set the limit to -1 or a very large number to disable it; Bubblehouse will be happy to stream the entire list of customers. If you picked the JSON output format, be careful when processing a potentially huge response this generates.
Output
-
Unique ID of the customer in the Bubblehouse system.
-
custom_idstring optionalCustom external ID of the customer (for fully custom integrations).
For shops that use a fully custom integration, Bubblehouse can store an additional customer identifier defined by your system. When configured, it is exposed here as
custom_id. -
shopify_idstring optionalShopify customer ID (for shops that run on Shopify).
For shops that use Shopify as their ecommerce platform, Bubblehouse exposes the Shopify customer ID as
shopify_id. Other integrations will expose similar fields named<integration>_id. -
emailstring required but can be emptyThe email address of the customer.
-
phonestring required but can be emptyThe phone number of the customer.
-
first_namestring required but can be emptyThe first (given) name of the customer.
-
last_namestring required but can be emptyThe last (family) name of the customer.
-
full_namestring required but can be emptyThe full name of the customer.
The full name is filled in when we don't know the first/last name split, e.g. for online shops that do not have separate first/last name fields, or when sourcing customer data from a review system or another integration that only has a full name field.
-
is_importedboolean requiredWhether this customer has been imported from a prior loyalty system.
-
is_testerboolean requiredWhether this customer is an internal tester account.
-
The customer's birthday. The year is zero if unknown.
-
When the customer has signed up for an online shop account, if known.
-
pts_balanceinteger requiredThe number of loyalty points the customer currently has.
-
pts_earnedinteger requiredThe number of loyalty points the customer has ever earned.
-
pts_redeemedinteger requiredThe number of loyalty points the customer has redeemed towards benefits.
-
pts_expiredinteger requiredThe number of loyalty points that have expired for this customer.
-
tierstring required but can be emptyThe name of the tier this customer is on, empty string if none.
-
is_referredboolean requiredWhether this customer has been referred by another customer.
-
referrer_shop_idstring required but can be emptyAn online shop ID of the customer that has referred this one.
Note that in some edge cases involving imports and integrations, the customer in Bubblehouse database might not have an associated account in the online shop, so this field might be empty. You can fall back to a Bubblehouse ID when identifying these customers.
-
referrer_emailstring required but can be emptyThe email address of the customer that has referred this one, an empty string if unknown.
-
referrals_sentinteger requiredThe number of referrals this customer has sent.
-
referrals_approvedinteger requiredThe number of approved referrals this customer has sent.
-
referrals_declinedinteger requiredThe number of referrals this customer has sent that have been ignored/declined/expired.
-
votesinteger requiredThe number of votes the customer has recorded.
-
reviewsinteger requiredThe total number of reviews (of any type) the customer has posted.
Global Errors
| Status | Error | Reason & Examples |
|---|---|---|
| 401 | invalid_token |
The provided authentication token is invalid or has expired. |
| 429 | rate_limit_exceeded |
Your usage is over the rate limit. Ensure that you're not making duplicate calls, and contact our team for a rate limit increase. |