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
The type is determined automatically by the number of days requested. If
diasSolicitados <= 7 and the employee still has flexible days remaining, the type is flexible; otherwise it is bloque.
Range states
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
string
required
The UUID of the schedule whose ranges you want to retrieve.
RangoVacaciones[]
string
required
Unique identifier for the range.
string
ID of the schedule this range belongs to.
string
ID of the employee this range belongs to.
string
required
ISO 8601 start date of the vacation range (e.g.
"2026-07-14").string
required
ISO 8601 end date of the vacation range (e.g.
"2026-07-20").number
required
Number of vacation days in this range.
string
required
Range type:
"flexible" or "bloque".boolean
true if the range was extended to include a weekend because the start or end date fell on a Friday.string
"activo" or "reprogramado". Defaults to "activo".boolean
true if this range was created as a vacation advance (adelanto) against a future period.string[]
IDs of the original ranges that were replaced or merged to create this range. Present only on rescheduled replacement ranges.
string | null
ID of the replacement range that rescheduled this range.
null if the range is still active.string | null
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
string
required
Client-generated identifier for the range.
string
required
ID of the schedule this range belongs to.
string
required
ID of the employee this range belongs to.
string
required
ISO 8601 start date (e.g.
"2026-07-14").string
required
ISO 8601 end date (e.g.
"2026-07-20"). Must be on or after fechaInicio.number
required
Number of vacation days being requested.
string
required
"flexible" for ranges up to 7 days; "bloque" for 7 or more days.boolean
Whether the range extends over a weekend because a Friday was selected.
string
default:"activo"
Initial state. Use
"activo" for new ranges.boolean
default:"false"
Set to
true when creating a vacation advance.string | null
default:"null"
ID of the range that rescheduled this one. Pass
null for new ranges.string | null
default:"null"
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
string
required
The ID of the range to delete.
200 OK on success.
Rescheduling workflow
Rescheduling a range involves two coordinated API calls:1
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".2
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.3
Update the schedule counters
PUT /api/schedules/:id with the recalculated diasFlexiblesUsados and diasBloqueUsados values to keep the schedule in sync.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.