The Players API covers the full lifecycle of a player record in FutsalLeague Manager. Any visitor can view a player’s public profile alongside their statistics for the active season. Administrators access a paginated, searchable list of all players, manage the global player database through create/update/soft-delete operations, and handle squad registrations — enrolling players into teams for a season, transferring them, unregistering them from a team, or removing them from a season entirely.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.
Public endpoints
Get player profile
GET /players/:id
Returns a player’s profile data plus their stats for the currently active season. The team_id, team_name, and team_logo fields reflect the team the player is linked to in the active season (via team_players).
Player ID.
Player ID.
Full name.
Cloudinary profile photo URL.
Date of birth (
YYYY-MM-DD).Whether the player is active (not soft-deleted).
Current team ID in the active season.
Current team name.
Current team logo URL.
Player stats for the active season.
null if no stats exist yet.| Status | Meaning |
|---|---|
404 | Player not found. |
Admin endpoints
List players
GET /players
Returns a paginated, searchable list of active players. Supports filtering to a specific season (showing only players enrolled that season) and exclusion of players already registered in a given season. Requires admin authentication.
When provided, returns only players enrolled in that season (via
team_players).Exclude players already registered in this season. Useful when adding unregistered players to a new season.
Page number (1-indexed).
Results per page.
Accent-insensitive substring search on player name.
Array of player objects. When
season_id is provided, each object also includes team_name, jersey_number, and team_id. Without a season filter, includes last_team (most recent team name).Create player
POST /players
Creates a new player record. Optionally enrolls the player in a season and assigns them to a team in the same request.
Player full name.
Date of birth in
YYYY-MM-DD format.Cloudinary image URL for the player photo.
If provided, the player is registered in this season immediately.
Team to assign the player to within the given season. Requires
season_id.| Status | Meaning |
|---|---|
400 | name not provided. |
Update player
PUT /players/:id
Updates a player’s profile fields. When photo_url changes and the Cloudinary public IDs differ, the old image is deleted automatically.
Player ID.
Player full name.
Date of birth (
YYYY-MM-DD).New photo URL.
| Status | Meaning |
|---|---|
404 | Player not found. |
Season registration endpoints
Register player in a team for a season
POST /players/:id/register
Enrolls a player in a team for a specific season and assigns a jersey number. If the player already has a registration for that season, it is replaced (transfer). Returns a 400 error if the jersey number is already taken by another player on the same team in the same season.
Player ID.
Season to register the player in.
Team to assign the player to. Omit to register the player in the season without a team assignment.
Jersey number (stored as a string to allow non-numeric values such as
"00").| Status | Meaning |
|---|---|
400 | season_id not provided. |
400 | Jersey number already taken by another player in that team/season. |
Unregister player from a team
DELETE /players/:id/unregister
Removes a player’s assignment to a specific team in a specific season. The player’s overall season enrollment is preserved — use DELETE /players/:id/season/:seasonId to remove them from the season entirely.
Player ID.
Team to unregister the player from.
Season ID.
Remove player from a season
DELETE /players/:id/season/:seasonId
Completely removes a player from a season: deletes all team_players records and all player_stats for that season. The player’s global record is not affected.
Player ID.
Season ID.
Trash management
Soft-delete player
DELETE /players/:id
Moves a player to the trash (is_active = false). Soft-deleted players do not appear in public or admin listings but retain all historical match data and statistics.
Player ID.
| Status | Meaning |
|---|---|
404 | Player not found. |
List trashed players
GET /players/admin/trash
Returns all soft-deleted players ordered alphabetically.
Response — array of full player objects with is_active: false.
Restore player from trash
POST /players/:id/restore
Restores a soft-deleted player, setting is_active = true.
Player ID.
| Status | Meaning |
|---|---|
404 | Player not found. |
Permanent deletion of players is intentionally disabled to preserve match history and Cloudinary images.