Referrals

Referral APIs are responsible for tracking and recording the referral action.

Referral

POST /integrations/referral

A Gameball player can refer a new user to use the your system through a referral code.The API records the referral action in Gameball backend.

Headers

NameTypeDescription

APIKey

string

client API key

Request Body

NameTypeDescription

playerCode

string

Referring player’s referral code

playerUniqueId

string

The new (referred) player’s unique Id used by the integrator to uniquely identify this newly created player in Gameball

playerAttributes

object

playerAttributes used to create\update the Player with unique ID in Gameball. Player object is described in Object Reference section.

Success

Examples

Example One: The example shown is a request sent to Gameball when a player with playerCode CODE11successfully refers a new player with playerUniqueIdac2635be.

{
  "playerCode": "CODE11",
  "playerUniqueId": "ac2635be"
}

Example Two: This example is a request sent to Gameball when player with playerCodeCODE11 successfully refers a new player with playerUniqueIdac2636be, while supplementing the request with the playerAttributesobject to create the new player with the included attributes.

Note: All attributes inside the playerAttributes object are optional, if the values of any attributes shown below are unavailable, remove the attribute from the playerAttributes object.

{
  "playerCode": "CODE11",
  "playerUniqueId": "ac2636be",
  "playerAttributes": {
    "displayName": "John Doe",
    "firstName": "John",
    "lastName": "Doe",
    "email": "example@example.com",
    "mobileNumber": "011111111111",
    "gender": "M",
    "dateOfBirth": "2019-09-19T21:06:29.158Z",
    "joinDate": "2019-09-19T21:06:29.158Z",
    "custom": {
      "location": "Cairo",
      "height": 180,
      "graduationDate": "2019-09-19T21:06:29.158Z",
      "isMarried": true //boolean values (true or false)
    }
  }
}

Last updated