Configurations 👑
The Configurations Endpoints can be used to retrieve client different configurations.
Type | Description | Endpoint |
---|---|---|
GET | /integrations/config | |
GET | /integrations/client/redemption/config | |
GET | /integrations/config/challenge/{handle}
| |
GET | /integrations/client/cashback |
https://api.gameball.co/api/v3.0/integrations/config
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 player 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 customers only 👑
Attribute | Type | Required | Description |
APIKey | string | Yes | Client API key |
Attribute | Type | Required | Description |
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" . |
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 player'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
|
Parameter | 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. |
Parameter | Type | Description |
minProgress | integer | The required score to reach the level. |
order | integer | Level Order |
icon | string | icon URL of the level. |
name | string | Level Name |
benefits | object | "benefits":{ "rankReward":0, "walletReward":0, "levelDiscount":0, "discountCapping":0, "others":[] } The benefits object is defined as follows:
|
Parameter | Type | Description |
id | integer | Unique identifier for the challenge. |
name | string | Challenge Name |
description | string | Challenge Description |
rankReward | integer | Awarded rank upon challenge completion |
walletReward | integer | Awarded points upon challenge completion |
repeatable | boolean | A flag that indicates whether the challenge is repeatable or not. |
maxAchievement | integer | An integer that defines how many times a player can achieve that challenge. |
type | string | The type of the challenge. Possible values are as follows:
SignUp SocialMedia ScheduledChallenge EventBased HighScore Birthday Anniversary |
visibility | string | Defines the visibility of the challenge. Possible values are:
|
icon | string | The icon's URL of the challenge. |
availability | object | "availability":{ "minLevel": 4, "tags": ["VIP"] } An object that describes challenge availability to players.
|
Parameter | Type | Description |
referralMethod | string | Defines how the referral program rewards your players, Possible values:
|
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 | "playerReward":{
"extraReward":{
"rewardEvery":5,
"rewardType":null,
"score":2,
"point":1,
"voucher":null
},
"rewardType":"Vouchers",
"score":0,
"point":0,
"voucher":{
"voucherType":"Free Shipping",
"productId":"",
"productName":"",
"value":0
}
} An object that defines the referring player's reward. The playerReward object is defined as follows:
|
friendReward | object | Defines the referred player reward configurations in case the referralMethod is "PlayerAndFriend" meaning that the referred player should also be rewarded.The object is the same as the playerReward object excluding the extraReward . |
Parameter | Type | Description |
rewardFactor | number | In case you have different merchants (brands) on your platform, The rewardFactor defines the specific cashback percentage for the paid amount to be rewarded to your players.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 player as per cashback rules.
Example: For every 10 USD spent the player gets rewarded by 5 points, implies that the amountRewardThreshold is "10". |
rewardWalletFactor | integer | Determines the points rewarded for each unit currency your player 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 currency your player spends. Example: 2 Score for every 1 USD spent, implies that the rewardRankFactor is "2" |
{
"currency":"EGP",
"programName":"my program",
"rankPointsName":"Score",
"walletPointsName":"Points",
"botMainColor":"#e7e23f",
"controlConfig":{
"gameballEnabled":true,
"redemptionEnabled":true,
"cashbackEnabled":true,
"referralEnabled":true,
"visitorProfileEnabled":true,
"userProfileEnabled":true,
"leaderboardEnabled":false,
"notificationsEnabled":true,
"achievementsEnabled":true
},
"levels":[
{
"minProgress":0,
"order":1,
"icon":"https://cdn.gameball.co/uploads/Client 1/[email protected]",
"name":"Basic",
"benefits":{
"rankReward":0,
"walletReward":0,
"levelDiscount":0,
"discountCapping":0,
"others":[
"benefits1",
"benefits2"
]
}
}
],
"challenges":[
{
"id":3350,
"name":"view product + tag internal",
"description":"",
"rankReward":3,
"walletReward":10,
"repeatable":true,
"maxAchievement":0,
"type":"EventBased",
"visibility":"AlwaysVisible",
"icon":"[email protected]",
"availability":{
"minLevel":5,
"tags":[
"2nd tag"
]
}
}
],
"referral":{
"referralMethod":"PlayerAndFriend",
"eventName":"",
"eventMetaData":null,
"playerReward":{
"extraReward":{
"rewardEvery":5,
"rewardType":null,
"score":2,
"point":1,
"voucher":null
},
"rewardType":"Vouchers",
"score":0,
"point":0,
"voucher":{
"voucherType":"Free Shipping",
"productId":"",
"productName":"",
"value":0
}
},
"friendReward":{
"rewardType":"Vouchers",
"score":0,
"point":0,
"voucher":{
"voucherType":"Free Product",
"productId":"6161866621123",
"productName":"Antique Drawers",
"value":250
}
}
},
"cashback":{
"rewardFactor":0.3,
"amountRewardThreshold":10,
"rewardWalletFactor":3,
"rewardRankFactor":1
},
"redemption":{
"redemptionFactor":0.01,
"redemptionRules":[
{
"ruleId":1097,
"type":"Level",
"equivalentPoints":0,
"equivalentPointsValue":0,
"productId":"",
"productName":""
},
{
"ruleId":1156,
"type":"FreeProduct",
"equivalentPoints":100,
"equivalentPointsValue":50,
"productId":"6161869406403",
"productName":"Striped Skirt and Top"
}
]
}
}
cURL
Ruby
PHP
Python
.NET
curl -X GET -H 'apiKey: 807b041b7d35425988e354e1f6bce186' -d
-v -i 'https://api.gameball.co/api/v3.0/integrations/config'
# Example 1
Gameball::Configurations.get_configurations()
# Example 2
Gameball::Configurations.get_configurations({lang: "en"})
$response = $gameball->config->getConfigurations();
configurations = gameball.get_configurations()
var response = Gameball.GetConfigurations();
Attribute | Type | Required | Description |
APIKey | string | Yes | Client API key |
secretKey | string | Yes | Client Secret Key |
Attribute | Type | Required | Description |
handle | string | Yes | Challenge handle could be either the Challenge Id or the Challenge internal name. |
Attribute | Type | Description |
challengesConfig | object | A single object array of ChallengeConfig object |
Attribute | Type | Description |
id | integer | A single object array of ChallengeConfig object |
name | string | |
description | string | Challenge 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 challenge |
isRepeatable | boolean | A boolean indicating if the challenge is repeatable for the specified Player or not |
maxAchievement | integer | Maximum number of times the specified challenge can be achieved (-1 if can be achieved for an unlimited number of times) |
type | string | Challenge type, can be one of the following:
|
visibility | string | Challenge visibility type, can be one of the following:
|
icon | string | URI indicating the file path to the icon of the challenge |
availability | object | An availability object specifying the conditions where this challenge is available |
{
"challenges": [
{
"id": 6128,
"name": "IsRepeatable test",
"description": "DescNew",
"rewards": [
{
"rankReward": 0,
"walletReward": 0,
"couponReward": {
"couponType": "Free Product",
"discountValue": null,
"minOrderValue": null,
"product": {
"productId": "7803615346931",
"productName": "Chequered Red Shirt",
"variantId": "43168747192563",
"variantName": null
},
"collections": []
}
}
],
"isRepeatable": false,
"maxAchievement": 1,
"type": "EventBased",
"visibility": "Always Visible",
"icon": "https://s3.us-east-2.amazonaws.com/gameball.dev.uploads/uploads/gb-library/general/annoncement.png",
"availability": {
"minLevel": 3,
"tags": [
"active",
"inactive"
]
}
}
]
}
https://api.gameball.co/api/v3.0/integrations/client/redemption/config
This API endpoint is used to return all client’s redemption rules.
APIKey | string | Yes | Client API key |
secretKey | string | Yes | Client Secret Key |
Parameter | Type | Description |
---|---|---|
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. |
Parameter | Type | Description |
---|---|---|
id | 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:
|
startDate | DateTime | Starting date when the rule can be applied (If null then it starts from the date it is created). |
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 | An AvailableTo object specifying the availability of the rule (To whom this rule will be available). |
Parameter | Type | Description |
---|---|---|
level | object | A Level object indicating the level that the rule is available to, The Level object has the following attributes:
|
tags | array | An array of tag names that the rule is available to |
Parameter | Type | Description |
---|---|---|
couponType | string | Indicates the type of the coupon, the value of the string can be one of the following:
|
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:
|
group | object | An object describing the coupon group which the coupon belongs to |
product
ObjectParameter | Type | Description |
---|---|---|
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. |
Parameter | Type |
---|