Player Info

The Player Info API is responsible for getting the info of a specific player.

The following APIs use Hashing Function SHA1, Check how Hashing is done below.

Player Info

POST /Integrations/Player/Info

Headers

NameTypeDescription

APIKey

string

Client API Key

Request Body

NameTypeDescription

playerUniqueId

string

Player external ID used by integrator to uniquely identify the player in Gameball

bodyHashed

string

Hashed body with SHA1 algorithm. As described in Hashing Transaction Messages section

{
  "response": {
    "displayName": "string",
    "referralCode": "string",
    "accFrubies": 0,
    "accPoints": 0,
    "level": {
      "name": "string",
      "description": "string",
      "levelFrubies": 0,
      "levelOrder": 0,
      "iconPath": "string",
      "icon": {
        "fileName": "string"
      },
      "benefits": {
        "rankReward": 0,
        "walletReward": 0,
        "levelDiscount": 0,
        "discountCapping": 0
      }
    },
    "balance": {
      "pointsBalance": 0,
      "pointsValue": 0,
      "currency": "string",
      "walletPointsName": "string"
    },
    "attributes": [
      {
        "name": "string",
        "value": {},
        "type": "string"
      }
    ]
  },
  "success": true,
  "errorMsg": "string",
  "errorCode": 0,
  "liveMode": true
}

Examples

The example shown is a request sent to Gameball to get a player info with playerUniqueIdac2635beand with the bodyHashed.

{
   "playerUniqueId":"ac2635be",
   "bodyHashed":"7090689dc127ddfbe4a7c2260060afe5e6fc3264"
}

Response

{
  "displayName": "#Nazih000218",
  "referralCode": "9D03A79DLFAGwl",
  "referralLink": "https://abc.myshopify.com/account/register?ReferralCode=9D03A79DLFAGwl"
  "scoreBalance": 5702,
  "scoreName": "Points",
  "level": {
    "name": "Test Discount",
    "description": null,
    "levelStartScore":5300,
    "levelOrder": 5,
    "iconPath": "https://s3.us-east-2.amazonaws.com/elasticbeanstalk-us-east-2-652131910202/uploads/gb-library/levels-icons/gb-icon-level-10@2x.png",
    "benefits": {
      "scoreEntryReward": 1,
      "pointsEntryReward": 1,
      "levelDiscount": 50
    }
  },
  "balance": {
    "pointsBalance": 6102,
    "pointsValue": 61.02,
    "currency": "KWD",
    "pointsName": "Points"
  },
  "attributes": [
    {
      "name": "Email",
      "value": "alisaj@gmail.com",
      "type": "String"
    },
    {
      "name": "MobileNumber",
      "value": "+2012323020909",
      "type": "String"
    },
    {
      "name": "Gender",
      "value": "Male",
      "type": "String"
    },
    {
      "name": "DateOfBirth",
      "value": "07/28/2020 17:44:56",
      "type": "Date"
    },
    {
      "name": "JoinDate",
      "value": "07/28/2020 17:44:56",
      "type": "Date"
    }
  ]
}

The following are the attributes of the json object from the response

Attribute

Description

displayName

The name of the player

referralCode

The code of the referral

referralLink

Referral URL

scoreBalance

The player score

scoreName

The naming of the score points that appears to the player

level.name

The name of the level

level.description

The description of the level

level.levelStartScore

The required score to reach that level

level.levelOrder

The order of the level

level.iconPath

The logo icon of the level

level.benefits.scoreEntryReward

The reward score for reaching that level

level.benefits.pointsEntryReward

The reward points for reaching that level

level.benefits.levelDiscount

The discount that can be taken by the player for reaching that level

balance.pointsBalance

The points of the player

balance.pointsValue

The actual value equivalent to the points of the player

balance.currency

The store currency

balance.pointsName

The naming of the rewarding points that appears to the player

attributes.name

The name of the attribute for the player eg: Age,Email,etc...

attributes.value

The value of the attribute of the player

attributes.type

The type of the attribute field eg: string,number

Last updated