Loyalty API
LoggedOutBalance1
Returns loyalty program structure for non-authenticated users, allowing them to preview the program before signing in.
Method | GET or POST |
---|---|
Kind | Read-Only |
URL | https://app.bubblehouse.com/api/v2023061/<shop>/LoggedOutBalance1 |
Authentication | AnonymousShop Token |
This method returns the structure and configuration of the loyalty program for users who have not yet authenticated. It's designed to allow stores to render loyalty program details to anonymous visitors.
This call uses the same response structure as CustomerBalance3
but with values representing a logged out user.
Input
include_unused_rewards
booleanoptionalIf true, the return value will include the
unused_rewards
property (with an empty value).include_full_program
booleanoptionalIf true, the return value will include information for rendering an entire loyalty program:
Recommended to set this to true when displaying the loyalty program to new visitors to show them all the program benefits.sources
,offers
,tiers
,milestones
.
Output
Response format common to CustomerBalance3 and LoggedOutBalance1.
pts_available
integerrequiredNumber of loyalty points available for spending.
Monetary value of the loyalty points available for spending.
Null if loyalty points are not directly convertible to monetary amounts for this shop.
pts_pending
integerrequiredNumber of loyalty points earned by the customer but not yet available for spending.
Monetary value of the loyalty points earned by the customer but not yet available for spending.
Null if loyalty points are not directly convertible to monetary amounts for this shop.
pts_earned
integerrequiredTotal number of loyalty points the customer has earned over their entire history.
pts_redeemed
integerrequiredTotal number of loyalty points the customer has redeemed over their entire history.
pts_expired
integerrequiredTotal number of loyalty points that have expired from the customer's account.
Total amount spent by the customer that counts toward loyalty.
Amount spent by the customer that counts toward upgrade or renewal of a loyalty tier.
The date when the customer joined the loyalty program, used for anniversary rewards.
This date represents when the customer first joined the loyalty program. It's used to calculate anniversaries for sending rewards, special offers, or congratulatory messages.
If the customer hasn't formally joined the loyalty program or if anniversary tracking is disabled, this field will be empty or the day value will be zero.
A future moment in time when all customer points are going to expire, if any.
Null if global points expiration is disabled for this shop.
Describes the next batch of points that will expire, including expiration time and amount.
Null if rolling points expiration is disabled for this shop or if there are no points scheduled to expire.
Monetary value of 1 loyalty point.
Null if loyalty points are not directly convertible to monetary amounts for this shop.
Customer's current tier.
Null if the shop has no initial tier configured and the customer hasn't earned any tiers. Never null if the shop has an initial tier.
A tier one step higher than the customer's current tier.
Information on the customer's subscription loyalty.
The effective redemption limit currently applied to this customer.
Shows the actual limit that will be enforced when the customer attempts to redeem points. When both global and tier-specific limits exist, the tier limit takes precedence, completely overriding the global limit.
Will be null if:
- No redemption limits are configured
- Points don't have monetary value (redemption is disabled)
- The customer has unlimited redemptions
The
remaining
field shows how many points the customer can still redeem in the current period before hitting the limit.The global redemption limit configured for all customers.
This is the default limit that applies to customers when their tier doesn't have a specific redemption limit configured. When a tier has its own redemption limit, that tier limit completely overrides this global limit.
Will be null if no global redemption limit is configured.
A list of rewards that the customer can use.
A list of all point sources (aka Ways to Earn) enabled on this store and visible to this customer.
A list of all offers (i.e. vendibles and other redeemable offers) enabled on this store and visible to this customer.
A list of all tiers enabled on this store and visible to this customer.
Each tier in this array includes its configuration, features, and any redemption limits specific to that tier.
Tier redemption limits are now embedded in each tier object as the
redemption_limit
field, replacing the previous separatetier_redemption_limits
array.A list of all milestones enabled on this store and visible to this customer.
A list of all tier features defined for the shop.
These are the feature definitions that apply across all tiers. Each tier in the
tiers
array includes its ownfeatures
field with the specific values for that tier.
Specific Errors
Status | Error | Reason & Examples |
---|---|---|
None. |
API-wide Errors
Status | Error | Reason & Examples |
---|---|---|
None. |
Global Errors
Status | Error | Reason & Examples |
---|---|---|
401 | invalid_token | The provided authentication token is invalid or has expired. {"id":"invalid_token","message":"The token 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. {"id":"rate_limit_exceeded","message":"You are over the read limit per second for this customer"} |
400 | obsolete_global_api_version | The global API version you are trying to use is no longer supported. {"id":"obsolete_global_api_version"} |
400 | invalid_global_api_version | The global API version you are trying to use has never existed. {"id":"invalid_global_api_version"} |
400 | inaccessible_global_api_version | The global API version you are trying to use is not enabled on your account. {"id":"inaccessible_global_api_version"} |