Use this file to discover all available pages before exploring further.
The competition structure is defined by three related resources. Seasons represent the competition year and carry an is_active flag to mark the running edition. Groups belong to a season and act as the pools teams are sorted into for the group stage. Fields are the physical venues where matches are played. Read endpoints for all three resources are public; write operations require an admin JWT.
Creates a new season. If is_active is true, all other seasons are deactivated atomically in the same transaction.Optionally, pass import_from with the ID of an existing season to clone that season’s groups, team enrollments, and player rosters (with zeroed stats) into the new season in the same transaction.Method:POSTPath:/seasonsAuth: JWT + admin role required
Updates a season’s name, dates, or active status. Setting is_active to true deactivates all other seasons.Method:PUTPath:/seasons/:idAuth: JWT + admin role required
Permanently deletes a season. Returns an error if the season has dependent records such as groups or matches.Method:DELETEPath:/seasons/:idAuth: JWT + admin role required
POST /seasons/:id/import-structure — clone structure from another season (admin)
Clones groups, team stats (zeroed), and player rosters from a source season into an existing target season. All operations are performed in a single database transaction.Method:POSTPath:/seasons/:id/import-structureAuth: JWT + admin role required
Returns all groups joined with their season name, ordered by season start date descending and then by group name. Optionally filter by season.Method:GETPath:/groupsAuth: None
POST /groups/:id/teams — assign a team to a group (admin)
Creates a team_stats row linking a team to a group and season. Returns 400 if the team is already in this group for the given season.Method:POSTPath:/groups/:id/teamsAuth: JWT + admin role required
DELETE /groups/:id/teams/:teamId — remove a team from a group (admin)
Removes a team’s assignment from a group in a given season by deleting the corresponding team_stats row.Method:DELETEPath:/groups/:id/teams/:teamIdAuth: JWT + admin role required