Skip to main content

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.

FutsalLeague Manager gives every registered team and player a dedicated public page. You can browse the full team directory, dive into a team’s roster and fixture list, inspect individual player statistics, and follow the teams you care about — all without needing to be logged in for the read-only views. Following a team does require a valid account.

Team List

GET /teams returns a paginated, searchable list of all active teams. You can narrow the results by name or filter to a specific season.
GET /teams?page=1&limit=10&search=rayo&season_id=3
Query paramTypeDescription
pageintegerPage number (default: 1)
limitintegerResults per page (default: 10)
searchstringPartial name match, accent-insensitive
season_idintegerOnly return teams that participated in this season
Response
{
  "teams": [
    {
      "id": 7,
      "name": "Rayo Indoor",
      "logo_url": "https://res.cloudinary.com/.../rayo_logo.png",
      "kit_color": "#FFDD00",
      "delegate": "Carlos Martínez",
      "coach": "Paco Ruiz",
      "phone": "612345678"
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "limit": 10,
    "totalPages": 1
  }
}

Team Detail Page

GET /teams/:id returns the full profile of a single team, including its current roster, season statistics, and match schedule. If you are authenticated, the response also indicates whether you are following that team.
GET /teams/7
Authorization: Bearer <your_token>   # optional — omit for guest access
By default, players, stats, and matches are scoped to the active season. Pass season_id to view a different season (see Season Selector). Example response
{
  "id": 7,
  "name": "Rayo Indoor",
  "logo_url": "https://res.cloudinary.com/.../rayo_logo.png",
  "kit_color": "#FFDD00",
  "delegate": "Carlos Martínez",
  "coach": "Paco Ruiz",
  "phone": "612345678",
  "isFollowing": true,
  "players": [
    { "id": 23, "name": "Luis García", "photo_url": "https://...", "jersey_number": "7", "goals": 12 },
    { "id": 31, "name": "Tomás Blanco", "photo_url": "https://...", "jersey_number": "10", "goals": 5 }
  ],
  "stats": {
    "played": 14,
    "won": 9,
    "drawn": 2,
    "lost": 3,
    "goals_for": 78,
    "goals_against": 41,
    "points": 29,
    "group_name": "Grupo A"
  },
  "matches": [
    {
      "id": 101,
      "date": "2026-05-20T18:00:00",
      "status": "pendiente",
      "homeTeam": { "id": 7, "name": "Rayo Indoor", "logoUrl": "https://..." },
      "awayTeam": { "id": 12, "name": "Futsal Norte", "logoUrl": "https://..." },
      "homeGoals": null,
      "awayGoals": null,
      "field": { "id": 2, "name": "Pabellón Municipal", "location": "Calle Mayor 1" }
    }
  ],
  "upcomingMatches": [ ... ]
}
Players are sorted by jersey number in ascending order. The upcomingMatches array is a convenience subset of matches filtered to fixtures with status: "pendiente".

Player Profile

GET /players/:id returns the full profile of a player, including their current team (in the active season) and season statistics.
GET /players/23
Example response
{
  "id": 23,
  "name": "Luis García",
  "photo_url": "https://res.cloudinary.com/.../luis.jpg",
  "birth_date": "1998-03-15",
  "team_id": 7,
  "team_name": "Rayo Indoor",
  "team_logo": "https://...",
  "stats": {
    "goals": 12,
    "yellow_cards": 2,
    "red_cards": 0,
    "matches_played": 14
  }
}
If the player has no stats recorded for the active season, stats is returned as null.

Following a Team

Authenticated users can follow any team directly from its team page. The follow state is toggled with a single endpoint — no separate follow/unfollow calls needed.
POST /teams/7/toggle-follow
Authorization: Bearer <your_token>
  • Calling the endpoint when not following → follows the team and returns "isFollowing": true.
  • Calling it when already following → unfollows the team and returns "isFollowing": false.
Followed teams appear on your profile page with their upcoming fixtures highlighted.

Season Selector

Both team and player endpoints accept a season_id query parameter. When supplied, all roster data, statistics, and match results are scoped to that historical season instead of the currently active one.
GET /teams/7?season_id=2          # view Rayo Indoor's 2024 season
GET /players/23?season_id=2       # view Luis García's 2024 stats
Use the season selector to compare a team’s performance across different years, or to check which jersey number a player wore in a previous campaign. The season dropdown in the app UI sends this parameter automatically when you switch seasons.

Build docs developers (and LLMs) love