---
title: "Update a shift"
method: PATCH
path: "/time_tracking/shifts/{external_id}"
tags: ["timeTrackingShifts"]
---

# Update a shift

`PATCH /time_tracking/shifts/{external_id}`

## Request

- Base URL: `https://api.letsdeel.com/rest`
- URL: `https://api.letsdeel.com/rest/time_tracking/shifts/{external_id}`
- Auth: HTTP bearer

Applies a partial update to an existing shift, modifying only the fields supplied in the request body. Fields omitted from the request are left unchanged. Correction shifts cannot be updated through this endpoint, the update is blocked once the payroll cycle the shift belongs to has closed, and `summary.shift_rate_external_id` cannot be repointed to a shift rate of a different type than the shift currently has.

 **Token scopes**: `time-tracking:write`

## Path parameters

- `external_id` string, required

## Request body

- object
  - `data` TimeTrackingShiftsExternalIdPatchRequestBodyContentApplicationJsonSchemaData, required
    - `summary` TimeTrackingShiftsExternalIdPatchRequestBodyContentApplicationJsonSchemaDataSummary
      - `time_amount` number, double: The amount of time for the shift. Part of the unit-amount summary group, required when the shift rate is PER_UNIT_FLAT_RATE (or MULTIPLIER_PERCENTAGE/omitted, where either group is accepted). Mutually exclusive with `shift_duration_hours`/`total_break_hours`/`payable_break_hours`/`total_payable_hours` — do not send both groups.
      - `total_break_hours` number, double: Total break duration in hours. Part of the hours-based summary group (see `shift_duration_hours`).
      - `payable_break_hours` number, double: Break hours that are payable. Part of the hours-based summary group (see `shift_duration_hours`).
      - `total_payable_hours` number, double: Total payable working hours after break deductions. Part of the hours-based summary group (see `shift_duration_hours`).
      - `shift_duration_hours` number, double: Total duration of the shift in hours. Part of the hours-based summary group, used when the shift rate is PER_HOUR_FLAT_RATE (or MULTIPLIER_PERCENTAGE/omitted, where either group is accepted). Mutually exclusive with `time_amount`/`time_unit` — do not send both groups.
      - `shift_rate_external_id` string: External ID of the shift rate associated with this shift. Its type (PER_UNIT_FLAT_RATE, PER_HOUR_FLAT_RATE, or MULTIPLIER_PERCENTAGE) determines which of the two field groups below is required — see the group descriptions.
    - `description` string: The updated description of the shift.
    - `date_of_work` string: The updated date of the shift, in YYYY-MM-DD format.
    - `payroll_cycle_ref` TimeTrackingShiftsExternalIdPatchRequestBodyContentApplicationJsonSchemaDataPayrollCycleRef: Payroll cycle reference
      - `date` string, date-time, required: date in ISO

## Response `200`

Shift updated successfully.

- TimeTrackingShiftsUpdateTimeTrackingShiftByExternalIdResponse200: Shift response wrapper
  - `data` TimeTrackingShiftsExternalIdPatchResponsesContentApplicationJsonSchemaData, required
    - `meta` TimeTrackingShiftsExternalIdPatchResponsesContentApplicationJsonSchemaDataMeta
      - `end` TimeTrackingShiftsExternalIdPatchResponsesContentApplicationJsonSchemaDataMetaEnd, required
        - `date` string, required: Shift end date
        - `time` string, required: Shift end time in HH:mm format
        - `is_rest_day` boolean, required: Indicates if it is a rest day
        - `is_public_holiday` boolean, required: Indicates if it is a public holiday
      - `start` TimeTrackingShiftsExternalIdPatchResponsesContentApplicationJsonSchemaDataMetaStart, required
        - `date` string, required: Shift start date
        - `time` string, required: Shift start time in HH:mm format
        - `is_rest_day` boolean, required: Indicates if it is a rest day
        - `is_public_holiday` boolean, required: Indicates if it is a public holiday
      - `breaks` TimeTrackingShiftsExternalIdPatchResponsesContentApplicationJsonSchemaDataMetaBreaksItems[]
        - `end` TimeTrackingShiftsExternalIdPatchResponsesContentApplicationJsonSchemaDataMetaBreaksItemsEnd, required
          - `date` string, required: Break end date
          - `time` string, required: Break end time in HH:mm format
        - `start` TimeTrackingShiftsExternalIdPatchResponsesContentApplicationJsonSchemaDataMetaBreaksItemsStart, required
          - `date` string, required: Break start date
          - `time` string, required: Break start time in HH:mm format
        - `is_paid` boolean: Indicates if the break is paid
      - `approval_date` string: Approval date for the shift, in ISO format
    - `summary` TimeTrackingShiftsExternalIdPatchResponsesContentApplicationJsonSchemaDataSummary
      - `time_unit` 'DAY' | 'HOUR' | 'MONTH' | 'WEEK': The unit of time for the shift (DAY, HOUR, MONTH, WEEK)
      - `time_amount` number, double: The amount of time for the shift
      - `total_break_hours` number, double: Total break duration in hours
      - `payable_break_hours` number, double: Break hours that are payable
      - `total_payable_hours` number, double: Total payable working hours after break deductions
      - `shift_duration_hours` number, double: Total duration of the shift in hours
      - `shift_rate_external_id` string, required: External ID of the shift rate associated with this shift
    - `created_at` string, date-time, required: Date when the shift was created
    - `shift_type` 'REGULAR' | 'CORRECTION_ABSOLUTE' | 'CORRECTION_DELTA' | 'TIME_OFF_QUALIFYING', required: Type of the shift
    - `updated_at` string, date-time, required: Date when the shift was last updated
    - `contract_id` string, required: Associated contract ID for the shift
    - `description` string, required: Description of the shift
    - `external_id` string, required: ID specified by the client for uniquely identifying the shift
    - `date_of_work` string, required: Date when the shift takes place, in YYYY-MM-DD format
    - `payroll_cycle_ref` TimeTrackingShiftsExternalIdPatchResponsesContentApplicationJsonSchemaDataPayrollCycleRef: Payroll cycle reference
      - `date` string, date-time, required: date in ISO
    - `shift_reference_id` string: External ID of the original shift this one references (set on correction shifts).

## Other responses

- `401`: Operation failed.
- `500`: Operation failed.

## Changes

- **2026-10-14** `ca9364fbe9c3`: 2 info
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `403`

[Operation history](https://skmtc.dev/deel/apis/endpoints-3/changes/time_tracking/shifts/:external_id/patch.md)

---

[API](https://skmtc.dev/deel/apis/endpoints-3.md) - [All operations](https://skmtc.dev/deel/apis/endpoints-3/llms.txt) - [OpenAPI document](https://skmtc.dev/deel/apis/endpoints-3/revisions/4585b4e41a87?raw)
