FutsalLeague Manager calculates group standings automatically the moment a match is finalized. There is no manual recalculation step — standings, tie-breaking, and the best fourth-place ranking are all derived on demand from theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Danielsl4/TFG_DAM_2526/llms.txt
Use this file to discover all available pages before exploring further.
team_stats table and cached for one hour. Results are accurate and consistent across every client as soon as the referee confirms the final whistle.
How standings are calculated
Each team earns points from their group-stage results using the standard three-point system:- Win — 3 points
- Draw — 1 point
- Loss — 0 points
Tie-breaking order
- Head-to-head points — Points earned only in the matches played between the tied teams (the mini-league). Applied first for all ties.
- Overall goal difference — Goals scored minus goals conceded across all group matches.
- Goals scored — Total goals for across all group matches.
- Fair-play points — Calculated as
yellow_cards + (red_cards × 3). The team with the lower score ranks higher. - Goals against — Fewer goals conceded is better.
When exactly two teams are tied on points, head-to-head results come first, followed by overall goal difference, goals scored, fair-play points, and goals against. When three or more teams are tied, the mini-league points from matches among all the tied teams are compared first, and the remaining criteria apply to the group as a whole.
Best fourth-place system
Tournament brackets that advance four teams from each group require a way to compare fourth-placed teams across groups that may have different sizes. FutsalLeague Manager handles this automatically. When a group has more teams than the smallest group in the competition, the fourth-place team’s statistics are adjusted before the cross-group comparison:- The result between the fourth-place team and the bottom-placed team in their group is identified.
- That match’s goals, points, and games-played contribution are subtracted from the fourth-place team’s totals, producing an adjusted row with the same number of matches as fourth-place teams from smaller groups.
- All adjusted fourth-place rows are then sorted using the same tie-breaking criteria described above.
bestFourthId and advances alongside the three automatic qualifiers from each group.
Season filtering
Passseason_id as a query parameter to retrieve standings for any historical season.
season_id is omitted, the endpoint uses the currently active season (is_active = true).
Redis caching
Standings are cached in Redis for 1 hour under the keystandings (or standings:<season_id> for historical queries). The cache is invalidated automatically when PUT /matches/:id/finish is called, so the next request after a finalization always reflects the updated table.
Response structure
Teams that have not yet played any group-stage matches do not appear in
team_stats and will be absent from the standings response until their first match is finalized.