Seasons and groups define the competition structure of the league. Each season contains one or more groups, and each group organizes the teams that play within it. Admin endpoints require a valid JWT with theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Danielsl4/TFG_DAM_2526_Consulta2/llms.txt
Use this file to discover all available pages before exploring further.
admin role.
Seasons
Seasons are the top-level container for a competition. Each season has a name, optional date range, and an active flag.Season object
Unique identifier for the season.
Display name for the season (e.g.
"Liga Sala 2025").Season start date in
YYYY-MM-DD format.Season end date in
YYYY-MM-DD format.Whether this season is currently active. Only one season can be active at a time.
GET /seasons
Returns all seasons ordered bystart_date descending. No authentication required.
cURL
POST /seasons
Creates a new season. Requiresadmin role. Optionally imports groups, team rosters, and player squads from an existing season in the same transaction.
Name of the new season.
Start date in
YYYY-MM-DD format.End date in
YYYY-MM-DD format.Set to
true to immediately activate this season. All other seasons are deactivated automatically.Season ID to import groups and player rosters from. The import runs atomically in the same database transaction as the season creation.
cURL
PUT /seasons/:id
Updates an existing season. Requiresadmin role. If is_active is set to true, all other seasons are deactivated first.
ID of the season to update.
Updated season name.
Updated start date in
YYYY-MM-DD format.Updated end date in
YYYY-MM-DD format.Set to
true to activate this season (deactivates all others).cURL
DELETE /seasons/:id
Permanently deletes a season. Requiresadmin role. Returns 400 if the season has dependent records (groups, matches).
ID of the season to delete.
POST /seasons/:id/import-structure
Clones groups, team stats, and player squads from another season into the season identified by:id. Runs atomically. Requires admin role.
ID of the destination season (the one receiving the imported structure).
ID of the source season to clone the structure from.
Only one season can be active at a time. Setting
is_active: true on any season (via POST or PUT) automatically deactivates all other seasons in the same operation.Groups
Groups organize teams within a season. Each group belongs to exactly one season.Group object
Unique identifier for the group.
Display name for the group (e.g.
"Grupo A").ID of the season this group belongs to.
GET /groups
Returns all groups joined with their season name. Optionally filter by season. No authentication required.Filter groups to a specific season.
cURL
POST /groups
Creates a new group. Requiresadmin role.
Name for the new group.
ID of the season this group belongs to.
cURL
PUT /groups/:id
Updates a group’s name or season assignment. Requiresadmin role.
ID of the group to update.
Updated group name.
Updated season ID.
cURL
DELETE /groups/:id
Permanently deletes a group. Requiresadmin role. Returns 400 if the group has associated matches.
ID of the group to delete.