Admins can create, edit, and delete match fixtures at any point in the season. Deleted fixtures go to a recoverable trash bin before permanent removal. Once matches are finished, you can export a full season report for PDF generation.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.
Creating a fixture
To create a match, send aPOST request to /matches. All fixtures start with status pendiente (pending) and remain editable until a referee locks and starts them.
Required fields:
| Field | Type | Description |
|---|---|---|
date | datetime | Scheduled date and time of the match |
fieldId | integer | ID of the venue/field |
groupId | integer | ID of the group this match belongs to |
seasonId | integer | ID of the season |
phase | string | Match phase (see phases) |
| Field | Type | Description |
|---|---|---|
homeTeamId | integer | Home team ID (omit for knockout placeholders) |
awayTeamId | integer | Away team ID (omit for knockout placeholders) |
homePlaceholder | string | Display text when home team is not yet known (e.g. "Winner Group A") |
awayPlaceholder | string | Display text when away team is not yet known |
Fill in the required fields
Provide
date, fieldId, groupId, seasonId, and phase in the request body. If you know both teams, include homeTeamId and awayTeamId.Use placeholders for undecided opponents
For knockout fixtures where teams are not yet determined, omit the team IDs and set
homePlaceholder and awayPlaceholder instead (e.g. "Ganador Grupo B"). Voting is disabled for fixtures without real team IDs.Match phases
Thephase field accepts the following values:
| Value | Description |
|---|---|
fase_de_grupos | Group stage (default) |
octavos | Round of 16 |
cuartos | Quarter-finals |
semis | Semi-finals |
final | Final |
Editing team assignments
Once knockout opponents are determined, update the teams on an existing fixture usingPUT /matches/:id/teams. You can assign real team IDs, update or clear placeholders, or do both at once.
"Actualización de equipos".
Moving a fixture to trash
To soft-delete a fixture, sendDELETE /matches/:id. This sets is_active = false on the record — no data is lost and the fixture can be restored.
"Eliminación lógica de partido".
Managing the trash bin
Viewing trashed fixtures
Retrieve all soft-deleted fixtures withGET /matches/admin/trash. The response includes the match date, team names (or placeholders), and the season name.
Restoring a fixture
To restore a trashed fixture, sendPOST /matches/:id/restore. The fixture becomes active again and reappears in the calendar.
"Restauración de partido".
Permanent deletion
To permanently remove a fixture from the database, sendDELETE /matches/:id/permanent. The fixture must already be in trash (is_active = false).
Generating a season report
UseGET /matches/admin/report to retrieve all finished matches for a season, including their full event lists. The frontend uses this data to generate a PDF with jsPDF.
- Match metadata: date, teams, goals (regular and penalty shootout), observations
eventsarray: each event has the player name, event type, and which team side (homeoraway)
status = 'finalizado' and is_active = true appear in the report. Omitting season_id returns finished matches from all seasons.