Skip to content

Leaderboard

Returns a ranked list of employees based on their referral and recommendation activity. Use this to build custom leaderboards, reward programs, or internal dashboards.

Scope required: leaderboard:read

GET /api/v1/leaderboard
ParameterTypeDefaultRangeDescription
periodnumber3651–3650Days to look back
limitnumber101–50Top N employees (used with groupBy=month)
pagenumber11+Page number
pageSizenumber101–50Entries per page
vacancyIdsstring--Comma-separated vacancy IDs to filter by
groupBystring-monthGroup results by month

Points are calculated based on employee actions:

ActionPoints
Referral (employee_refer)3
Recommendation (employee_recommend)1

Employees are ranked by total points in descending order.

Terminal window
curl -H "Authorization: Bearer wintro_abc123..." \
"https://app.wintro.ai/api/v1/leaderboard?period=90&pageSize=5"

When no groupBy parameter is set, returns a flat ranked list:

{
"data": [
{
"userId": 123,
"firstName": "Jane",
"lastName": "Doe",
"profileUrl": "https://linkedin.com/in/jane-doe",
"profilePicture": "https://...",
"referCount": 5,
"recommendCount": 12,
"totalPoints": 27
}
],
"meta": {
"periodDays": 90,
"generatedAt": "2026-03-16T12:00:00.000Z",
"pagination": {
"page": 1,
"pageSize": 5,
"totalItems": 42,
"totalPages": 9
}
}
}

When groupBy=month is set, returns leaderboards grouped by month plus an overall top 3:

Terminal window
curl -H "Authorization: Bearer wintro_abc123..." \
"https://app.wintro.ai/api/v1/leaderboard?period=365&groupBy=month&limit=5"
{
"data": {
"monthly": [
{
"month": "2026-03",
"entries": [
{
"userId": 123,
"firstName": "Jane",
"lastName": "Doe",
"profileUrl": "https://linkedin.com/in/jane-doe",
"profilePicture": "https://...",
"referCount": 2,
"recommendCount": 5,
"totalPoints": 11
}
]
}
],
"topOverall": [
{
"userId": 456,
"firstName": "John",
"lastName": "Smith",
"profileUrl": "https://linkedin.com/in/john-smith",
"profilePicture": "https://...",
"referCount": 8,
"recommendCount": 20,
"totalPoints": 44
}
]
},
"meta": {
"periodDays": 365,
"limit": 5,
"groupBy": "month",
"generatedAt": "2026-03-16T12:00:00.000Z",
"pagination": {
"page": 1,
"pageSize": 10,
"totalItems": 12,
"totalPages": 2
}
}
}

When using groupBy=month:

  • monthly — One entry per month, each containing the top limit employees for that month. Pagination applies to months.
  • topOverall — The top 3 employees across the entire period (always included, not paginated).
  • limit — Controls how many employees appear per month (not used in flat mode).
FieldTypeDescription
userIdnumberWintro user ID
firstNamestring | nullEmployee’s first name
lastNamestring | nullEmployee’s last name
profileUrlstring | nullLinkedIn profile URL
profilePicturestring | nullProfile picture URL
referCountnumberNumber of referrals in the period
recommendCountnumberNumber of recommendations in the period
totalPointsnumberCalculated score (referrals x 3 + recommendations x 1)