The Futsal League Manager REST API is a JSON HTTP API served by a Node.js/Express backend. All public and authenticated features of the platform — matches, standings, statistics, teams, players, seasons, and admin operations — are available through this API.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Danielsl4/TFG_DAM_2526_Consulta/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
The API server listens on port3000 by default. You can override this with the PORT environment variable.
Content-Type: application/json on every POST and PUT request.
CORS
The server allows requests from all origins:GET, POST, PUT, PATCH, DELETE, OPTIONS.
Authentication
Protected endpoints require a JWT passed as a Bearer token in theAuthorization header. See the authentication guide for how to obtain and use a token.
Response format
All responses return JSON. Successful responses vary by endpoint. Error responses always follow this shape:HTTP status codes
| Code | Meaning |
|---|---|
200 | Request succeeded |
201 | Resource created |
400 | Bad request — missing or invalid parameters |
401 | Unauthorized — missing or invalid token |
403 | Forbidden — insufficient role or account inactive/unverified |
404 | Resource not found |
409 | Conflict — resource already exists or record locked |
500 | Internal server error |
Rate limiting
Authentication endpoints are protected by a rate limiter backed by Redis. Exceeding the limit returns a429 response.
- Limit: 10 requests per IP per 15-minute window
- Affected endpoints:
/login,/register,/forgot-password,/resend-verification
RateLimit-* response headers.
Route groups
| Prefix | Description |
|---|---|
/ | Authentication — login, register, email verification, password reset |
/matches | Match calendar, match detail, pre-match voting, referee and admin match management |
/teams | Team detail, team following |
/players | Player detail and statistics |
/standings | Group-stage and overall standings |
/statistics | Global statistics, user rankings, per-user stats |
/admin | Admin summary dashboard, user management, audit logs, image upload |
/seasons | Season list, active season, full CRUD for admins |
/groups | Competition group management |
/fields | Playing field management |