Teams and players are the core entities that populate every match, standings table, and statistics ranking in FutsalManager. Team profiles carry contact and visual identity information; player profiles track biographical data. Both are season-aware: rosters, statistics, and match participation are always scoped to a specific season, defaulting to the active one when noDocumentation 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.
season_id is provided.
Team profile
A team record stores the following fields:| Field | Description |
|---|---|
name | Official team name |
logo_url | URL to the team’s logo image (uploaded via Cloudinary) |
kit_color | Primary kit colour (hex or colour name) |
delegate | Name of the team delegate or contact person |
coach | Head coach name |
phone | Contact phone number |
Team season data
When you request a team’s detail (GET /teams/:id), the response includes season-specific data alongside the static profile fields.
players — Season roster
players — Season roster
The list of players registered to the team for the requested season, ordered by jersey number (numeric sort, then alphabetical for non-numeric or missing numbers). Each entry includes:
idandnamephoto_urljersey_number(the number the player wears in this specific season)goalsscored in the current season (fromplayer_stats)
stats — Group performance
stats — Group performance
A single
team_stats row for the requested season and group, containing all standings fields: points, played, won, drawn, lost, goals_for, goals_against, yellow_cards, red_cards, and the group name. Returns null if the team has no stats yet (e.g. no matches played).matches — Full fixture list
matches — Full fixture list
All matches involving the team for the requested season, ordered by date ascending. Each entry includes both teams, the score (if played), the field, and the match status. The response also includes a filtered
upcomingMatches list containing only matches still in pendiente status.Team following
Authenticated users can follow or unfollow any team with a single toggle endpoint. The follow state is stored in theteam_followers join table.
{ "isFollowing": true } or { "isFollowing": false } depending on the new state. When you fetch a team’s detail while authenticated, the isFollowing field in the response reflects whether the current user follows that team.
Player profile
A player record contains:| Field | Description |
|---|---|
name | Full player name |
birth_date | Date of birth (used for age calculations and eligibility) |
photo_url | URL to the player’s profile photo |
GET /players/:id) also returns the player’s current team (from the active season’s team_players record) and their season statistics.
Player season statistics
When fetching a player detail, the backend joinsplayer_stats for the active season. The stats object includes:
| Field | Description |
|---|---|
goals | Goals scored in the season |
yellow_cards | Yellow cards received |
red_cards | Red cards received |
matches_played | Matches in which the player appeared in at least one event |
matches_played is incremented atomically at match finalization for every player who has at least one event (goal or card) recorded in that match. Players who were on the pitch but had no events are not counted.Paginated team and player lists
Both the team list (GET /teams) and the admin player list (GET /players) support pagination and search.
- Team list
- Player list (admin only)
| Parameter | Default | Description |
|---|---|---|
season_id | — | Filter to teams active in this season |
page | 1 | Page number (1-indexed) |
limit | 10 | Results per page |
search | "" | Case-insensitive name search (ILIKE) |
season_id is provided, only teams that have entries in team_stats or team_players for that season are returned. This filters out teams from past seasons automatically.The response includes a pagination object:Season-aware defaults
All team and player queries default to the active season whenseason_id is not specified. The active season is the one where seasons.is_active = true. This means:
GET /teams/:idwithoutseason_idshows the current squad and current standings.GET /players/:idwithoutseason_idshows stats from the active season.- Passing an explicit
season_idlets you browse historical seasons without modifying the active season record.
Only one season can be active at a time. Admins manage season activation from the admin panel. See Managing seasons for details.
Related pages
Teams API endpoints
Full reference for list, detail, create, update, delete, follow, and roster endpoints.
Players API endpoints
Full reference for player detail, list, create, edit, register, and unregister endpoints.
Player and team statistics
Season-wide rankings built from the same stats stored on player and team records.
Match scheduling
How matches reference teams and record per-player events that feed stats.