The Teams API lets you list teams with pagination and search, retrieve full team detail including players, stats, and fixtures, and — for administrators — create, update, or delete teams. Authenticated users can also follow or unfollow any team.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.
GET /teams — list teams
GET /teams — list teams
Returns a paginated list of all teams. When
Path:
Auth: None
season_id is provided, only teams that have stats or players registered for that season are returned.Method: GETPath:
/teamsAuth: None
Query parameters
Page number to retrieve.
Number of teams per page.
Case-insensitive substring filter applied to the team name.
When provided, restricts results to teams active in that season (present in
team_stats or team_players for the given season ID).Response
Array of team objects.
Pagination metadata.
Example
Response
GET /teams/:id — team detail
GET /teams/:id — team detail
Returns the full profile of a single team, including its current-season players, statistics, full fixture list, and upcoming matches. If no
Path:
Auth: Optional (JWT). When authenticated, the
season_id is supplied the active season is used.Method: GETPath:
/teams/:idAuth: Optional (JWT). When authenticated, the
isFollowing field reflects whether the current user follows this team.Path parameters
Team ID.
Query parameters
Season to load stats and players for. Defaults to the active season.
Response
Team ID.
Team name.
Logo URL.
Primary kit colour.
Delegate name.
Coach name.
Contact phone.
Whether the authenticated user follows this team (
false for anonymous requests).Players registered to the team in the requested season, ordered by jersey number.
Team stats for the requested season, or
null if none exist.All matches in the season (home and away), ordered by date.
Subset of
matches where status is pendiente or unset.POST /teams — create team (admin)
POST /teams — create team (admin)
Creates a new team. Optionally registers it in a season by creating a
Path:
Auth: JWT + admin role requiredResponse —
team_stats row for that season.Method: POSTPath:
/teamsAuth: JWT + admin role required
Request body
Team name. Must be unique.
Primary kit colour (e.g.
"#e63946").Full URL to the team logo image.
Name of the team delegate.
Name of the head coach.
Contact phone number.
If provided, the team is immediately enrolled in this season with zeroed stats.
Response — 201 Created
Confirmation message.
Full team record as stored in the database.
PUT /teams/:id — update team (admin)
PUT /teams/:id — update team (admin)
Updates an existing team’s profile fields.Method:
Path:
Auth: JWT + admin role requiredResponse —
PUTPath:
/teams/:idAuth: JWT + admin role required
Path parameters
Team ID to update.
Request body
Team name.
Primary kit colour.
Logo URL.
Delegate name.
Coach name.
Contact phone.
Response — 200 OK
Confirmation message.
Updated team record.
Example
DELETE /teams/:id — delete team (admin)
DELETE /teams/:id — delete team (admin)
POST /teams/:id/toggle-follow — follow or unfollow (auth required)
POST /teams/:id/toggle-follow — follow or unfollow (auth required)
Toggles the follow relationship between the authenticated user and a team. Calling the endpoint when already following will unfollow, and vice versa.Method:
Path:
Auth: JWT requiredResponse —
POSTPath:
/teams/:id/toggle-followAuth: JWT required
Path parameters
Team ID to follow or unfollow.
Response — 200 OK
Human-readable confirmation.
true if the user is now following the team, false if unfollowed.Example
Response
GET /teams/:id/players — team roster for a season
GET /teams/:id/players — team roster for a season
Returns the list of players registered to a team for a specific season, ordered by jersey number.Method:
Path:
Auth: NoneResponse —
An array of player objects:
GETPath:
/teams/:id/playersAuth: None
Path parameters
Team ID.
Query parameters
Season ID. This parameter is mandatory; the server returns
400 if it is omitted.Response — 200 OK
An array of player objects:Player ID.
Player name.
Player photo URL.
Jersey number for this team and season.
Example
Response