Gestores are the external contacts — institutions, agencies, or individuals — who coordinate and book visits to the Túnel Subfluvial. Every visit must be linked to a gestor. These endpoints let authenticated users manage the gestor directory. All requests require a validDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanM84/gestor-visitas/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer <token> header. Only the DELETE endpoint additionally requires the Admin role.
GET /api/gestores
Returns a flat list of all gestores registered in the system. There is no pagination; the full set is returned in a single response. Use this endpoint to populate dropdowns and search interfaces.Array of gestor objects. Each element contains the fields listed below.
Unique gestor identifier.
Full name of the gestor or contact person.
Organisation or institution the gestor represents, if applicable.
Contact phone number.
Contact email address.
City or locality.
Province.
Country.
Gestor category. One of:
Institución Educativa, Agencia de Turismo, Club / Asociación, or Particular / Organismo Público.| Status | Meaning |
|---|---|
200 | Success — full gestor list returned |
401 | Missing or invalid token |
500 | Internal server error |
POST /api/gestores
Creates a new gestor record.nombre is the only strictly required field. If tipo is supplied it must match one of the four accepted values exactly; any other string is rejected with a 400 error.
Full name of the gestor. Cannot be blank.
Name of the organisation or institution represented.
Contact phone number.
Contact email address.
City or locality.
Province.
Country.
Gestor category. Accepted values:
Institución Educativa, Agencia de Turismo, Club / Asociación, Particular / Organismo Público.Confirmation message:
"Gestor creado exitosamente".The newly created gestor object as persisted in the database.
| Status | Meaning |
|---|---|
201 | Gestor created — returns { mensaje, gestor } |
400 | Missing nombre, empty nombre, or unrecognised tipo value |
401 | Missing or invalid token |
PUT /api/gestores/:id
Updates the data of an existing gestor. Only the fields included in the request body are changed; omitted fields retain their current values. The sametipo validation that applies to POST also applies here.
The unique identifier of the gestor to update.
Updated name. Cannot be an empty string if provided.
Updated organisation name.
Updated phone number.
Updated email address.
Updated city or locality.
Updated province.
Updated country.
Updated category. Must be one of the four accepted values if provided.
Confirmation message:
"Gestor actualizado exitosamente".The full updated gestor object as persisted in the database.
| Status | Meaning |
|---|---|
200 | Gestor updated — returns { mensaje, gestor } |
400 | Empty nombre, unrecognised tipo, or other service-layer validation error |
401 | Missing or invalid token |
DELETE /api/gestores/:id
Permanently deletes a gestor record. This operation requires theAdmin role in addition to a valid token. Attempting to delete a gestor that is linked to existing visits may result in a service-layer error depending on database constraints.
The unique identifier of the gestor to delete.
Confirmation message:
"Gestor eliminado exitosamente".| Status | Meaning |
|---|---|
200 | Gestor deleted — returns { mensaje } |
400 | Service-layer error (e.g. gestor has associated visits) |
401 | Missing or invalid token |
403 | Authenticated user does not have the Admin role |