Health Checks
Direct health check (bypasses DB connection). Returns
{"ok": true, "mode": "direct"}.
Express health check. Verifies that the Express app is running.
Authentication (/api/auth)
Register a new user.
| Parameter |
Type |
Description |
| nombreREQUIRED |
string |
First name |
| apellidoREQUIRED |
string |
Last name |
| dniREQUIRED |
string |
Unique ID number |
| emailREQUIRED |
string |
Unique email address |
| passwordREQUIRED |
string |
Password |
| fechaNacimientoREQUIRED |
date |
Date of birth (YYYY-MM-DD) |
| telefonoREQUIRED |
string |
Phone number |
| rolOPTIONAL |
string |
"USUARIO" (default) or "ADMIN" (only allowed if 0 admins exist) |
Login. Returns JWT in HttpOnly cookie.
| Parameter |
Type |
Description |
| emailREQUIRED |
string |
Registered email |
| passwordREQUIRED |
string |
Password |
Login (Bearer Token). Returns JWT in response body (for API clients).
| Parameter |
Type |
Description |
| emailREQUIRED |
string |
Registered email |
| passwordREQUIRED |
string |
Password |
Logout. Clears authentication cookies.
Get current authenticated user details.
Events (/api/events)
List events with filtering and pagination.
| Query Param |
Type |
Description |
| pageOPTIONAL |
number |
Page number (default: 1) |
| limitOPTIONAL |
number |
Items per page (default: 10) |
| sortOPTIONAL |
string |
Field to sort by (default: "fecha") |
| orderOPTIONAL |
string |
"asc" or "desc" (default: "asc") |
| qOPTIONAL |
string |
Search term (title, description, location) |
| categoriaOPTIONAL |
string |
Filter by category |
| ciudadOPTIONAL |
string |
Filter by city |
| fromOPTIONAL |
date |
Start date filter |
| toOPTIONAL |
date |
End date filter |
| hideSoldOutOPTIONAL |
boolean |
Hide sold out events |
Get list of event categories.
Create a new event.
| Parameter |
Type |
Description |
| tituloREQUIRED |
string |
Event title |
| descripcionREQUIRED |
string |
Event description |
| fechaREQUIRED |
date |
Event date |
| horaREQUIRED |
string |
Event time |
| ubicacionREQUIRED |
object |
{ lugar, direccion, ciudad, provincia, lat, lng } |
| categoriaREQUIRED |
string |
Event category |
| capacidadTotalREQUIRED |
number |
Total tickets available |
| precioREQUIRED |
number |
Ticket price |
| imagenOPTIONAL |
string |
URL of event image |
Update an existing event.
Users (/api/users)
Update my basic info.
| Parameter |
Type |
Description |
| emailOPTIONAL |
string |
New email |
| telefonoOPTIONAL |
string |
New phone number |
Change password.
| Parameter |
Type |
Description |
| currentPasswordREQUIRED |
string |
Current password |
| newPasswordREQUIRED |
string |
New password |
List all users (paginated).
Tickets (/api/tickets)
Create a ticket (Manual creation).
| Parameter |
Type |
Description |
| eventoREQUIRED |
string |
Event ID |
| tipoEntradaREQUIRED |
string |
Ticket type (e.g., "GENERAL") |
| precioPagadoOPTIONAL |
number |
Price paid (defaults to event price) |
| compradorOPTIONAL |
string |
User ID (Admin only) |
Get ticket details by ID.
Payments (/api/pagos)
Process a payment and generate a ticket.
| Parameter |
Type |
Description |
| eventoREQUIRED |
string |
Event ID (if creating new ticket) |
| tipoEntradaREQUIRED |
string |
Ticket type (if creating new ticket) |
| precioPagadoREQUIRED |
number |
Amount paid |
| metodoREQUIRED |
string |
Payment method (e.g., "CREDIT_CARD") |
| montoREQUIRED |
number |
Total amount |
| referenciaExternaOPTIONAL |
string |
External payment reference |
| ticketIdOPTIONAL |
string |
Existing ticket ID (if paying for existing ticket) |
Reviews (/api/reviews)
List reviews (paginated).
Create a review.
| Parameter |
Type |
Description |
| ratingREQUIRED |
number |
Rating (1-5) |
| commentREQUIRED |
string |
Review text |