Configurations π
The Configurations Endpoints can be used to retrieve client different configurations.
Available Endpoints
GET
/integrations/config
GET
/integrations/client/redemption/config
GET
/integrations/config/challenge/{handle}
GET
/integrations/client/cashback
GET - Configurations
This API call is used to retrieve your configured Gameball Settings along with all Gameball Programs Configurations. This endpoint allows you to retrieve your configured settings on Gameball account which can be used while creating your custom UI for the customer profile on your website or mobile app.
It is very important to use this endpoint while building your own UI to keep all configurations related to Gameball are variable. No need to update your loyalty program static content inside your website or mobile app every time you change them through Gameball admin dashboard.
This endpoint is only available for our GURU clients only π
Request
Header
Attribute
Type
Required
Description
APIKey
string
Yes
Client API key
lang
string
No
Language filter. This could be used to specify the language needed to display your configurations in. If not provided, the response would be in default language. Note: The language provided should be as per configured languages in your account.
Example: "en"
, "fr"
.
Response
Parameter
Type
Description
currency
string
Configured Currency
Example: "USD", "EUR"
.
programName
string
Name of your program.
Example: "TRIPLE H Store"
rankPointsName
string
Name of the rank points, measuring customer's progress.
walletPointsName
string
Name of the points (monetary value).
botMainColor
string
The main color of your bot as configured from your Gameball dashboard.
controlConfig
object
levels
array
challenges
array
referral
object
cashback
object
redemption
object
An object describing the redemption configurations The redemption object is described as follows
redemptionFactor
: Indicates the monetary value which one point is equivalent to. Example: Redemption Value of 1 point is 0.01 (redemption factor).
controlConfig
Object
controlConfig
ObjectParameter
Type
Description
gameballEnabled
boolean
Indicates whether Gameball is enabled or not.
redemptionEnabled
boolean
Indicates whether redemption configurations is enabled or not.
cashbackEnabled
boolean
Indicates whether cashback program is enabled or not.
referralEnabled
boolean
Indicates whether referral program is enabled or not.
visitorProfileEnabled
boolean
Indicates whether guest view is enabled or not.
userProfileEnabled
boolean
Indicates whether user view is enabled or not.
leaderboardEnabled
boolean
Indicates whether Leaderboard configurations are enabled or not.
notificationsEnabled
boolean
Indicates whether Notifications configurations are enabled or not.
achievementsEnabled
boolean
Indicates whether Achievements configurations are enabled or not.
level
Object
level
ObjectParameter
Type
Description
minProgress
integer
The required score to reach the VIP tier.
order
integer
VIP tier Order.
icon
string
Icon URL of the VIP tier.
name
string
VIP tier Name.
benefits
object
The benefits object is defined as follows:
rankReward
: Score rewarded upon reaching that VIP tier.walletReward
: Points rewarded upon reaching that VIP tier.levelDiscount
: The discount amount that the VIP tier grants.discountCapping
: The maximum value to which the discount is applicable. Example: 10% discount for maximum order price 100 USDothers
: An array of statement(s) that can be used to describe the benefits of the VIP tier.
challenge
Object
challenge
ObjectParameter
Type
Description
id
integer
Unique identifier for the rewards campaign.
name
string
Rewards Campaign Name.
description
string
Rewards Campaign Description.
rankReward
integer
Awarded rank upon rewards campaign completion.
walletReward
integer
Awarded points upon rewards campaign completion.
repeatable
boolean
A flag that indicates whether the rewards campaign is repeatable or not.
maxAchievement
integer
An integer that defines how many times a customer can achieve that rewards campaign .
type
string
The type of the rewards campaign. Possible values are as follows:
SignUp
SocialMedia
ScheduledChallenge
EventBased
HighScore
Birthday
Anniversary
visibility
string
Defines the visibility of the rewards campaign. Possible values are:
AlwaysVisibile
NotVisible
VisibleIfEarned
icon
string
The icon's URL of the rewards campaign.
availability
object
An object that describes rewards campaign availability to customers.
minLevel
: Minimum required VIP tier for the customer to be eligible to the achieve the rewards campaign.tags
: Array of tags for which the rewards campaign is available.
redirectionButtonText
string
Defines the text written on the redirection button (In case the redirection button is enabled for this rewards campaign).
redirectionButtonLink
string
Defines the redirection link (In case the redirection button is enabled for this rewards campaign).
referral
Object
referral
ObjectParameter
Type
Description
referralMethod
string
Defines how the referral program rewards your customers, Possible values:
"PlayerAndFriend"
denotes that both the referring and the referred customer should be rewarded. The referred customer also should complete the sign up process and perform a certain action according to your configurations."PlayerOnly"
denotes that only the referring customer that should be rewarded after a successful referral."PlayerAndGuest"
denotes that both the referring and the referred customer should be rewarded. Referred Customer Registration is optional, but he would be rewarded after placing a successful order.
eventName
string
The name of the event which is linked to the referral action.
eventMetaData
string
The event metadata which value should be monitored and checked for completing the referral.
playerReward
object
An object that defines the referring customer's reward.
The playerReward
object is defined as follows:
extraReward
: An object that defines the extra reward the referring customer is granted after completing specific number of referrals.rewardEvery
:
Defines the frequency upon which the referring customer is rewardedrewardType
: Defines the type of the reward, possible values are:"Vouchers"
"Score&Points"
score
: Score rewarded as an extra reward.points
: Points rewarded as an extra reward.voucher
: An object that defines the rewarded voucher as an extra reward.
rewardEvery
:
Defines the frequency upon which the referring customer is rewardedrewardType
: Defines the type of the reward, possible values are:"Vouchers"
"Score&Points"
score
: Score rewarded as an extra reward.points
: Points rewarded as an extra reward.voucher
: An object that defines the rewarded voucher.voucherType
: A string that describes the voucher type.productId
: Unique identifier for the product (in case the voucher was of type "Free Product" for example).productName
: Name of the product associated with the voucher (in case the voucher was of type "Free Product" for example).value
: It represents the value of this voucher.
friendReward
object
Defines the referred customer reward configurations in case the referralMethod
is "PlayerAndFriend" meaning that the referred customer should also be rewarded.
The object is the same as the playerReward
object excluding the extraReward
.
cashback
Object
cashback
ObjectParameter
Type
Description
rewardFactor
number
In case you have different merchants (brands) on your platform, The rewardFactor
defines the specific cashback's percentage for the paid amount to be rewarded to your customers.
Example: If you give 5% cashback (when the customer pays 100 USD, they will get 5 USD cashback). The rewardFactor
would be 0.05
amountRewardThreshold
integer
Defines the amount of unit currencies needed to reward the customer as per cashback rules.
Example: For every 10 USD spent the customer gets rewarded by 5 points, implies that the amountRewardThreshold
is "10".
rewardWalletFactor
integer
Determine the points rewarded for each unit of currency your customer spends.
Example: 2 points for every 1 USD spent, implies that the rewardWalletFactor
is "2"
rewardRankFactor
integer
In case your level up method is score, this factor determines the score rewarded for each unit of currency your customer spends.
Example: 2 Score for every 1 USD spent, implies that the rewardRankFactor
is "2"
Sample Response
Usage Example
GET - Challenge Configurations
This API is used to get the configurations of a specific rewards campaign.
https://api.gameball.co/api/v3.0/integrations/config/challenge/{handle}
Request
Header
Attribute
Type
Required
Description
APIKey
string
Yes
Client API key
secretKey
string
Yes
Client Secret Key
Path Parameters
Attribute
Type
Required
Description
handle
string
Yes
Rewards Campaign handle could be either the rewards campaign Id or the rewards campaign internal name.
Response
Attribute
Type
Description
challengesConfig
object
A single object array of ChallengeConfig object
challengesConfig
object
challengesConfig
objectAttribute
Type
Description
id
integer
A single object array of challengeConfig
object.
name
string
Rewards Campaign Name.
description
string
Rewards Campaign description( In default language if not specified in query parameter).
rewards
array
An array of Reward objects, these are the rewards that are achieved by completing the specified rewards campaign.
isRepeatable
boolean
A boolean indicating if the rewards campaign is repeatable for the specified customer or not.
maxAchievement
integer
Maximum number of times the specified rewards campaign can be achieved (-1 if can be achieved for an unlimited number of times)
type
string
Rewards Campaign type, can be one of the following:
Amount Based
Action Based
Amount & Action Based
High Score
Upon Login
NonCumulative Amount Based
Join Anniversary
Event Based
Social Activities
Scheduled Challenge
Streak
visibility
string
Rewards Campaign visibility type, can be one of the following:
Always Visible
Not Visible
Visible If Earned
icon
string
URI indicating the file path to the icon of the rewards campaign.
availability
object
An availability object specifying the conditions where this rewards campaign is available.
redirectionButtonText
string
Defines the text written on the redirection button (In case the redirection button is enabled for this rewards campaign).
redirectionButtonLink
string
Defines the redirection link (In case the redirection button is enabled for this rewards campaign).
Sample Response
GET - Redemption Rules
This API endpoint is used to return all clientβs redemption rules.
Request
Header
APIKey
string
Yes
Client API key
secretKey
string
Yes
Client Secret Key
lang
string
No
Preferred language code. (e.g. "en", "es")
Response
isRedemptionActive
boolean
A Boolean flag indicating if the redemption program is active for the client.
pointsExpiryPeriod
int
Number of days that the points will expire after being rewarded.
redemptionRules
array
An array of redemptionRule
objects of the client.
redemptionRule
object
redemptionRule
objectid
integer
Unique Identifier of the redemption rule.
pointsToRedeem
double
Points needed for the rule to be redeemed.
valueOfPoint
double
In the case of a rule of type general_settings
, this attribute specifies the monetary value of one point.
ruleType
string
Indicates the type of the rule and can be one of the following:
free_shipping_settings
For rule that redeems a free shipping coupon.percentage_discount_settings
: For rule that redeems a percentage based discount coupon.free_product_settings
: For rule that redeems a free product coupon.fixed_rate_settings
For rule that redeems a coupon that discounts a fixed amount.general_settings
For general rule that allows user to trade points for their monetary value.custom
startDate
DateTime
Starting date when the rule can be applied (If null then it starts from the date of creation).
endDate
DateTime
Ending date when the rule will expire (If null then it will not expire).
coupon
object
A coupon object describing the coupon that is awarded when the rule is redeemed.
availableTo
object
howToRedeem
string
A text displaying the how to redeem section as configured in the dashboard if lang header was provided the returned text will adapt to the sent lang parameter, else the default lang text will be returned.
availableTo
Object
availableTo
Objectlevel
object
A Level object indicating the VIP tier that the rule is available to,
The Level object has the following attributes:
levelName
levelId
tags
array
An array of tag names that the rule is available to.
coupon
Object
coupon
ObjectcouponType
string
Indicates the type of the coupon, the value of the string can be one of the following:
free_shipping
percentage_discount
fixed_discount
free_product
fixed_rate_discount
custom
discountValue
double
Indicating the discount value of the coupon, in the case of percentage it will indicate the percentage value of the discount.
minOrderValue
double
Minimum value the order has to reach in order for the coupon to be applied.
product
object
In the case of free_product
coupon, a product object indicates the details of the free product.
applicableTo
object
Indicates if the coupon can only be applied to certain orders. It has the following attributes:
collections
: Array ofcollectionIds
.productIds
: Array ofproductIds
.
group
object
An object describing the coupon group which the coupon belongs to.
product
Object
productId
integer
Unique identifier of the product.
productName
string
Name of the product.
productDisplayNames
array
An array of display names for the product.
variantId
integer
In case the product has variants this is the id of the variant.
variantName
string
In case the product has variants this is the name of the variant.
group
Object
group
Objecthandle
string
A unique identifier for the coupon group.
title
string
Title of the coupon group.
url
string
URL of the coupon group.
iconPath
string
Icon path of the coupon group.
description
string
Description of the coupon group.
maxPerPlayer
integer
Maximum number of times a customer can achieve coupons from this group.
startDate
DateTime
Date at which coupons can start to be redeemed from this group.
expiryDate
DateTime
Date at which you can no longer redeem coupons from this group.
isAvailable
boolean
A Boolean flag indicating if there are coupons available to be redeemed from this group.
isValid
boolean
Flag indicating if the group is valid (The group is considered valid if the current date falls between the start and expiry dates).
isActive
boolean
Flag indicating if the group is active or not (The group is considered active if the client has marked it as active and if the group's dates are valid).
Sample Response
Get - Cashback Rules
This API endpoint is used to return all clientβs cashback rules.
Request
Header
APIKey
string
Yes
Client API key
secretKey
string
Yes
Client Secret key
Response
isCashbackActive
boolean
A boolean flag indicating if the Cashback program is active for the client.
returnWindowDuration
integer
Number of days that the customer can return an order and points get deducted accordingly.
cashbackRules
array
cashback
Object
cashback
Objectid
integer
Id of the cashback rule.
isDefaultRule
boolean
A boolean indicating if the cashback rule is the default one.
minAmountToSpend
double
Amount needed to be spent in order to be rewarded the cashback.
pointsRewardedAsCashback
double
Points awarded for the amount specified in minAmountToSpend
.
availableTo
object
Sample Response
Last updated