A season is the top-level container for a competition period. Everything in the platform — groups, team enrollments, player rosters, fixtures, and standings — belongs to a season. Only one season can be active at a time; the active season is the one displayed to users by default across the site.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Danielsl4/TFG_DAM_2526_Consulta/llms.txt
Use this file to discover all available pages before exploring further.
Create and set up a new season
Open the seasons section
In the admin panel sidebar, click Seasons. You will see a list of all
seasons ordered by start date.
Click 'New season'
Fill in the required fields:
| Field | Required | Description |
|---|---|---|
name | Yes | Display name for the season, for example 2025/2026. |
start_date | No | ISO date when the season begins. |
end_date | No | ISO date when the season ends. |
is_active | No | Set to true to make this the active season immediately. |
import_from | No | ID of a previous season to copy groups and rosters from. |
Optionally import from a previous season
If you provide an
import_from season ID, the creation runs as a single
atomic transaction that clones: - All groups from the source season into
the new season. - All team statistics records (reset to zero) for every
team that was enrolled in the source season. - All player roster entries
(team_players) including jersey numbers, so players carry their squad
numbers into the new season.You can still change group assignments and roster details afterwards.The
import_from field on season creation and the separate
POST /seasons/:id/import-structure endpoint perform the same cloning
operation. Use import_from during creation to do everything in one step.
Use the import-structure endpoint if you need to import into a season that
already exists.Setting a season as active
Only one season can be active at a time. When you setis_active = true on a season — either during creation or via an edit — the system automatically sets all other seasons to is_active = false before activating the selected one.
The active season is used as the default filter across all public-facing pages: the match calendar, standings, statistics, and team detail views all default to the active season unless the user or API call specifies otherwise.
To change the active season, edit any season and enable its Active toggle. The switch happens atomically — there is never a moment where no season or more than one season is active.
Editing a season
Send aPUT request to /seasons/:id with any combination of name, start_date, end_date, and is_active. All four fields are updated in the same call. The response returns the updated season object. Every edit is recorded in the audit log.
Importing structure from a previous season
If you already created a season and want to copy the structure from an older one, use the dedicated import endpoint:- Groups — Every group from the source season is recreated under the new season with the same name. The response includes a count of how many groups were imported.
- Team statistics — A zeroed-out
team_statsrecord is created for every team that had statistics in the source season. This enrolls teams in the new season without carrying over points, wins, or goals. - Player rosters — Every
team_playersentry from the source season is copied into the new season, preserving team assignments and jersey numbers. Duplicate entries are silently ignored.
Deleting a season
To delete, send aDELETE request to /seasons/:id. If the season has dependent records that cannot be cascaded (for example, if a foreign key constraint blocks deletion), the API returns a descriptive error message. The deletion is logged in the audit trail with the season name captured before removal.