Configurations 👑

The Configurations Endpoints can be used to retrieve client different configurations.

Available Endpoints

GET - Configurations

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 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

Response

controlConfig Object

level Object

challenge Object

referral Object

cashback Object

Sample Response

{
   "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/7e38bd4a-10b9-4c2f-8d94-56ab0b59da1aicon-icon-basic@2x.png",
         "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":"gb-icon-challenge-10@2x",
         "availability":{
            "minLevel":5,
            "tags":[
               "2nd tag"
            ]
         },
        "redirectionButtonText": "Free Gift",
         "redirectionButtonLink": "https://claires.myshopify.com/products/jeans"
      }
   ],
   "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"
         }
      ]
   }
}

Usage Example

curl -X GET -H 'apiKey: 807b041b7d35425988e354e1f6bce186' -d 
 -v -i 'https://api.gameball.co/api/v3.0/integrations/config'

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

Path Parameters

Response

challengesConfig object

Sample Response

{
    "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"
                ]
            },
            "redirectionButtonText": "Free Gift",
            "redirectionButtonLink": "https://claires.myshopify.com/products/jeans"
        }
    ]
}

GET - Redemption Rules

https://api.gameball.co/api/v3.0/integrations/client/redemption/config

This API endpoint is used to return all client’s redemption rules.

Request

Header

Response

redemptionRule object

availableTo Object

coupon Object

product Object

group Object

Sample Response

{
  "isRedemptionActive": true,
  "pointsExpiryPeriod": 720,
  "redemptionRules": [
    {
      "id": 1976,
      "pointsToRedeem": 50,
      "valueOfPoint": 0.0,
      "ruleType": "free_product_settings",
      "startDate": "2022-09-09T12:07:19.269733",
      "endDate": "2023-09-09T12:07:19.269733",
      "coupon": {
        "couponType": "free_product",
        "discountValue": 0.0,
        "minOrderValue": null,
        "product": {
          "productId": "6932183449758",
          "productName": "7 Shakra Bracelet",
          "variantId": "40691241877662",
          "variantName": "Blue",
          "productDisplayNames": []
        },
        "applicableTo": {
          "collections": [],
          "productIds": []
        },
        "group": {
          "handle": "free_macdo",
          "title": "Free MACDO",
          "url": "https://www.mcdonalds.eg/eat/menu/Item/Chicken-MACDO-",
          "iconPath": "https://www.mcdonalds.eg/Cms_Data/Contents/En/Media/images/Menu/large-Image/Chicken-MACDO.png",
          "description": "Coupons in this group give a free macdo and can be rdeemed in all Mcdonalds branches",
          "maxPerPlayer": 10,
          "startDate": "2022-09-09T12:07:19.269733",
          "expiryDate": "2023-09-09T12:07:19.269733",
          "isAvailable": true,
          "isValid": true,
          "isActive": true
        }
      },
      "availableTo": {
        "level": {
          "levelName": "silver",
          "levelId": 21
        },
        "tags": []
      },
      "howToRedeem": "How to redeem text"
    }
  ]
}

Get - Cashback Rules

https://api.gameball.co/api/v3.0/integrations/client/cashback

This API endpoint is used to return all client’s cashback rules.

Request

Header

Response

cashback Object

Sample Response

{
    "isCashbackActive": true,
    "returnWindowDuration": 14,
    "cashbackRules": [
        {
            "id": 12345,
            "isDefault": true,
            "minAmountToSpend": 10.0,
            "pointsRewardedAsCashback": 1.0,
            "availableTo": {
                "level": {
                    "levelId": null,
                    "levelName": null
                },
                "tags": []
            }
        },
        {
            "id": 12344,
            "isDefault": false,
            "minAmountToSpend": 10.0,
            "pointsRewardedAsCashback": 2.0,
            "availableTo": {
                "level": {
                    "levelId": 234,
                    "levelName": "Silver"
                },
                "tags": ["VIP"]
            }
        }
    ]
}