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.

The Statistics API exposes three endpoints. The main endpoint returns season-level aggregates alongside team and individual player rankings. Two additional endpoints expose a public top-10 user leaderboard and an authenticated endpoint that returns a user’s own porra (match-prediction) points and vote history.
Returns global season statistics, five-team rankings across several categories, and top-five individual player leaderboards. When no season_id is given, the active season is used.Method: GET
Path: /statistics
Auth: None

Query parameters

season_id
number
Season to aggregate statistics for. Defaults to the active season.

Response

global
object
Aggregate match and card counts for the season.
teamRankings
object
Five ranked lists of teams, each containing up to 5 entries.
individualRankings
object
Top-5 player leaderboards.

Example

curl "https://api.futsalmanager.example/statistics?season_id=3"
Response
{
  "global": {
    "matchesPlayed": 48,
    "totalGoals": 312,
    "avgGoals": 6.5,
    "totalYellows": 87,
    "totalReds": 6,
    "totalCleanSheets": 14
  },
  "teamRankings": {
    "mostWins": [
      { "id": 7, "name": "Atlético Norte", "logo_url": "...", "won": 14, "lost": 2, "drawn": 2, "goals_for": 92, "goals_against": 41 }
    ],
    "mostLosses": [],
    "mostDraws": [],
    "bestOffense": [],
    "bestDefense": []
  },
  "individualRankings": {
    "topScorers": [
      { "id": 42, "name": "Marcos Ruiz", "photo_url": "...", "team_name": "Atlético Norte", "value": 22 }
    ],
    "topYellowCards": [],
    "topRedCards": []
  }
}
Returns the global leaderboard of the top 10 users ranked by total porra (match-prediction) points. Ties are broken alphabetically by username.Method: GET
Path: /statistics/user-ranking
Auth: None

Response — 200 OK

An array of up to 10 user objects:
id
number
User ID.
username
string
Username.
points
number
Total porra points accumulated.

Example

curl "https://api.futsalmanager.example/statistics/user-ranking"
Response
[
  { "id": 3, "username": "predictor_pro", "points": 145 },
  { "id": 11, "username": "futsal_fan_88", "points": 132 }
]
Returns the authenticated user’s total porra points, their current global rank, and a history of their last 20 match votes with outcomes.Method: GET
Path: /statistics/user-stats
Auth: JWT required

Response — 200 OK

totalPoints
number
Total porra points earned by the user.
globalRank
number
User’s position in the global ranking (1-indexed).
history
object[]
Up to 20 most recent vote records, ordered by match date descending.

Example

curl "https://api.futsalmanager.example/statistics/user-stats" \
  -H "Authorization: Bearer <token>"

Build docs developers (and LLMs) love