Skip to main content
See Schedules in the manual.

List schedules

Required permission: hr.schedules
Deleted schedules are not listed.

Get a schedule

Required permission: hr.schedules Returns the same object.

Create a schedule

Required permission: hr.schedules.write
Behavior
  • A day can have several shifts, but they cannot overlap.
  • Legal warnings (warnings) do not prevent saving.
201 response: the created schedule.

Edit a schedule

Required permission: hr.schedules.write Send only the fields that change. If you send shifts, it replaces all shifts. 200 response: the schedule with recalculation_queued (true if attendance recalculation was queued for the employees who have it assigned).

Delete a schedule

Required permission: hr.schedules.write
Responds 409 if the schedule has current assignments (no end date, or an end date of today or later): end them or change them first.

Get assignments

Required permission: hr.schedules
end_date: null = open-ended assignment.

Assign a schedule in bulk

Required permission: hr.schedules.write Assigns a schedule to several employees with the same validity period.
Behavior
  • Idempotent: if the employee already has an assignment that starts on start_date, it is updated instead of duplicated.
  • An assignment that overlaps another one of the employee is rejected (unless close_previous closes it).
  • Each employee is processed separately: an error does not stop the rest.
200 response
If no employee was assigned and there are errors, the response has code 422. If the schedule does not exist, 404.
Error messages for already-resolved employees (for example, overlaps) come in Spanish, with employee_id populated.

Delete an assignment

Required permission: hr.schedules.write