Retrieve customer progress across modules like tier, points, and referrals. Use these APIs to display customer progress within your app or system, offering insights into their journey.
The API call retrieves the customer's current points balance available for redemption along with the corresponding equivalent amount.
Security: Requires apikey and secretkey headers.
Request
Path Parameters
customerIdstringRequired
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
Response
application/json
totalPointsBalancenumber
The total number of points the customer has, including pending points.
totalPointsValuenumber
The total monetary value of the customer's points, including pending points.
availablePointsBalancenumber
The number of points that are currently active and available for use (excludes pending points).
availablePointsValuenumber
The monetary value of the points that are currently active and available for use (excludes pending points).
pendingPointsnumber
The points earned by the customer that are temporarily on hold during the return window configured for your account. These points will remain in a pending status until the return period expires, ensuring that the points are not used or redeemed until it is confirmed that the transaction is final and not subject to returns or cancellations.
Example: If a customer places an order and earns 100 points, and your account is configured with a 14-day return window, these 100 points will remain pending for 14 days. During this time, the customer cannot use or redeem the points. After the 14-day window expires and the order is confirmed as final, the 100 points will become available for the customer to use.
pendingPointsValuenumber
The monetary value of the pending points.
currencystring
The currency in which the points value is calculated.
pointsNamestring
The name of the points used in your loyalty program that appears to customers. This is the term your customers will see when they earn or redeem points.
Example: If your loyalty program rewards customers with "Stars" instead of generic "Points", the value of pointsName could be "Stars".
nextExpiringPointsAmountnumber
The amount of points that are set to expire next.Points expire when the configured point expiry duration has passed, and the points have not been used within that time frame.
nextExpiringPointsValuenumber
The monetary value of the points that are set to expire next.Points expire when the configured point expiry duration has passed, and the points have not been used within that time frame.
nextExpiringPointsDatestring
The date when the next set of points will expire.Points expire when the configured point expiry duration has passed, and the points have not been used within that time frame.
totalEarnedPointsnumber
The total number of points that the customer has earned over their entire lifetime within the Gameball program. This includes all points accumulated from various activities like cashback rewards, referrals, or rewards campaigns.
The API call retrieves the tier progress of the customer identified by customerId. This provides insights into the customer's current tier status and progress toward the next tier.
Security: Requires apikey and secretkey headers.
Request
Path Parameters
customerIdstringRequired
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
Response
application/json
currenttierState Object
The customer's current tier.
nexttierState Object
The next tier the customer can reach.
tierState object
ordernumber
This represents the numerical order of a tier. Higher numbers indicate higher tiers.
namestring
The name of the tier.
minProgressnumber
The minimum amount of progress a customer needs to reach the next tier in the program. This represents the threshold that must be met for a customer to reach this tier.
Example: if the minProgress is set to 2000, the customer must accumulate 2000 points, referrals, or completed orders (depending on the tiering method) to advance to the next tier.
iconstring
The URL for the icon associated with the tier.You can utilize this icon URL to display tier badges or indicators in your own custom interface, such as on customer profiles.This offers a visual representation of the customer's tier status.
progressnumber
The current progress of the customer toward the next tier, reflecting their activity and engagement within the program. This value is calculated based on the client’s chosen tiering-up method, indicating how close the customer is to advancing to a higher tier.
Example: If the progress value is 1500 and the tiering-up method is total points earned, this means the customer has earned a total of 1500 points toward their next tier.
The API call retrieves the reward campaign progress of the customer identified by customerId. This allows tracking the customer's achievements and progress within the reward campaigns.
Security: Requires apikey and secretkey headers.
Request
Path Parameters
customerIdstringRequired
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
Response
application/json
rewardsCampaignNamestring
The name of the rewards campaign.
rewardsCampaignIdnumber
The unique ID of the rewards campaign.
isUnlockedboolean
Indicates if the customer has unlocked the campaign.
highScoreAmountnumber
The highest score achieved by the customer. This value is applicable only in the context of a high score rewards campaign.
currentStreaknumber
The current number of consecutive days the customer has visited the website. This value is applicable only in the context of a streak (daily visit) rewards campaign.
highestStreaknumber
The maximum number of consecutive days the customer has visited the website. This value is also applicable only in the context of a streak (daily visit) rewards campaign.
completionPercentagenumber
The percentage of the campaign the customer has completed. For example, in a second-order campaign where the customer must make 2 orders, if they have only placed 1 order, the completion percentage will be 50%.
achievedCountnumber
The number of times the customer has achieved the campaign .
Sample Response
[ {"rewardsCampaignName":"Third Order Campaign 🛍️","rewardsCampaignId":5859,"isUnlocked":true,"highScoreAmount":null,"currentStreak":null,"highestStreak":null,"completionPercentage":33.0,"achievedCount":0 }, {"rewardsCampaignName":"Birthday Reward 🎉","rewardsCampaignId":5860,"isUnlocked":true,"highScoreAmount":null,"currentStreak":null,"highestStreak":null,"completionPercentage":100.0,"achievedCount":1 }]
The API call retrieves the list of customers referred by a customer identified by customerId. This allows for tracking referral activity and customer engagement within the referral program.
Security: Requires apikey and secretkey headers.
Request
Path Parameters
customerIdstringRequired
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
Query Parameters
pagenumberOptional
Specifies which page of results to return. Defaults to 1.
Response
application/json
referredFriendsarray
A list of friends referred by the customer.
referredFriends object
customerIdstring
Unique identifier for the referred friend.
displayNamestring
Display name of the referred friend.
emailstring
Email address of the referred friend.
mobileNumberstring
Mobile number of the referred friend.
joinDatestring
The date when the referred friend joined.
statusstring
The current status of the referral:
Active: The referral was successfully completed. The referred friend has completed the required action (e.g., placing an order), and the referral is counted for the customer.
Pending: The referred friend has used the customer’s referral link but has not yet completed the required action (e.g., signing up or making a purchase) for the referral to be considered complete.
countnumber
The number of referrals returned in the current response.
totalnumber
The total number of referrals made by the customer.
totalPendingnumber
he total number of referrals that are still pending completion. This value represents the count of referred friends who have not yet fulfilled the necessary actions for the referral to be successfully credited to the customer.
totalActivenumber
The total number of referrals that have been completed.
The API call retrieves the activity logs of the customer identified by customerId. This enables tracking and reviewing the customer's actions and interactions within the system.
Security: Requires apikey and secretkey headers.
Request
Path Parameters
customerIdstringRequired
Unique identifier for the customer that you can reference across the customer’s whole lifetime. Could be a database ID, random string, email, or anything that uniquely identifies the customer.
Query Parameters
pageNonumberOptional
Specifies which page of results to return. Defaults to 1.
pageSizenumberOptional
Specifies the number of activities to return per page. Defaults to 12.
activityTypestringOptional
Filters activities by a specific type, such as :
TierUpgraded: Indicates that the customer has been upgraded to a new tier.
TierDowngraded: Indicates that the customer has been downgraded to a lower tier.
TierMigration: Represents the migration of the customer's tier.
CampaignRewarded: Signifies that the customer received a reward from a campaign.
SuccessfulAction: Denotes successful progress by the customer in a campaign.
Referral: Indicates that the customer referred a friend.
Referred: The referee received a reward for being referred by the customer.
ReferralBonusReward: Represents a bonus reward given for a referral.
PaymentReward: Signifies that the customer received a cashback reward.
Refund: Points were refunded back to the customer.
Redemption: Points were redeemed by the customer.
Cancel: A cashback transaction was canceled.
Expiry: Indicates that points have expired.
Migration: Represents a migration activity that occurred.
Lifetime: Refers to activities related to lifetime coupons.
Automation: Activity performed by an automation campaign.
Response
application/json
pageNonumber
The current page number of the response.
pageSizenumber
The number of activities returned in the response.
countnumber
The total number of activities on the current page.
dataarray
An array of activity records for the customer.
Activity object
Response Description
activityTypestring
The type of activity that occurred (e.g., "Balance Adjustment", "Referral").
Available Activity Types:
TierUpgraded: Indicates that the customer has been upgraded to a new tier.
TierDowngraded: Indicates that the customer has been downgraded to a lower tier.
TierMigration: Represents the migration of the customer's tier.
CampaignRewarded: Signifies that the customer received a reward from a campaign.
BalanceAdjustment: Indicates that points were either rewarded or deducted manually from the customer’s balance. This type of activity occurs when the customer’s points are adjusted manually.
SuccessfulAction: Denotes successful progress by the customer in a campaign.
Referral: Indicates that the customer referred a friend.
Referred: The referee received a reward for being referred by the customer.
ReferralBonusReward: Represents a bonus reward given for a referral.
PaymentReward: Signifies that the customer received a cashback reward.
Refund: Points were refunded back to the customer.
Redemption: Points were redeemed by the customer.
Cancel: A cashback transaction was canceled.
Expiry: Indicates that points have expired.
Migration: Represents a migration activity that occurred.
Lifetime: Refers to activities related to lifetime coupons.
Automation: Activity performed by an automation campaign.
activityDaystring
The day of the week when the activity took place (e.g., "Sunday").
activityDatestring
The date of the activity (e.g., "October 20, 2024").
activityTimestring
The time when the activity occurred (e.g., "19:27:33").
customerIdstring
The unique identifier of the customer associated with the activity.
emailstring
The email address of the customer.
phoneNumberstring
The customer’s phone number.
displayNamestring
The customer’s display name.
transactionIdstring
A unique identifier for a transaction in your system (e.g., order number or invoice number). This ID can be used to reverse, cancel, or refund any reward or redemption transactions in Gameball.It represents the transaction ID related to this activity, if applicable, such as in cases of cashback rewards, points redemption, or balance adjustments.
isManualActivityboolean
Indicates whether the activity was manually triggered (true) or not (false).
Example: This will be true if the activity is a BalanceAdjustment , when you manually decide to reward the customer with points.
pointsnumber
The number of points involved in the activity, such as points earned, redeemed, or adjusted.
scorenumber
The score involved in the activity, applicable in reward campaigns where the customer earns score.
Example: If the customer participates in a campaign and earns 100 score points, the activity will include the score value.
reasonstring
This is the reason manually entered for the activity, if provided. It is typically used when performing a manual activity, such as rewarding points or rewarding a manual reward campaign for a customer.
Example: If you manually reward a customer with 100 points for their birthday, you might enter "Birthday reward" as the reason.
calculatedRedemptionnumber
The estimated monetary value based on the redemption factor configured by the client and the points involved in this activity. It reflects the potential worth of the points, even if no actual redemption was made.
actualRedemptionnumber
The actual monetary value of the redemption, if applicable. This represents the redeemed amount when the activity type is points redemption.
familyRedemptionAmountnumber
The redemption monetary value related to the customer's family wallet, if applicable.
familyRedemptionPointsnumber
The redemption points related to the customer's family wallet, if applicable.
paymentRewardAmountnumber
The amount rewarded in currency from the payment reward. This value reflects the cashback reward provided to the customer.
Example: If a customer receives a cashback reward of $10, the paymentRewardAmount will be 10.
outstandingPointsnumber
The number of points currently available from the transaction related to this activity.
Example: If a customer earned 100 points from a transaction and 20 points have since expired, the outstandingPoints would be 80, representing the points still available for the customer to use.
rewardThresholdnumber
This represents the minimum monetary amount (X value) a customer needs to spend to receive a specific number of reward points (Y points) as cashback reward, based on the configured points settings. It defines the threshold of spending required to earn points in your loyalty program.
Example:If rewardThreshold is set to 50.0, it means for every 50 currency units (e.g., 50 USD) spent by the customer, they will earn the configured number of reward points.
currencystring
The currency used in the transaction (e.g., "EGP").
redemptionRewardFactornumber
The factor used to calculate how many points are required for a redemption. This value determines the conversion rate between points and monetary value during a redemption process.
Example:
If the redemptionRewardFactor is 0.1, then for every 10 points, the customer can redeem 1 unit of currency.
campaignNamestring
The name of the rewards campaign associated with the activity .This field will appear for activity types that are tied to a rewards campaign such as CampaignRewarded.
campaignStartDatestring
The start date of the rewards campaign associated with the activity.This field will appear for activity types that are tied to a rewards campaign such as CampaignRewarded.
campaignEndDatestring
The end date of the rewards campaign associated with the activity.This field will appear for activity types that are tied to a rewards campaign such as CampaignRewarded.
campaignEnabledboolean
Indicates if the associated campaign was enabled during the activity.This field will appear for activity types that are tied to a rewards campaign such as CampaignRewarded.
tierNamestring
The tier name of the customer duringThe name of the tier associated with the activity. This is relevant when the activity involves a tier-related event, such as:TierUpgraded, TierDowngraded, TierMigration
Example: if a customer moves from "Silver" to "Gold" in the TierUpgraded activity, "Gold" will be displayed as the associated tier name.
rewardPointsnumber
The number of points rewarded from the activity.
rewardFactornumber
The reward factor used in the calculation of reward points.
isGueststring
A flag indicating if the individual interacting with your system is a guest (not signed up). Set this to true for guest users; otherwise, they are treated as registered customers by default.
couponUsedboolean
Indicates whether the coupon associated with this activity was used or not. This is a boolean value, where true means the coupon was used during the activity, and false means it was not.
Example: true if the coupon was successfully applied, false if the coupon was associated with the event but was not used.
couponTypestring
Represents the type of coupon associated with the activity.
couponCodestring
The code of the coupon that was associated with this activity. This is the actual coupon code that was available for use during the activity.
Example: "SUMMER20".
couponGroupstring
Represents the group or campaign to which the coupon is linked. This could be a marketing campaign, product category, or customer segment.
couponProductstring
The name of the product associated with the coupon, if the coupon was tied to a specific product.
Example: "Wireless Earbuds".
couponProductIdnumber
The unique ID of the product associated with the coupon. This ID helps track which specific product was related to the coupon.
Example: 123456 for "Wireless Earbuds".
productVariantNamestring
The name of the product variant involved in the event. This would apply if the coupon or activity was specific to a certain variant of a product, such as size or color.