Antylogic
DemoApp login

399 operational guides

Docs sections
DocsTeam and attendance
Device

Delete a staff shift

Remove an existing staff shift attendance event for the current location from the editable calendar screen or from a non-pending Attendance corrections row.

In this article

Use this guide when an incorrect staff shift needs to be removed before manager review or payroll preparation. The action deletes the `calendar_events` row for the shift; it does not change the staff member record.

The implemented product flow deletes staff shifts through the calendar event route. Use the direct staff shift delete route only if product code later implements it.

Before you start

  • The operator is signed in and has Harbor Demo Group with Harbor Soho selected in the GB demo context.
  • An existing `calendar_events` record belongs to the selected location, has `kind='staff_shift'`, and represents the shift to remove, for example an Olivia Hart attendance record.
  • The operator has `staff-shifts:manage` for the location. `staff-shifts:view` is not enough to delete.
  • For capture runs, use a disposable `STAFF_SHIFT_EVENT_ID` or discover a safe existing `staff_shift` event in the documentation runtime before confirming deletion.

Instructions

  1. 1.

    Open the staff shift

    Open the shift from the calendar, or go directly to `/:orgId/:locationId/calendars/edit/:eventId?kind=staff_shift`. From Attendance corrections, use `pending_only=false` and choose a row that is not waiting for a pending correction.

  2. 2.

    Review the record

    Check the employee, date, entry and exit times, and attendance source before deleting. The Delete button appears only for an existing editable staff shift, not while creating a shift or requesting a personal correction.

  3. 3.

    Open the confirmation

    Select Delete. Antylogic opens the destructive Delete event confirmation and explains that the staff shift will be removed permanently. Closing or cancelling the modal leaves the shift unchanged.

  4. 4.

    Confirm deletion

    Select Delete in the modal only when the shift should be removed. On success, the edit form shows Event deleted successfully and returns to the previous route; Attendance corrections refreshes its corrections and active shifts lists.

Validations and limits

  • The selected organisation and location must exist before the editable form can operate.
  • The event id must exist, belong to the current location, and load as `kind='staff_shift'`. Events from another location are treated as not found.
  • `staff-shifts:manage` is required for the editable delete flow. Operators with only `staff-shifts:view` get read-only or blocked management surfaces.
  • Attendance corrections disables Delete for rows with a pending correction.
  • The working request is `DELETE /api/app/{orgId}/{locationId}/calendar-events/{eventId}` with no body, returning `204 No Content` on success.
  • Deletion is permanent for the `calendar_events` record; it is not an archive action and does not modify the `staff` record.
  • No implemented rule was found that blocks deletion by shift source or by start or end status.
  • Do not document `DELETE /api/app/{orgId}/{locationId}/staff/{staffId}/shifts/{shiftId}` as the working path for this action.

Expected result

The incorrect staff shift is removed from the location calendar and attendance surfaces, related calendar-event caches refresh, and the staff member profile remains unchanged.

Related articles