Leaderboards
The Leaderboards method provides comprehensive data on leaderboard rankings, highlighting the top-performing players based on various criteria. This includes details on overall standings, showing the top 10 players. You can use this data to display competitive progress, motivate user engagement, and encourage continuous interaction within your platform.
Endpoint
GET /v1/admin/leaderboards
Response
{
"code": 200,
"data": [
{
"uid": "72a6a761347f48b6b5162ebab7fc9ac9",
"label": "Caffeine Overloaders",
"description": "Collect points via orders containing any kind of coffee",
"startDate": "2024-03-13T00:00:00",
"endDate": "2030-12-31T23:55:00",
"imageName": "https://rapidmulestorage.blob.core.windows.net/images/93779f56-26cf-4ac1-8103-26abc3fd2f0c_cup_14036518.png",
"randomizedPrize": true,
"limited": true,
"isActive": true,
"type": 0,
"standings": [
{
"rank": 1,
"playerId": "m1k1463A2DfjjE9zN57hZDagiyx1",
"username": "Player1",
"points": 96
},
{
"rank": 2,
"playerId": "UOSaAQmPmxQYkyNz9zfIEO60Mlx2",
"username": "Player2",
Response Fields
| Field | Type | Description |
|---|---|---|
uid | string | Unique identifier for the leaderboard |
label | string | Display name of the leaderboard |
description | string | Description of the leaderboard |
startDate | string | ISO 8601 timestamp of when the leaderboard starts |
endDate | string | ISO 8601 timestamp of when the leaderboard ends |
imageName | string | URL to the leaderboard's icon/image |
randomizedPrize | boolean | Whether prizes are randomized |
limited | boolean | Whether prizes are limited |
isActive | boolean | Whether this leaderboard is currently active |
type | number | Leaderboard type (0: Standard Leaderboard, 1: Season) |
standings | array | Top players' rankings |
Request Example
curl -X GET https://api.rapidmule.com/v1/admin/leaderboards \
-H "Authorization: Bearer YOUR_API_KEY"
Use Cases
- Leaderboard Widget: Display all active leaderboards with player counts
- Top Players Display: Show top players for each competition
- Competitive Analysis: Find most active and competitive leaderboards
Leaderboard Types
| Type | Description |
|---|---|
0 | Standard Leaderboard |
1 | Season |
Error Codes
| Code | Description | Resolution |
|---|---|---|
| 1001 | Payload is null | Check request parameters |
| 4001 | Invalid AuthKey | Verify API key |
Related Endpoints
- Leaderboard Details - Get detailed standings for a specific leaderboard