A range (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.
RangoVacaciones) is a single block of vacation dates within a schedule. Ranges are linked to a schedule via scheduleId and to an employee via personalId. Multiple ranges make up an employee’s vacation plan for the year.
Range types
| Type | Description |
|---|---|
flexible | Short vacation of 1–7 days. Up to 7 flexible days can be taken per period. |
bloque | Continuous vacation of 7 or more days. Uses days from the 23-day block allocation. |
diasSolicitados <= 7 and the employee still has flexible days remaining, the type is flexible; otherwise it is bloque.
Range states
| State | Description |
|---|---|
activo | The range is active and has not been rescheduled. |
reprogramado | The range was replaced by a new range. The original is kept for audit purposes and its reprogramadoPor field points to the replacement. |
Reschedule linkage
When a range is rescheduled, the system creates a new range and marks the original asreprogramado:
reprogramadoPor— ID of the new range that replaced this one (set on the original).reprogramadoDesde— array of IDs of original ranges that were merged or replaced to create this new range (set on the new range).
All endpoints require a valid
Authorization: Bearer <token> header. See Authentication for details.List ranges for a schedule
Returns all vacation ranges belonging to a specific schedule.GET /api/ranges/:scheduleId
The UUID of the schedule whose ranges you want to retrieve.
RangoVacaciones[]
Unique identifier for the range.
ID of the schedule this range belongs to.
ID of the employee this range belongs to.
ISO 8601 start date of the vacation range (e.g.
"2026-07-14").ISO 8601 end date of the vacation range (e.g.
"2026-07-20").Number of vacation days in this range.
Range type:
"flexible" or "bloque".true if the range was extended to include a weekend because the start or end date fell on a Friday."activo" or "reprogramado". Defaults to "activo".true if this range was created as a vacation advance (adelanto) against a future period.IDs of the original ranges that were replaced or merged to create this range. Present only on rescheduled replacement ranges.
ID of the replacement range that rescheduled this range.
null if the range is still active.ID of the linked ESINAD document, if any.
Create a range
Creates a new vacation date range and associates it with a schedule.POST /api/ranges
Client-generated identifier for the range.
ID of the schedule this range belongs to.
ID of the employee this range belongs to.
ISO 8601 start date (e.g.
"2026-07-14").ISO 8601 end date (e.g.
"2026-07-20"). Must be on or after fechaInicio.Number of vacation days being requested.
"flexible" for ranges up to 7 days; "bloque" for 7 or more days.Whether the range extends over a weekend because a Friday was selected.
Initial state. Use
"activo" for new ranges.Set to
true when creating a vacation advance.ID of the range that rescheduled this one. Pass
null for new ranges.ID of a linked ESINAD document. Pass
null if not applicable.After creating a range, update the parent schedule’s day counters with
PUT /api/schedules/:id to keep diasFlexiblesUsados and diasBloqueUsados accurate.RangoVacaciones object.
Delete a range
Deletes a vacation range by its ID.DELETE /api/ranges/:id
The ID of the range to delete.
200 OK on success.
Rescheduling workflow
Rescheduling a range involves two coordinated API calls:Create the replacement range(s)
POST /api/ranges for each new range, setting reprogramadoDesde to the IDs of the original ranges being replaced, and estado: "activo".Delete the original ranges
DELETE /api/ranges/:id for each original range being replaced. The front end archives these by removing them and storing rescheduling metadata client-side.The
reprogramadoDesde array on the new range records which original ranges it replaced. This linkage powers the rescheduling history displayed in the Vacation Overview module.