The Teams API gives you full control over team profiles in the Futsal League Manager. Public endpoints expose team detail and roster data for a given season, while admin-protected endpoints handle team creation, updates, soft deletion, and season registration.Documentation 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.
Team object
Unique team identifier.
Full team name.
Primary kit colour (free-text, e.g.
"red", "#FF0000").Public URL of the team logo image (hosted on Cloudinary).
Name of the team delegate or contact person.
Name of the head coach.
Contact phone number.
false when the team has been soft-deleted (sent to trash).List teams
Query parameters
Filter to teams enrolled in this season.
Exclude teams already enrolled in this season (useful when adding teams to a new season).
Case-insensitive, accent-insensitive name filter.
Page number (1-indexed).
Number of results per page.
Response
Get team detail
Path parameters
Team ID.
Query parameters
Season to scope roster and stats to. Defaults to the active season when omitted.
Response
Team ID.
Team name.
Primary kit colour.
Logo image URL.
Delegate name.
Coach name.
Contact phone.
Whether the team is active.
true if the authenticated user follows this team. Always false for unauthenticated requests.Team statistics for the requested season.
null when no stats record exists yet.All matches for the season involving this team, ordered by date ascending.
Subset of
matches where status is "pendiente" (not yet played).Example
Get team roster
Path parameters
Team ID.
Query parameters
Season to retrieve the roster for.
Response
Array of player objects sorted by jersey number:Create team
team_stats record.
Requires admin authentication. Include a valid
Authorization: Bearer <token> header.Body parameters
Team name.
Primary kit colour.
Cloudinary URL of the team logo.
Delegate name.
Coach name.
Contact phone number.
If provided, the team is immediately enrolled in this season (a
team_stats row is inserted).Response
201 Created with the newly created team object:
Update team
logo_url changes and the old and new Cloudinary public_id values differ, the old image is deleted automatically.
Requires admin authentication.
Path parameters
Team ID.
Body parameters
Team name.
Primary kit colour.
New logo URL. Pass the existing URL to keep the current logo.
Delegate name.
Coach name.
Contact phone number.
Response
Soft-delete team
is_active = false on the team. The team is moved to the trash but its data is preserved. Use POST /teams/:id/restore to undo.
Requires admin authentication.
Path parameters
Team ID.
Response
Remove team from a season
team_stats rows for the team in the given season and sets team_id = NULL on all team_players rows for that season, effectively detaching players from the team without deleting them from the league.
Requires admin authentication.
Path parameters
Team ID.
Season ID.
Response
Register team in a season
team_stats record. Any existing record for the same team-season pair is replaced to prevent duplicates.
Requires admin authentication.
Path parameters
Team ID.
Body parameters
Season to enroll the team in.
Response
Toggle follow
Requires user authentication (any role).
Path parameters
Team ID.
Response
Restore team
is_active = true.
Requires admin authentication.
Path parameters
Team ID.
Response
Permanently delete team
Requires admin authentication.
Path parameters
Team ID.
Response
Admin: trash
is_active = false, ordered alphabetically.
Requires admin authentication.
Admin: orphans
team_stats, team_players, or matches associations — useful for cleaning up unused records.
Requires admin authentication.
Admin: season report
Requires admin authentication.
Query parameters
Season to report on.