Skip to main content
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.

Base URL

The base URL is configured via the VITE_API_URL environment variable in the front end. If the variable is not set, the default is used:
All paths in this reference are relative to that base URL (e.g. POST /api/auth/loginhttp://localhost:5175/api/auth/login).

Authentication

Every endpoint except POST /api/auth/login requires an Authorization header carrying a JWT obtained from the login endpoint.
See Authentication for details on obtaining and using tokens.

Request format

All request bodies must be JSON. Set the Content-Type header accordingly:

Error responses

Errors are returned as plain HTTP status codes with a text body. There is no structured JSON error envelope.

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

Personal

Schedules

Ranges

Quick example