Leaderboard
Leaderboard
The Leaderboard reward API allows clients to retrieve leaderboard rewards for the configured leaderboard positions of gamers. the reward is granted at the time of leaderboard reset.
info
Base Endpoint: /api/v1/
Available Endpoints
1. Get Gamer Leaderboard Reward
- Method & Path:
GET /leaderboard-reward
- Description: Retrieves leaderboard rewards of given leaderboard.
- Query Parameters:
leaderboardId
: The ID of the application leaderboard .
- Headers:
Authorization
: Required. A valid authentication token.
- Response:
- A Array of objects. Json object containing the following fields:
id
: Unique ID of leaderboard rewardleaderboardId
: Unique ID of the leaderboardrewardPosition
: The position in the leaderboard for which the reward is configured.leaderBoardRewardItems
: Array of JSON object containing information about reward itemsquantity
: quantity of item to be grantedinventoryItem
: JSON object containing information about inventory item.id
: Unique Id of the inventory itemname
: Name of the inventory itemthumbnailId
: Unique Id of thumbnail.
- A Array of objects. Json object containing the following fields:
cURL Command
curl --request GET \
--url 'https://api.yarsaplay.com/api/v1/leaderboard-rewards?leaderboardId=' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
Response Body
[
{
"id": "<uuid>",
"leaderboardId": "<uuid>",
"rewardPosition": "<number>",
"leaderboardRewardItems": [
{
"quantity": "<number>",
"inventoryItem": {
"id": "<uuid>",
"name": "<string>",
"thumbnail": "string"
}
}
]
}
]