Matches are the core unit of competition in FutsalManager. Admins create matches before the season starts, assign teams and fields, and can update team assignments for knockout brackets as results come in. Every admin action on a match is written to the audit log automatically.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.
Create a match
status = 'pendiente'.
Request body:
| Field | Required | Description |
|---|---|---|
date | Yes | ISO datetime string for kick-off. |
homeTeamId | No | ID of the home team. Can be null for knockout matches where the team is not yet determined. |
awayTeamId | No | ID of the away team. Can be null for the same reason. |
fieldId | Yes | ID of the field where the match is played. |
groupId | Yes | ID of the group this match belongs to. |
seasonId | Yes | ID of the season. |
phase | No | Defaults to "fase_de_grupos". Use other values (e.g. "cuartos", "semifinal", "final") for knockout rounds. |
homePlaceholder | No | Display label when the home team is not yet known (e.g. "Winner Group A"). |
awayPlaceholder | No | Display label when the away team is not yet known. |
Update teams on a knockout match
null to clear a value. The response confirms success and the match cache is invalidated.
Delete a match
- All
match_eventsfor the match are deleted first. - All
match_votesfor the match are deleted. - The match row itself is deleted.
Upload an image
multipart/form-data with a field named image.
Query parameters:
| Parameter | Required | Description |
|---|---|---|
folder | No | Cloudinary folder to store the image in. Defaults to "general". |
filename | No | Custom filename. Cloudinary generates one if omitted. |
logo_url field of a team or the photo_url field of a player.
Audit log
Every admin write action — creating a season, scheduling a match, updating teams — is recorded vialogAction() with:
- The user ID who performed the action.
- A human-readable action label (e.g.
"Creación de partido"). - The entity type and entity ID affected.
- A JSON details object with relevant IDs and names.
GET /admin/summary (see the admin overview). For a full audit history, query the audit_logs table directly.