Leaderboard 👑

Motivate your customers to engage more on your platform by showing a gamified leaderboard on your website or mobile app

This endpoint allows you to retrieve the customers' leaderboard for a given date range. It can also be used to get a specific customer's rank among all customers.

This endpoint is only available for our GURU clients only. 👑

GET - Leaderboard

https://api.gameball.co/api/v3.0/integrations/leaderboard

This API call is used to retrieve customers' leaderboard within a date range or all time, ordered from the highest to the lowest rank.

The request also accepts the playerUniqueId as an optional parameter where if provided, the rank of the customer (with the specified ID) in the leaderboard will be returned.

mobile or email should replace playerUniqueId in case (only if) your account supports channel merging.

Request

Query Parameters

Response

leaderboard object

The leaderboard object defines the customer rank and progress in the leaderboard based on the specified query parameters.

playerRank Object

Sample Response

{
    "leaderboard": [
        {
            "displayName": "Player 1",
            "playerUniqueId": "5097238429738",
            "progress": 1748,
            "rank":1,
            "levelName": "Bronze",
            "levelIcon": "https://cdn.gameball.co/uploads/c007/e7e1580c-f1ae-48be-9e14-2635848c6817icon-level-bronze@2x.png"
        },
        {
            "displayName": "Player 2",
            "playerUniqueId": "3172250157098",
            "progress": 110,
            "rank":2,
            "levelName": "Basic",
            "levelIcon": "https://cdn.gameball.co/uploads/c007/7e38bd4a-10b9-4c2f-8d94-56ab0b59da1aicon-icon-basic@2x.png"
        }
    ],
    "playerRank": {
        "rank": 70,
        "playersCount": 100
    }
}

Usage Example

curl -X GET 
    "https://api.gameball.co/api/v3.0/integrations/leaderboard?from=2021-02-13%2000%3A00&to=2021-02-18%2000%3A00"
    -H "accept: application/json" 
    -H "APIKey: 807b041b7d35425988e354e1f6bce186"