Referral

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 your system through a referral code. The API records the referral action in Gameball.

Headers

NameTypeDescription

APIKey

string

Client API key

Request Body

NameTypeDescription

playerCode

string

Referring player’s referral code

playerUniqueId

string

Player unique identifier of the referred player used to uniquely identify the player on Gameball.

playerAttributes

object

An object containing all of the properties of the referred player. Player object is described in Object Reference section.

{}

Examples

Example One

The example shown is a request sent to Gameball when a player with playerCode CODE11successfully refers a new player with playerUniqueIdplayer456.

curl -X POST -H 'apiKey: 807b041b7d35425988e354e1f6bce186' -d '{
  "playerCode": "CODE11",
  "playerUniqueId": "player456"
  }' -v -i 'https://api.gameball.co/api/v2.0/integrations/referral'

Example Two

This example is a request sent to Gameball when player with playerCodeCODE11 successfully refers a new player with playerUniqueIdplayer456”. Player attributes are also sent within the same request.

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.

curl -X POST -H 'apiKey: 807b041b7d35425988e354e1f6bce186' -d '{
   "playerCode":"CODE11",
   "playerUniqueId":"player456",
   "playerAttributes":{
      "displayName":" Tyrion Lannister",
      "firstName":"Tyrion",
      "lastName":"Lannister",
      "email":"tyrion@example.com",
      "gender":"M",
      "dateOfBirth":"1978-01-11T00:00:00.000Z",
      "joinDate":"2019-09-19T21:06:29.158Z",
      "custom":{
         "location":"Miami",
         "graduationDate":"2018-07-04T21:06:29.158Z",
         "isMarried":false
  	}
   }
  }' -v -i 'https://api.gameball.co/api/v2.0/integrations/referral'

Last updated