The Vacaciones API is a JSON REST API that powers the Módulo de Registro de Vacaciones front end. All communication happens over HTTP and every request (except login) must include a valid JWT bearer token.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CKoldo/Vacaciones-front/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
The base URL is configured via theVITE_API_URL environment variable in the front end. If the variable is not set, the default is used:
POST /api/auth/login → http://localhost:5175/api/auth/login).
Authentication
Every endpoint exceptPOST /api/auth/login requires an Authorization header carrying a JWT obtained from the login endpoint.
Request format
All request bodies must be JSON. Set theContent-Type header accordingly:
Error responses
Errors are returned as plain HTTP status codes with a text body. There is no structured JSON error envelope.| Status | Meaning |
|---|---|
400 | Bad request — malformed body or missing required fields |
401 | Unauthorized — missing or invalid token |
404 | Not found — the requested resource does not exist |
500 | Internal server error |
Available endpoints
Authentication
Obtain a JWT token via username and password login.
Personal
Create, list, and delete employee records.
Schedules
Manage vacation schedules (cronogramas) per employee and year.
Ranges
Create, list, and delete vacation date ranges within a schedule.
Authentication
| Method | Path | Description |
|---|---|---|
POST | /api/auth/login | Exchange credentials for a JWT |
Personal
| Method | Path | Description |
|---|---|---|
GET | /api/personal | List all employees |
POST | /api/personal | Create an employee |
DELETE | /api/personal/:id | Delete an employee |
Schedules
| Method | Path | Description |
|---|---|---|
GET | /api/schedules | List all vacation schedules |
GET | /api/schedules/:personalId | List schedules for a specific employee |
POST | /api/schedules | Create a vacation schedule |
PUT | /api/schedules/:id | Update a vacation schedule |
Ranges
| Method | Path | Description |
|---|---|---|
GET | /api/ranges/:scheduleId | List ranges for a schedule |
POST | /api/ranges | Create a vacation range |
DELETE | /api/ranges/:id | Delete a vacation range |
