v1

latestOpenAPI 3.1.02026-07-26549156879.0 KB
ShiftManagement > Shift

Bulk deletes a Shift

Bulk deletes a Shift

post/api/2026-07-01/resources/shift_management/shifts/bulk_delete

Request body

idsstring[]

Filter shifts by their unique identifiers. Deletes only shifts matching the provided IDs. If not provided, uses other filters to determine which shifts to delete

start_atstring

Filter shifts that end on or after this date. Only the date (calendar day) is used; the time part is ignored (treated as start of day, 00:00:00). Shifts are included if their end time is at or after the start of the specified day

end_atstring

Filter shifts that start before this date. Only the date (calendar day) is used; the time part is ignored (treated as end of day, 23:59:59). Shifts are included if their start time is before the end of the specified day

employee_idsstring[]

Filter shifts by employee identifiers. Deletes only shifts assigned to the specified employees. Can be combined with start_at and end_at for precise bulk deletion

destroy_backup_shiftsboolean

Also destroys shifts with status backup when true, which by default are being kept

author_idstring required

Identifier of the user/access who is performing the bulk delete operation. Used for audit purposes and tracking who deleted the shifts

Example request

{
  "ids": [
    "1"
  ],
  "start_at": "2020-01-01T15:00:00.000+00:00",
  "end_at": "2020-12-31T15:00:00.000+00:00",
  "employee_ids": [
    "1"
  ],
  "destroy_backup_shifts": true,
  "author_id": "1781"
}

Response

OK

idstring required

Unique identifier for the shift

company_idstring required

Identifier of the company that owns this shift

namestring

Display name of the shift. If not explicitly set, falls back to the default shift title or template week name

state'draft' | 'published' | 'backup' required

Current state of the shift. 'draft' means the shift is not yet visible to employees, 'published' means it's visible and confirmed, 'backup' indicates a backup shift that can be replaced

location_idstring

Identifier of the location where the shift takes place. Can be null if the shift uses the employee's default location

locations_work_area_idstring

Identifier of the specific work area within the location where the shift occurs. Work areas allow further subdivision of locations

employee_idstring required

Identifier of the employee assigned to this shift

start_atstring required

Timestamp indicating when the shift starts

end_atstring required

Timestamp indicating when the shift ends

notesstring

Optional notes or comments about the shift, visible to managers and schedulers

extra_hoursboolean required

Indicates whether this shift counts as extra hours beyond the employee's regular schedule. Used for overtime calculations

default_shift_titlestring

Title from the default shift template that was used to create this shift, if applicable

timezonestring required

IANA timezone identifier (e.g., 'Europe/Madrid', 'America/New_York') used to display the shift times in the local timezone

local_start_atstring required

Start time of the shift converted to the local timezone. This is what employees see in their schedule

local_end_atstring required

End time of the shift converted to the local timezone. This is what employees see in their schedule

Example response

[
  {
    "id": "1",
    "company_id": "1",
    "name": "Morning shift",
    "state": "draft",
    "location_id": "3",
    "locations_work_area_id": "5",
    "employee_id": "1",
    "start_at": "2020-09-07T06:00:00.000+00:00",
    "end_at": "2020-09-07T15:00:00.000+00:00",
    "notes": "This is a shift note",
    "default_shift_title": "Morning shift",
    "timezone": "Europe/Madrid",
    "local_start_at": "2020-09-07T08:00:00.000+00:00",
    "local_end_at": "2020-09-07T17:00:00.000+00:00"
  }
]