Loyalty API
Read CallCustomerReferrals2
Returns the customer's referral history.
| Kind | Read API call |
|---|---|
| Method | GET or POST |
| URL | https://app.bubblehouse.com/api/v2023061/<shop>/CustomerReferrals2 |
| Authentication | Customer TokenShop Token |
Returns the full customer-facing referral history in a single response. There is no pagination.
Each item represents one referral shown in the customer's referral history. If one shared referral link is used by multiple people, the response can include multiple referrals that share the same original send.
By default the response follows the same anonymization rules as the customer-facing referral history block.
If called with a shop token or customer-admin customer token, you can pass deanonymize=true to disable anonymization.
Input
-
A customer to operate upon, when using a shop token.
If you're using a customer token and decide to pass this field (which we do not recommend), it must match the customer from the token.
-
deanonymizeboolean optionalIf true, disables referral-destination anonymization when the caller has permission to view deanonymized referral data.
Output
-
Referral counts and earnings totals.
-
The customer's referral history.
API-wide Errors
| Status | Error | Reason & Examples |
|---|---|---|
| 400 | missing_customer_identity |
The customer identity ('customer' input parameter) has not been specified when using a shop token. You need to either specify a non-empty value for one of the customer identity fields, or use a customer token. |
| 404 | empty_customer_identity |
All fields of the customer identity ('customer' input parameter) have been empty when using a shop token. You need to either specify a non-empty value for one of the customer identity fields, or use a customer token. |
| 404 | customer_identity_partially_mismatches_matched_customer |
A customer has been matched by one of the fields of the customer identity ('customer' input parameter), but some non-empty fields do not match Bubblehouse data on that customer. |
| 404 | no_customers_match_customer_identity |
The customer identity ('customer' input parameter) does not match a known customer. |
| 403 | customer_identity_does_not_match_token |
API call is using a customer token, but the customer identity in API params does not match the customer from the token. |
Global Errors
| Status | Error | Reason & Examples |
|---|---|---|
| 400 | obsolete_global_api_version |
The global API version you are trying to use is no longer supported. |
| 400 | inaccessible_global_api_version |
The global API version you are trying to use is not enabled on your account. |
| 400 | invalid_global_api_version |
The global API version you are trying to use has never existed. |
| 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. |