Seasons are the top-level containers that organize every competition in FutsalLeague Manager. A season holds groups, which hold teams, which have registered players. Matches are always tied to a season, and all statistics — player goals, team standings, user prediction points — are scoped per season. This page walks through the full lifecycle from creation to closing a competition, including the time-saving import system for recurring leagues.Documentation 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.
Season lifecycle
Full setup workflow
Create the season
Call The response returns the full season object including its generated
POST /seasons with a name, optional start and end dates, and an is_active flag. Setting is_active: true automatically deactivates all other seasons.id.Create groups
Groups define the competition divisions within a season (for example, Group A and Group B in a group stage). Call Groups can be renamed (
POST /groups for each group:PUT /groups/:id) or deleted (DELETE /groups/:id) as long as they have no matches associated.Register teams in the season
An existing team must be explicitly enrolled in a season before it can participate. Use This creates a
POST /teams/:id/register with the target season_id:team_stats row for the team in that season with all counters set to zero. You can also create a brand-new team and enroll it in the same request by passing season_id to POST /teams.Assign teams to groups
Once teams are registered in the season, place them in competition groups via This creates the team’s group-specific stats entry. To remove a team from a group without removing it from the season entirely, call
POST /groups/:id/teams:DELETE /groups/:id/teams/:teamId?season_id=4.Register players
Players are linked to a team for a specific season through the If a player already has a registration in this season it is replaced, preventing duplicate entries. Jersey numbers are validated for uniqueness within the same team and season.
team_players table. Enroll a player with POST /players/:id/register:Schedule matches
With teams and groups in place, create matches via
POST /matches. See Match management for the full field reference and the referee workflow.Run the competition
Referees lock, score, and finalize matches. Each finalized match atomically updates team standings in
team_stats and individual stats in player_stats.Activating a season
Sendingis_active: true when creating or updating a season triggers a global deactivation of all other seasons in a single transaction before the target season is updated. This ensures exactly one active season at all times:
Importing structure from a previous season
When running a recurring edition of the same league you can clone groups, teams, and player squads from an existing season instead of rebuilding everything from scratch. Stats are reset to zero for all cloned entries.Option 1 — Import during season creation
Passimport_from in the POST /seasons body:
Option 2 — Import into an existing season
If you created the season first and want to import structure later, callPOST /seasons/:id/import-structure:
- All group names from the source season (assigned to the new season)
- A fresh
team_statsrow (all zeros) for every team that participated in the source season - All
team_playersrows from the source season, preserving jersey numbers
- Match history and events
- Any statistics (goals, cards, points — all start at zero)
- Group assignments for teams (you reassign teams to groups after import)
Removing a team from a season
To withdraw a team from a specific season without deleting the team from the system, callDELETE /teams/:id/season/:seasonId:
team_stats rows for that season and unlinks all its players from the team within that season (the players themselves remain active in the system). The team entity is untouched and can be registered in future seasons.
Group management reference
| Action | Endpoint | Notes |
|---|---|---|
| List groups | GET /groups?season_id=4 | Returns group name and season name |
| Create group | POST /groups | Requires name and season_id |
| Rename group | PUT /groups/:id | |
| Delete group | DELETE /groups/:id | Fails if group has associated matches |
| List teams in group | GET /groups/:id/teams | Returns standings sorted by points |
| Add team to group | POST /groups/:id/teams | Creates stats row; fails if team already in group |
| Remove team from group | DELETE /groups/:id/teams/:teamId?season_id=X | Removes stats row only |
Season deletion
DELETE /seasons/:id permanently removes the season and all its direct dependencies. This will fail if the season has groups or matches attached; remove those first or use a dedicated season deactivation workflow instead of deletion when you need to preserve historical data.