Fields represent the physical venues where matches are played. Each match can be assigned a field. Write operations require a valid JWT with theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Danielsl4/TFG_DAM_2526_Consulta2/llms.txt
Use this file to discover all available pages before exploring further.
admin role; the listing endpoint is public.
Field object
Unique identifier for the field.
Display name of the field (e.g.
"Pabellón Municipal Norte").Address or description of the venue’s location.
Whether the field is currently active. Inactive fields have been soft-deleted and do not appear in the public listing.
GET /fields
Returns all active fields (is_active = true) ordered alphabetically by name. No authentication required.
cURL
POST /fields
Creates a new field. Requiresadmin role.
Name of the field.
Address or description of the venue’s location.
cURL
PUT /fields/:id
Updates the name and/or location of a field. Requiresadmin role.
ID of the field to update.
Updated name for the field.
Updated location description.
cURL
DELETE /fields/:id
Soft-deletes a field by settingis_active = false. The record is retained in the database and can be restored. Requires admin role.
ID of the field to deactivate.
cURL
GET /fields/admin/trash
Returns all inactive fields (is_active = false). Requires admin role.
POST /fields/:id/restore
Restores a soft-deleted field by settingis_active = true. Requires admin role.
ID of the field to restore.
DELETE /fields/:id/permanent
Permanently removes a field record from the database. The field must already be inactive (soft-deleted) before it can be permanently deleted. Returns400 if the field is still active or has matches associated with it. Requires admin role.
ID of the field to permanently delete.
Fields are referenced by matches via
field_id. Calling DELETE /fields/:id performs a soft delete (is_active = false) to preserve match history. Use DELETE /fields/:id/permanent only after the field has been moved to the trash and confirmed to have no associated matches.