The Players API lets you manage individual player profiles and their season-by-season participation. Player records are global — the same player can belong to different teams across different seasons via 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.
team_players join table. Stats such as goals, yellow cards, and red cards are always scoped to a season.
Player object
Unique player identifier.
Full player name.
Date of birth in
YYYY-MM-DD format.Public URL of the player photo (hosted on Cloudinary).
false when the player has been soft-deleted (sent to trash).Get player detail
Path parameters
Player ID.
Response
Player ID.
Player name.
Date of birth (
YYYY-MM-DD).Photo URL.
Whether the player is active.
ID of the team the player belongs to in the active season.
Name of that team.
Logo URL of that team.
Season statistics.
null if no stats record exists for the active season.Example
List players
season_id is supplied, only players enrolled in that season are returned, each with their team name and jersey number.
Requires admin authentication.
Query parameters
Filter to players enrolled in this season.
Exclude players already enrolled in this season (useful when assigning players to a new season).
Case-insensitive, accent-insensitive name filter.
Page number (1-indexed).
Number of results per page.
Response
Create player
Requires admin authentication.
Body parameters
Full player name.
Date of birth in
YYYY-MM-DD format.Cloudinary URL of the player photo.
If provided, creates a
team_players row for this season.Team to assign the player to (requires
season_id). When season_id is set but team_id is omitted, the player is enrolled in the season without a team.Response
201 Created:
Update player
photo_url changes and the Cloudinary public_id differs, the old photo is automatically deleted from Cloudinary.
Requires admin authentication.
Path parameters
Player ID.
Body parameters
Full player name.
Date of birth in
YYYY-MM-DD format.New photo URL. Pass the existing URL to keep the current photo.
Response
Register player in a team/season
Requires admin authentication.
Path parameters
Player ID.
Body parameters
Season to enroll the player in.
Team to assign the player to. Omit to enroll in the season without a team.
Squad number. Must be unique within the team and season.
Response
Unregister player from a team
Requires admin authentication.
Path parameters
Player ID.
Body parameters
Team to remove the player from.
Season to scope the removal to.
Response
Remove player from a season
team_players records for the given season and deletes their player_stats for that season. The player profile is not deleted.
Requires admin authentication.
Path parameters
Player ID.
Season ID.
Response
Soft-delete player
is_active = false on the player. The player is moved to the trash but their data is preserved. Use POST /players/:id/restore to undo.
Requires admin authentication.
Path parameters
Player ID.
Response
Restore player
is_active = true.
Requires admin authentication.
Path parameters
Player ID.
Response
Permanently delete player
Requires admin authentication.
Path parameters
Player ID.
Response
Admin: trash
is_active = false, ordered alphabetically.
Requires admin authentication.
Admin: orphans
team_players, player_stats, or match_events associations — useful for cleaning up unused records.
Requires admin authentication.