Skip to main content

Documentation 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.

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 valid 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.
curl -X GET "https://api.example.com/api/gestores" \
  -H "Authorization: Bearer <token>"
(array)
array
Array of gestor objects. Each element contains the fields listed below.
id
number
Unique gestor identifier.
nombre
string
Full name of the gestor or contact person.
empresa_institucion
string
Organisation or institution the gestor represents, if applicable.
telefono
string
Contact phone number.
email
string
Contact email address.
localidad
string
City or locality.
provincia
string
Province.
pais
string
Country.
tipo
string
Gestor category. One of: Institución Educativa, Agencia de Turismo, Club / Asociación, or Particular / Organismo Público.
StatusMeaning
200Success — full gestor list returned
401Missing or invalid token
500Internal 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.
nombre
string
required
Full name of the gestor. Cannot be blank.
empresa_institucion
string
Name of the organisation or institution represented.
telefono
string
Contact phone number.
email
string
Contact email address.
localidad
string
City or locality.
provincia
string
Province.
pais
string
Country.
tipo
string
Gestor category. Accepted values: Institución Educativa, Agencia de Turismo, Club / Asociación, Particular / Organismo Público.
mensaje
string
Confirmation message: "Gestor creado exitosamente".
gestor
object
The newly created gestor object as persisted in the database.
curl -X POST "https://api.example.com/api/gestores" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Lucía Fernández",
    "empresa_institucion": "Escuela Técnica N°5",
    "telefono": "+54 343 4123456",
    "email": "lucia.fernandez@et5.edu.ar",
    "localidad": "Paraná",
    "provincia": "Entre Ríos",
    "pais": "Argentina",
    "tipo": "Institución Educativa"
  }'
StatusMeaning
201Gestor created — returns { mensaje, gestor }
400Missing nombre, empty nombre, or unrecognised tipo value
401Missing 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 same tipo validation that applies to POST also applies here.
id
string
required
The unique identifier of the gestor to update.
nombre
string
Updated name. Cannot be an empty string if provided.
empresa_institucion
string
Updated organisation name.
telefono
string
Updated phone number.
email
string
Updated email address.
localidad
string
Updated city or locality.
provincia
string
Updated province.
pais
string
Updated country.
tipo
string
Updated category. Must be one of the four accepted values if provided.
mensaje
string
Confirmation message: "Gestor actualizado exitosamente".
gestor
object
The full updated gestor object as persisted in the database.
curl -X PUT "https://api.example.com/api/gestores/12" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "telefono": "+54 343 4987654",
    "email": "lucia.fernandez@nuevodomain.ar"
  }'
StatusMeaning
200Gestor updated — returns { mensaje, gestor }
400Empty nombre, unrecognised tipo, or other service-layer validation error
401Missing or invalid token

DELETE /api/gestores/:id

Permanently deletes a gestor record. This operation requires the Admin 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.
This endpoint requires the Admin role. Requests from authenticated non-Admin users will receive a 403 Forbidden response.
id
string
required
The unique identifier of the gestor to delete.
mensaje
string
Confirmation message: "Gestor eliminado exitosamente".
curl -X DELETE "https://api.example.com/api/gestores/12" \
  -H "Authorization: Bearer <token>"
StatusMeaning
200Gestor deleted — returns { mensaje }
400Service-layer error (e.g. gestor has associated visits)
401Missing or invalid token
403Authenticated user does not have the Admin role

Build docs developers (and LLMs) love