Skip to main content
A schedule (CronogramaVacaciones) represents one vacation year for a single employee. It tracks the total days available, how many flexible and block days have been used, and the approval state. The actual vacation date ranges are stored separately and linked to the schedule — see Ranges. Each employee gets exactly 30 total vacation days per period:
  • Up to 7 flexible days — short ranges of 1–7 days
  • 23 block days — continuous ranges of 7 or more days
All endpoints require a valid Authorization: Bearer <token> header. See Authentication for details.

List all schedules

Returns every schedule in the system across all employees.

GET /api/schedules

No request body. ResponseCronogramaVacaciones[]
string
required
Unique identifier for the schedule.
string
required
ID of the employee this schedule belongs to.
string
required
Vacation year label (e.g. "2026-2027").
string
required
ISO 8601 date string for when the vacation period begins.
string
required
ISO 8601 date string for when the vacation period ends.
number
required
Total vacation days in the period. Always 30.
number
required
Maximum flexible days available. Always 7.
number
required
Flexible days already scheduled.
number
required
Block days available. Always 23.
number
required
Block days already scheduled.
number
required
Days used as an advance (adelanto) against this period.
RangoVacaciones[]
required
Vacation date ranges belonging to this schedule. May be an empty array if ranges have not been fetched separately.
string
required
Approval status: "pendiente", "aprobado", or "rechazado".

List schedules for an employee

Returns all schedules that belong to a specific employee. Use this when you need only the records for one person.

GET /api/schedules/:personalId

string
required
The UUID of the employee whose schedules you want to retrieve.
No request body. ResponseCronogramaVacaciones[] filtered to the given employee. The response shape is identical to List all schedules.
Ranges are not embedded in this response. Fetch them separately with GET /api/ranges/:scheduleId for each schedule returned.

Create a schedule

Creates a new vacation schedule for an employee. Send all schedule fields except rangos — ranges are managed through the Ranges API.

POST /api/schedules

string
required
Client-generated UUID for the schedule.
string
required
ID of the employee this schedule belongs to.
string
required
Vacation year label (e.g. "2026-2027").
string
required
ISO 8601 start date of the vacation period.
string
required
ISO 8601 end date of the vacation period.
number
default:"30"
required
Total vacation days. Always 30.
number
default:"7"
required
Maximum flexible days. Always 7.
number
default:"0"
required
Flexible days already used. Set to 0 on creation.
number
default:"23"
required
Block days available. Always 23.
number
default:"0"
required
Block days already used. Set to 0 on creation.
number
default:"0"
required
Advance days already deducted. Set to 0 on creation.
string
default:"pendiente"
required
Initial approval status. One of "pendiente", "aprobado", "rechazado".
Response — the created CronogramaVacaciones object.

Update a schedule

Updates day counters and approval status on an existing schedule. This endpoint is called whenever a range is added, deleted, or rescheduled to keep the schedule’s counters in sync.

PUT /api/schedules/:id

string
required
The UUID of the schedule to update.
string
required
Schedule ID (must match the path parameter).
string
required
ID of the employee.
string
required
Vacation year label.
string
required
ISO 8601 start date.
string
required
ISO 8601 end date.
number
required
Total vacation days.
number
required
Maximum flexible days available.
number
required
Updated flexible days used.
number
required
Block days available.
number
required
Updated block days used.
number
required
Updated advance days.
string
required
Approval status: "pendiente", "aprobado", or "rechazado".
Response — the updated CronogramaVacaciones object.