Get SuperCoach Team Rankings
Handler: GetSupercoachTeamRankingsQueryHandler
File: src/Apps/Ballr.WebApi/Integration/SuperCoachTeam/Queries/GetSupercoachTeamRankingsQueryHandler.cs
Query: GetSupercoachTeamRankingsQuery
Response: SupercoachTeamRankingsResponse
Summary
Returns overall and per-league rankings for a specific SuperCoach team for a given round, season, competition, and game type. If Round is not provided, the current round is resolved automatically from the NRL Premiership season projection, defaulting to round 1 if it cannot be determined.
| Property |
Type |
Required |
Default |
Description |
TeamId |
long |
Yes |
— |
External SuperCoach team ID |
Round |
int? |
No |
Current round |
Round number to fetch rankings for |
Year |
string? |
No |
Current UTC year |
Season year (e.g., "2026") |
Competition |
string? |
No |
"nrl" |
Competition/sport code |
CompetitionType |
string? |
No |
"classic" |
Game type |
Example Request Body
{
"query": {
"queryType": "GetSupercoachTeamRankings",
"teamId": "108368",
"round": "8",
"year": "2026",
"competition": "nrl",
"competitionType": "classic"
},
"skip": 0,
"take": null
}
Response Shape
The handler returns a single SupercoachTeamRankingsResponse:
{
"Round": 8,
"Overall": {
"LiveRank": 38476,
"RoundRank": 49004,
"TotalPts": 10189,
"PtsToFirst": 1424,
"RdScore": 1364,
"PtsToFirstRound": 442
},
"Leagues": [
{
"LeagueId": 19767,
"LeagueName": "Ballr 10k League",
"TeamCount": 2002,
"LiveRank": 501,
"RoundRank": 1764,
"TotalPts": 10656,
"PtsToFirst": 728,
"RdScore": 1325,
"PtsToFirstRound": 397
},
{
"LeagueId": 51313,
"LeagueName": "Ballr Magic Round",
"TeamCount": 319,
"LiveRank": 53,
"RoundRank": 134,
"TotalPts": 10656,
"PtsToFirst": 725,
"RdScore": 1325,
"PtsToFirstRound": 367
}
]
}
Response Fields
| Field |
Type |
Description |
Round |
int |
The round number these rankings apply to |
Overall |
OverallRankingResponse? |
Overall competition ranking (null if no overall row returned) |
Leagues |
LeagueRankingResponse[] |
Rankings for each league the team participates in |
OverallRankingResponse
| Field |
Type |
Description |
LiveRank |
int |
Current overall live rank |
RoundRank |
int |
Overall rank at end of the round |
TotalPts |
int |
Total accumulated fantasy points |
PtsToFirst |
int |
Points behind the overall leader |
RdScore |
int |
Fantasy score for the round |
PtsToFirstRound |
int |
Points behind the round leader |
LeagueRankingResponse
| Field |
Type |
Description |
LeagueId |
long |
League identifier |
LeagueName |
string |
Display name of the league |
TeamCount |
int |
Total number of teams in the league |
LiveRank |
int |
Current live rank within the league |
RoundRank |
int |
Rank within the league at end of the round |
TotalPts |
int |
Total accumulated fantasy points |
PtsToFirst |
int |
Points behind the league leader |
RdScore |
int |
Fantasy score for the round |
PtsToFirstRound |
int |
Points behind the league round leader |
SDK Types
When consuming this query from the frontend, use the following types from @luckboxstudios/foundry-sdk:
| Import |
Type |
Purpose |
@luckboxstudios/foundry-sdk |
GetSupercoachTeamRankings |
Query input interface |
@luckboxstudios/foundry-sdk |
SupercoachTeamRankingsResponse |
Response interface |
@luckboxstudios/foundry-sdk/ballr |
ballrQueries.getSupercoachTeamRankings(...) |
Builder function (sets queryType automatically) |
Usage Example
import type { GetSupercoachTeamRankings, SupercoachTeamRankingsResponse } from '@luckboxstudios/foundry-sdk';
import { ballrQueries } from '@luckboxstudios/foundry-sdk/ballr';
const query = ballrQueries.getSupercoachTeamRankings({
teamId: 108368,
round: 8,
year: '2026',
competition: 'nrl',
competitionType: 'classic'
});
const response = await client.query<GetSupercoachTeamRankings, SupercoachTeamRankingsResponse>(query);
Notes
- If
Round is not supplied, it is resolved to the current round using the NRL Premiership season projection (ProjectionVisibilityHelper.GetCurrentRoundForNrlPremiershipAsync). Defaults to round 1 if the current round cannot be determined.
- If
Year is not supplied, it defaults to the current UTC calendar year (DateTimeOffset.UtcNow.Year).
- If
Competition is not supplied, it defaults to "nrl".
- If
CompetitionType is not supplied, it defaults to "classic".
Overall may be null if no overall ranking row is returned for the given team and round.
- Unknown
source discriminator values in the data response are logged as warnings and ignored.