---
title: "Create shifts"
method: POST
path: "/v2/time_tracking/shifts"
tags: ["timeTrackingShifts"]
---

# Create shifts

`POST /v2/time_tracking/shifts`

## Request

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

Creates categorised shifts, each with a shift type and rate, for a Global Payroll contract, including corrections to shifts already exported to payroll. Shifts are saved first and exported to payroll in the background, so the call returns before the export finishes. To create shifts with only clock-in and clock-out times, use `POST /rest/v2/time_tracking/shifts/raw`.

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

## Request body

- object
  - `data` V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaData, required
    - `shifts` V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItems[], required
      - union
        - V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItems0
          - `summary` V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItemsOneOf0Summary, required: Shift summary. The fields here form two mutually exclusive groups — hours-based (`shift_duration_hours`, `total_break_hours`, `payable_break_hours`, `total_payable_hours`) and unit-amount (`time_amount`, `time_unit`) — and the schema cannot express this as a strict either/or because which group is required depends on the shift rate (`shift_rate_external_id`) type, resolved server-side: PER_UNIT_FLAT_RATE requires the unit-amount group, PER_HOUR_FLAT_RATE requires the hours-based group, and MULTIPLIER_PERCENTAGE (or no shift rate) accepts either group but not a mix of both. Sending fields from both groups, or the wrong group for the rate type, is rejected.
            - `time_unit` 'DAY' | 'HOUR' | 'MONTH' | 'WEEK': The unit of time for the shift (DAY, HOUR, MONTH, WEEK). Part of the unit-amount summary group (see `time_amount`).
            - `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.
          - `shift_type` 'REGULAR': Type of the shift
          - `description` string, required: Description of the shift.
          - `external_id` string, required: External ID of the shift.
          - `date_of_work` string, required
          - `payroll_cycle_ref` V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItemsOneOf0PayrollCycleRef: Payroll cycle reference
            - `date` string, date-time, required: date in ISO
        - V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItems1
          - `summary` V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItemsOneOf1Summary, required
            - `time_unit` 'DAY' | 'HOUR' | 'MONTH' | 'WEEK': The unit of time for the shift (DAY, HOUR, MONTH, WEEK). Part of the unit-amount summary group (see `time_amount`).
            - `time_amount` number, double: Corrected amount of time (0 zeroes the original 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: Corrected total payable hours (0 zeroes the original shift). 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_type` 'CORRECTION_ABSOLUTE', required: Type of the shift
          - `description` string, required: Description of the shift.
          - `external_id` string, required: External ID of the shift.
          - `payroll_cycle_ref` V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItemsOneOf1PayrollCycleRef: Payroll cycle reference
            - `date` string, date-time, required: date in ISO
          - `shift_reference_id` string, required: External ID of the original shift being corrected.
        - V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItems2
          - `shift_type` 'CORRECTION_DELTA', required: Type of the shift
          - `corrections` V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItemsOneOf2CorrectionsItems[], required
            - `type` 'ADDITION' | 'SUBTRACTION', required: Type of correction
            - `time_amount` number, double: Time amount to add or subtract
            - `total_break_hours` number, double: Break hours to add or subtract
            - `payable_break_hours` number, double: Payable break hours to add or subtract
            - `total_payable_hours` number, double: Payable hours to add or subtract
            - `shift_duration_hours` number, double: Shift duration hours to add or subtract
          - `description` string, required: Description of the shift.
          - `external_id` string, required: External ID of the shift.
          - `payroll_cycle_ref` V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItemsOneOf2PayrollCycleRef: Payroll cycle reference
            - `date` string, date-time, required: date in ISO
          - `shift_reference_id` string, required: External ID of the original shift being corrected.
    - `contract_id` string, required: The unique identifier of the employee contract.

## Response `201`

Successful operation.

- TimeTrackingShiftsCreateTimeTrackingShiftsResponse201
  - `data` V2TimeTrackingShiftsPostResponsesContentApplicationJsonSchemaDataItems[], required
    - `meta` V2TimeTrackingShiftsPostResponsesContentApplicationJsonSchemaDataItemsMeta
      - `end` V2TimeTrackingShiftsPostResponsesContentApplicationJsonSchemaDataItemsMetaEnd, 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` V2TimeTrackingShiftsPostResponsesContentApplicationJsonSchemaDataItemsMetaStart, 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` V2TimeTrackingShiftsPostResponsesContentApplicationJsonSchemaDataItemsMetaBreaksItems[]
        - `end` V2TimeTrackingShiftsPostResponsesContentApplicationJsonSchemaDataItemsMetaBreaksItemsEnd, required
          - `date` string, required: Break end date
          - `time` string, required: Break end time in HH:mm format
        - `start` V2TimeTrackingShiftsPostResponsesContentApplicationJsonSchemaDataItemsMetaBreaksItemsStart, 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` V2TimeTrackingShiftsPostResponsesContentApplicationJsonSchemaDataItemsSummary
      - `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', 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` V2TimeTrackingShiftsPostResponsesContentApplicationJsonSchemaDataItemsPayrollCycleRef: 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.
- `403`: Operation failed.
- `500`: Operation failed.

## Changes

- **2026-10-14** `ca9364fbe9c3`: 2 warning, 1 info
  - the `data/shifts/items/oneOf[subschema #2: V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItems1]/summary/time_amount` request property's min was set to `0.00`
  - the `data/shifts/items/oneOf[subschema #2: V2TimeTrackingShiftsPostRequestBodyContentApplicationJsonSchemaDataShiftsItems1]/summary/total_payable_hours` request property's min was set to `0.00`
  - removed the non-success response with the status `404`

[Operation history](https://skmtc.dev/deel/apis/endpoints-3/changes/v2/time_tracking/shifts/post.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)
