GuidesAPI ReferenceChangelog
Guides

Time tracking

Learn how to use the time tracking API to keep the time sheets of your Global Payroll employees under control

With the time tracking API, you can manage the time worked by employees, and add, update, retrieve and delete their shifts.

📘

The time tracking API only works for Global Payroll

Independent contractors use timesheets to track their time. For more information, see Timesheets.

Before you begin

Here's a few things to keep in mind before starting to manage shifts:

  • Shifts are linked to contracts. To manage shifts, you need the contract ID that you can retrieve from the GET list of contracts endpoint.
  • Shifts are processed and compensated at the end of each payroll cycle. For more information, see Shifts and payroll cycles.
  • If you submit a shift for a past payroll cycle, it will be compensated at the end of the current cycle without validating if the date of the shift falls within the current cycle.
  • Shifts are compensated according to a combination of the shift rate of a shift submitted and the hourly base salary of the worker.

Shift types

Shifts can be submitted in two formats:

Categorized shifts

Categorized shifts are suited for when shifts are categorized outside Deel and the shift rates (pay codes/category) are known. Usage of this API also requires you to set up shift rates using the shift rates.

Following is an example of a categorized shift:

{
  "external_id": "shift_123",
  "date_of_work": "2024-04-01",
  "summary": {
    "shift_rate_external_id": "rate123",
    "shift_duration_hours": 8,
    "total_break_hours": 1,
    "payable_break_hours": 0.5,
    "total_payable_hours": 7.5
  }
}

Uncategorized (raw) shifts

Uncategorized shifts are used to capture the shift information in a more granular way. For instance, we capture the start, end, breaks information about a shift, as opposed to the categorized shifts where we capture summary information like the total hours worked, total break hours etc. There is no need to setup shift rate for uncategorized shifts.

{
  "external_id": "shift_456",
  "date_of_work": "2024-04-01",
  "meta": {
    "start": {
      "date": "2024-04-01",
      "time": "09:00",
      "is_rest_day": false,
      "is_public_holiday": false
    },
    "end": {
      "date": "2024-04-01",
      "time": "17:00",
      "is_rest_day": false,
      "is_public_holiday": false
    },
    "breaks": [
      {
        "end": {
          "date": "2024-04-01",
          "time": "12:00"
        },
        "start": {
          "date": "2024-04-01",
          "time": "11:00"
        },
        "is_paid": true
      }
    ],
    "approval_date": "2024-04-03"
  }
}

Shifts and payroll cycles

When you submit a shift, the shift is automatically associated to the relevant payroll cycle based on the submission time stamp and the cycle's cutoff date. The cutoff date is the last day for the manager to approve the submitted shifts to be processed within the current payroll cycle.

  • If the shift is approved before the cutoff date, the submission is processed within the current cycle
  • If the shift is approved after the cutoff date, the submission is processed in the next cycle

The payroll calendar is configured per entity by your Deel representative when you onboard. That's when you decide the cutoff dates. If you have questions about your cutoff dates, contact your Deel representative. For more information, see Understanding the Deel Global Payroll Calendar.

🚧

Contact support for late shift submissions

If the payroll cutoff date has already passed and waiting for the next cycle for the shift to be processed is not an option for you, you can contact support to process the shift in a special off-cycle payroll run. Off-cycle payroll runs have an additional fee that depends on your contract agreement.

Make sure to provide the shift details via a CSV file through the support channel.

Preventing late submissions with payroll_cycle_ref.date

To avoid accidental late submissions that result in a shift being processed in the next cycle, you can include the optional payroll_cycle_ref.date parameter when submitting a shift. This parameter ensures that the shift is only associated with the specified cycle if the submission is timely, avoiding shifts being unintentionally pushed to the next payroll cycle.

When you pass a payroll_cycle_ref.date, you're declaring your intended payroll cycle for the shift. The system compares the request's time stamp with the cycle's cutoff date and checks whether the current submission falls within the specified cycle.

  • If the submission timestamp is before the cutoff of the current cycle, the request succeeds
  • If the submission timestamp is after the cutoff, the request is rejected

This validation ensures that the shift is only associated with the specified cycle if the submission is timely.

Without the payroll_cycle_ref.date parameter, the system automatically determines the cycle based on the submission time — which may lead to late shifts being silently pushed to the next cycle. Use this parameter when you want explicit alignment with a particular payroll cycle.

Here's an example of how to use the payroll_cycle_re.date parameter:

👍

Format of the payroll_cycle_ref

The payroll_cycle_ref.date follows the ISO 8601 date and time format. You can use any date within the cycle's start and end dates, but we recommend using the cycle's end date for clarity.

{
  "data": {
    "contract_id": "123456",
    "shifts": [
      {
        "external_id": "shift_123456",
        "description": "This is a sample shift description.",
        "date_of_work": "2023-10-01",
        "payroll_cycle_ref": {
          "date": "2025-06-04T00:00:00.000Z",
        },
        "summary": {
          "shift_rate_external_id": "rate1234",
          "shift_duration_hours": 8,
          "total_break_hours": 1,
          "payable_break_hours": 0.5,
          "total_payable_hours": 7.5
        }
      }
    ]

Manage shifts

This section covers how to add, update, and delete shifts for an employee.

Add shifts

This section covers how to add shifts for an employee. There are 2 different endpoints available for adding shifts based on the shift type.

Add categorized shifts

You can add multiple categorized shifts for a single contract by providing an array of shifts. Before creating a categorized shift, you need to create a shift rate that you will link to the shift.

To add shifts, make a POST request to the Create a time tracking shift endpoint.

curl --location --request POST 'https://api.letsdeel.com/rest/v2/time_tracking/shifts' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "data": {
        "contract_id": "123456",
        "shifts": [
            {
                "external_id": "shift_123456",
                "description": "This is a sample shift description.",
                "date_of_work": "2023-10-01",
                "payroll_cycle_ref": {
                    "date": "2023-10-31T00:00:00.000Z"
                },
                "summary": {
                    "shift_rate_external_id": "rate1234",
                    "shift_duration_hours": 8,
                    "total_break_hours": 1,
                    "payable_break_hours": 0.5,
                    "total_payable_hours": 7.5
                }
            }
        ]
    }
}'

In the body:

NameRequiredTypeFormatDescriptionExample
contract_idtruestring-Unique identifier of the contract for which shifts are being submitted123456
descriptiontruestring-Description of shift. Use it to describe what kind of work is done during the shift.This is a sample shift description.
external_idtruestring-User-defined ID of the shiftshift_123456
date_of_worktruestringdateDate on which shift is performed. It is used to identify the payroll cycle of the shift2023-10-01
payroll_cycle_ref.datefalsestringdate-time (ISO 8601)Reference date of the payroll cycle in which shift should be processed (We recommend to send the payroll cycle end date as the payroll cycle reference)2023-10-31T00:00:00.000Z
summarytrueobject-Object containing numerical data about the shift. This data is used to calculate the amount to be paid for the shift.-
summary.shift_rate_external_idtruestring-ID of the shift rate. Use it to link the shift to a shift rate you created.rate1234
summary.shift_duration_hoursfalsenumber-Total time of the shift in hours8
summary.total_break_hoursfalsenumber-Total break time in hours1
summary.payable_break_hoursfalsenumber-Total breaks hours that must be paid0.5
summary.total_payable_hourstruenumber-Total hours that need be paid using the shift rate provided above7.5

A successful response (200) returns the details of the shift created.

{
  "data": [
    {
      "external_id": "95c35493-41aa-44f8-9154-5a25cbbc1865",
      "organization_id": 0,
      "description": "string",
      "date_of_work": "2019-08-24T14:15:22Z",
      "contract_id": "string",
      "payroll_cycle_ref": {
        "date": "2023-10-31T00:00:00.000Z"
      },
      "summary": {
        "shift_duration_hours": 0,
        "total_break_hours": 0,
        "payable_break_hours": 0,
        "total_payable_hours": 0
      },
      "created_at": "2022-05-24T09:38:46.235Z",
      "updated_at": "2022-05-24T09:38:46.235Z"
    }
  ]
}

Where:

NameRequiredTypeFormatDescriptionExample
external_idtruestring-User-defined ID of the shiftshift_123456
organization_idtruenumber-The ID of your organization123456
descriptiontruestring-Description of shiftThis is a sample shift description.
date_of_worktruestringdate-timeDate of the shift2019-08-24T14:15:22Z
payroll_cycle_ref.datefalsestringdate-time (ISO 8601)Reference date of the payroll cycle in which shift will be processed2023-10-31T00:00:00.000Z
contract_idtruestring-Unique identifier of the contract that shifts were submitted for123456
summarytrueobject-Object containing numerical data about the shift. This data is used to calculate the amount to be paid for the shift.-
created_attruestringdate-timeDate on which the shift is created2022-05-24T09:38:46.235Z
updated_attruestringdate-timeDate on which the shift is updated2022-05-24T09:38:46.235Z

Add uncategorized (raw) shifts

You can add multiple uncategorized shifts for a single contract by providing an array of shifts.

To add shifts, make a POST request to the Create uncategorized (raw) shift endpoint.

curl --location --request POST 'https://api.letsdeel.com/rest/v2/time_tracking/shifts/raw' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "data": {
        "contract_id": "123456",
        "shifts": [
            {
                "external_id": "shift_123456",
                "description": "This is a sample shift description.",
                "date_of_work": "2024-04-01",
                "meta": {
                  "start": {
                    "date": "2024-04-01",
                    "time": "09:00",
                    "is_rest_day": false,
                    "is_public_holiday": false
                  },
                  "end": {
                    "date": "2024-04-01",
                    "time": "17:00",
                    "is_rest_day": false,
                    "is_public_holiday": false
                  },
                  "breaks": [
                    {
                      "end": {
                        "date": "2024-04-01",
                        "time": "12:00"
                      },
                      "start": {
                        "date": "2024-04-01",
                        "time": "11:00"
                      },
                      "is_paid": true
                    }
                  ],
                  "approval_date": "2024-04-03"
                }
            }
        ]
    }
}'

In the body:

NameRequiredTypeFormatDescriptionExample
contract_idtruestring-Unique identifier of the contract for which shifts are being submitted123456
external_idtruestring-User-defined ID of the shiftshift_123456
descriptiontruestring-Description of shift. Use it to describe what kind of work is done during the shift.This is a sample shift description.
date_of_worktruestringdateDate on which shift is performed. It is used to identify the payroll cycle of the shift2024-04-01
metatrueobject-Object containing detailed start/end times, breaks, and approval metadata-
meta.start.datetruestringdateDate when the shift starts2024-04-01
meta.start.timetruestringtime (HH:mm)Start time of the shift09:00
meta.start.is_rest_daytrueboolean-Indicates if the shift start is on a rest dayfalse
meta.start.is_public_holidaytrueboolean-Indicates if the shift start is on a public holidayfalse
meta.end.datetruestringdateDate when the shift ends2024-04-01
meta.end.timetruestringtime (HH:mm)End time of the shift17:00
meta.end.is_rest_daytrueboolean-Indicates if the shift end is on a rest dayfalse
meta.end.is_public_holidaytrueboolean-Indicates if the shift end is on a public holidayfalse
meta.breaksfalsearray-List of breaks taken during the shift-
meta.breaks[].start.datetruestringdateBreak start date2024-04-01
meta.breaks[].start.timetruestringtime (HH:mm)Break start time11:00
meta.breaks[].end.datetruestringdateBreak end date2024-04-01
meta.breaks[].end.timetruestringtime (HH:mm)Break end time12:00
meta.breaks[].is_paidfalseboolean-Indicates whether the break is paidtrue
meta.approval_datefalsestringdateDate when the shift was approved by a manager2024-04-03

A successful response (200) returns the details of the shift created.

{
  "data": [
    {
      "external_id": "shift_example05",
      "description": "This is a sample shift description 5",
      "date_of_work": "2025-06-01",
      "created_at": "2025-06-30T19:31:54.402Z",
      "updated_at": "2025-06-30T19:31:54.402Z",
      "contract_id": "mjgd99e",
      "meta": {
        "start": {
          "date": "2024-02-12",
          "time": "08:00",
          "is_rest_day": false,
          "is_public_holiday": false
        },
        "end": {
          "date": "2024-02-12",
          "time": "16:00",
          "is_rest_day": false,
          "is_public_holiday": false
        },
        "approval_date": "2024-12-11"
      }
    }
  ]
}

Where:

NameRequiredTypeFormatDescriptionExample
external_idtruestring-User-defined ID of the shiftshift_example05
descriptiontruestring-Description of shiftThis is a sample shift description 5
date_of_worktruestringdateDate of the shift2025-06-01
contract_idtruestring-Unique identifier of the contract that shifts were submitted formjgd99e
created_attruestringdate-timeDate on which the shift is created2025-06-30T19:31:54.402Z
updated_attruestringdate-timeDate on which the shift is updated2025-06-30T19:31:54.402Z
metatrueobject-Object containing detailed start/end times and approval date-
meta.start.datetruestringdateDate when the shift starts2024-02-12
meta.start.timetruestringtime (HH:mm)Start time of the shift08:00
meta.start.is_rest_daytrueboolean-Indicates if the shift start is on a rest dayfalse
meta.start.is_public_holidaytrueboolean-Indicates if the shift start is on a public holidayfalse
meta.end.datetruestringdateDate when the shift ends2024-02-12
meta.end.timetruestringtime (HH:mm)End time of the shift16:00
meta.end.is_rest_daytrueboolean-Indicates if the shift end is on a rest dayfalse
meta.end.is_public_holidaytrueboolean-Indicates if the shift end is on a public holidayfalse
meta.approval_datefalsestringdateDate when the shift was approved by a manager2024-12-11

List shifts in your organization

You can list the shifts in your organization and sort them by the time of creation.

To list shifts, make a GET request to the List time tracking shifts endpoint.

curl --location --request GET 'https://api.letsdeel.com/rest/v2/time_tracking/shifts?limit=10&offset=20&contract_id[]=abcd&contract_id[]=abcd2&from_date=2023-10-01&to_date=2023-10-02' \
--header 'Authorization: Bearer {{token}}'

In the query:

NameRequiredTypeFormatDescriptionExample
limitfalsenumberNumber of rows that must be returned in one API call100
offsetfalsenumberNumber of rows that must be skipped when returning the results10
contract_id[]falsestring[]array paramFilter shifts by one or more contract IDscontract_id[]=abcd&contract_id[]=efgh
from_datefalsestringYYYY-MM-DDFilter shifts from this date (inclusive)2023-10-01
to_datefalsestringYYYY-MM-DDFilter shifts until this date (inclusive)2023-10-02

ℹ️ Use the array syntax contract_id[]=value to filter for contract IDs. For multiple contract IDs, you can use contract_id[]=value1&contract_id[]=value2.

A successful response (200) returns the list of shifts available in your organization and matching any filters applied. For example:

{
  "data": [
    {
      "external_id": "d3m0d3m0-d3m0-d3m0-d3m0-d3m0d3m0d3m0",
      "organization_id": 0,
      "description": "string",
      "date_of_work": "2019-08-24T14:15:22Z",
      "contract_id": "string",
      "summary": {
        "shift_duration_hours": 0,
        "total_break_hours": 0,
        "payable_break_hours": 0,
        "total_payable_hours": 0
      },
      "created_at": "2022-05-24T09:38:46.235Z",
      "updated_at": "2022-05-24T09:38:46.235Z"
    }
  ],
  "page": {
    "total_rows": 0,
    "items_per_page": 1,
    "offset": 999999999
  }
}

Where:

NameRequiredTypeFormatDescriptionExample
datatruearray-The list of shifts available-
pagetrueobject-Contains information to navigate to the next set of results, if applicable-

Retrieve a single shift

You can retrieve the information of a single shift starting from the external_id of the shift.

To retrieve a shift, make a GET request to the Retrieve a single time tracking shift endpoint.

curl --location --request GET 'https://api.letsdeel.com/rest/v2/time_tracking/shifts/{{external_id}}' \
--header 'Authorization: Bearer {{token}}'

A successful response (200) returns the information of the requested shift.

{
  "external_id": "d3m0d3m0-d3m0-d3m0-d3m0-d3m0d3m0d3m0",
  "organization_id": 0,
  "description": "string",
  "date_of_work": "2019-08-24T14:15:22Z",
  "contract_id": "string",
  "summary": {
    "shift_duration_hours": 0,
    "total_break_hours": 0,
    "payable_break_hours": 0,
    "total_payable_hours": 0
  },
  "created_at": "2022-05-24T09:38:46.235Z",
  "updated_at": "2022-05-24T09:38:46.235Z"
}

Update categorized shift for an employee

If you need it, you can update the information of a categorized shift.

📘

You can only update shifts that haven't been processed for payroll

Shifts are processed for payroll at the cutoff date.

To update a categorized shift, make a PATCH request to the Update a time tracking shift endpoint.

curl --location --request PATCH 'https://api.letsdeel.com/rest/v2/time_tracking/shifts/{{external_id}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "data": {
        "description": "This is a sample shift description.",
        "date_of_work": "2023-10-01",
        "payroll_cycle_ref": {
          "date": "2023-10-31T00:00:00.000Z"
        },
        "summary": {
            "shift_duration_hours": 8,
            "total_break_hours": 1,
            "payable_break_hours": 0.5,
            "total_payable_hours": 7.5
        }
    }
}'

In the path:

NameRequiredTypeFormatDescriptionExample
external_idtruestring-User-defined ID of the shiftshift_123456

In the body:

NameRequiredTypeFormatDescriptionExample
datatrueobject-Contains the information of the shift that must be updated.-

A successful response (200) returns the updated shift. For example:

{
  "external_id": "95c35493-41aa-44f8-9154-5a25cbbc1865",
  "organization_id": 0,
  "description": "string",
  "date_of_work": "2019-08-24T14:15:22Z",
  "contract_id": "string",
  "payroll_cycle_ref": {
    "date": "2023-10-31T00:00:00.000Z"
  },
  "summary": {
    "shift_duration_hours": 0,
    "total_break_hours": 0,
    "payable_break_hours": 0,
    "total_payable_hours": 0
  },
  "created_at": "2022-05-24T09:38:46.235Z",
  "updated_at": "2022-05-24T09:38:46.235Z"
}

Update uncategorized (raw) shift for an employee

If you need it, you can update the information of an uncategorized shift.

📘

You can only update shifts that haven't been processed for payroll

Shifts are processed for payroll at the cutoff date.

To update an uncategorized shift, make a PATCH request to the Update a raw time tracking shift endpoint.

curl --location --request PATCH 'https://api.letsdeel.com/rest/v2/time_tracking/shifts/raw/{{external_id}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "data": {
        "description": "This is a sample shift updated now again.",
        "date_of_work": "2023-10-01",
        "meta": {
            "start": {
                "date": "2024-02-12",
                "time": "08:00",
                "is_rest_day": false,
                "is_public_holiday": false
            },
            "end": {
                "date": "2024-02-12",
                "time": "16:00",
                "is_rest_day": false,
                "is_public_holiday": false
            },
            "approval_date": "2024-12-11"
        }
    }
}'

In the path:

NameRequiredTypeFormatDescriptionExample
external_idtruestring-User-defined ID of the shiftshift_123456

In the body:

NameRequiredTypeFormatDescriptionExample
datatrueobject-Contains the information of the shift that must be updated.-

A successful response (200) returns the updated shift. For example:

{
  "external_id": "95c35493-41aa-44f8-9154-5a25cbbc1865",
  "description": "string",
  "date_of_work": "2019-08-24T14:15:22Z",
  "contract_id": "string",
  "payroll_cycle_ref": {
    "date": "2023-10-31T00:00:00.000Z"
  },
  "meta": {
    "start": {
      "date": "2024-02-12",
      "time": "08:00",
      "is_rest_day": false,
      "is_public_holiday": false
    },
    "end": {
      "date": "2024-02-12",
      "time": "16:00",
      "is_rest_day": false,
      "is_public_holiday": false
    },
    "approval_date": "2024-12-11"
  },
  "created_at": "2022-05-24T09:38:46.235Z",
  "updated_at": "2022-05-24T09:38:46.235Z"
}

Delete shift for a contract

You can delete a shift for a contract by using the external_id of the shift.

To delete a shift, make a DELETE request to the Delete a time tracking shift endpoint.

📘

You can only delete shifts that haven't been processed for payroll

Shifts are processed for payroll at the cutoff date.

curl --location --request DELETE 'https://api.letsdeel.com/rest/v2/time_tracking/shifts/{{external_id}}' \
--header 'Authorization: Bearer {{token}}'

Where:

NameRequiredTypeFormatDescriptionExample
external_idtruestring-User-defined ID of the shiftshift_123456

A successful response (204) returns an empty body.

Manage shift rates

Shift rates are used in payroll calculations to define the amount of the salary to be paid for a specific shift. There shift rate types are:

NameDescriptionFormulaExample
MULTIPLIER_PERCENTAGEDefines the rate of a shift as a percentage of the salary, using the employee's hourly salary (if it's a hourly contract) or equivalent hourly salary (for non-hourly contracts).Total amount for shift = (MULTIPLIER_PERCENTAGE/100) * Per_hour_salary * Total_payable_hours10$/hour is the base salary, user submitted shift with total of 5 payable hours and according to the shift rate attached to the shift MULTIPLIER_PERCENTAGE is set to 200% so Total amount paid for the shift = 2 10 5 = 100$
PER_HOUR_FLAT_RATEDefine the rate of a shift as a flat rate per hour.Total amount for shift = PER_HOUR_FLAT_RATE * Total_payable_hoursPER_HOUR_FLAT_RATE set to 100$ and total_payable_hours for the shift are 5 hours Total amount paid for the shift = 100 * 5 = 500$

Create a shift rate

You can create shift rates for your organization, which you can then map to individual shifts when adding them.

To create a shift rate, make a POST request to the time_tracking/shift_rates endpoint.

curl --location --request POST 'https://api.letsdeel.com/rest/v2/time_tracking/shift_rates' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "data": {
        "external_id": "regular_rate_1",
        "name": "Regular Shift rate 1",
        "type": "PER_HOUR_FLAT_RATE",
        "value": 150
    }
}'

Where:

NameRequiredTypeFormatDescriptionExample
external_idtruestring-User defined unique identifier for the shift rateregular_rate_1

Step 1: Fill the below details related to the shift rate

NameRequiredTypeFormatDescriptionExample
external_idtruestring-User defined unique identifier for the shift rateregular_rate_1
nametruestring-A human readable string to identify the purpose of the shift rateRegular Shift rate 1
typefalsestringENUMDefines the type of rate that must be used. Use any of the available shift rate types.PER_HOUR_FLAT_RATE
valuefalsenumber-Value of the shift rate, to use in combination with the type parameter150

Retrieve the shift rate

You can also retrieve the shift rates starting from the external_id of the shift rate.

To retrieve a shift rate, make a GET request to the Retrieve a single time tracking shift rate endpoint.

curl --location --request GET 'https://api.letsdeel.com/rest/v2/time_tracking/shift_rates/{{external_id}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

Where:

NameRequiredTypeFormatDescriptionExample
external_idtruestring-User-defined unique identifier for the shift rateshift_123456

A successful response (200) returns the shift rate of the requested shift. For example:

{
  "data": {
    "organization_id": "string",
    "external_id": "string",
    "name": "string",
    "rate_type": "MULTIPLIER_PERCENTAGE",
    "value": 0,
    "created_at": "2022-05-24T09:38:46.235Z",
    "updated_at": "2022-05-24T09:38:46.235Z"
  }
}

Retrieve shift rates

You can also retrieve the list of shift rates for your organization.

To retrieve a list of shift rates, make a GET request to the List time tracking shift rates endpoint.

curl --location --request GET 'https://api.letsdeel.com/rest/v2/time_tracking/shift_rates?limit=10&offset=5' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'
NameRequiredTypeFormatDescriptionExample
limitfalsenumberNumber of rows that must be returned in one API call100
offsetfalsenumberNumber of rows that must be skipped when returning the results10

A successful response (200) returns the list of shift rates available in your organization and matching any filters applied. For example:

{
  "data": [
    {
      "organization_id": "string",
      "external_id": "string",
      "name": "string",
      "rate_type": "MULTIPLIER_PERCENTAGE",
      "value": 0,
      "created_at": "2022-05-24T09:38:46.235Z",
      "updated_at": "2022-05-24T09:38:46.235Z"
    }
  ],
  "page": {
    "total_rows": 0,
    "items_per_page": 1,
    "offset": 999999999
  }
}

Where:

NameRequiredTypeFormatDescriptionExample
datatruearray-An array of shift rates[shift_rate_1, shift_rate_2, shift_rate_3]
organization_idtruenumber-The ID of your organization123456
external_idtruestring-User defined unique identifier for the shift rateregular_rate_1
nametruestring-A human readable string to identify the purpose of the shift rateRegular Shift rate 1
rate_typefalsestringENUMDefines the type of rate that must be used. Use any of the available shift ratesPER_HOUR_FLAT_RATE
valuefalsenumber-Value of the shift rate, to use in combination with the type parameter150
created_attruestringdate-timeDate on which the shift rate is created2022-05-24T09:38:46.235Z
updated_attruestringdate-timeDate on which the shift rate is updated2022-05-24T09:38:46.235Z
pagetrueobject-An object containing pagination information. Use it to navigate through sets of-

Update a shift rate

You can also update a shift rate if it's not being used in any shift, by using the external_id of the shift rate.

To update a shift rate, make a PATCH request to the Update a time tracking shift rate endpoint.

📘

Only shift rates that are not used in any shift can be updated.

curl --location --request PATCH 'https://api.letsdeel.com/rest/v2/time_tracking/shift_rates/{{external_id}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "data": {
         "name": "On-call shift rate",
        "type": "PER_HOUR_FLAT_RATE",
        "value": 150
    }
}'

In the path:

NameRequiredTypeFormatDescriptionExample
external_idtruestring-User defined unique identifier for the shift rateregular_rate_1

In the body:

NameRequiredTypeFormatDescriptionExample
nametruestring-A human readable string to identify the purpose of the shift rateRegular Shift rate 1
typetruestringENUMDefines the type of rate that must be used. Use any of the available shift ratesPER_HOUR_FLAT_RATE
valuetruenumber-Value of the shift rate, to use in combination with the type parameter150

A successful response (200) returns the updated shift rate. For example:

{
  "data": {
    "organization_id": "string",
    "external_id": "string",
    "name": "string",
    "rate_type": "MULTIPLIER_PERCENTAGE",
    "value": 0,
    "created_at": "2022-05-24T09:38:46.235Z",
    "updated_at": "2022-05-24T09:38:46.235Z"
  }
}

Delete a shift rate

You can also delete a shift rate if it's not being used in any shift, by using the external_id of the shift rate.

To delete a shift rate, make a DELETE request to the Delete a time tracking shift rate endpoint.

📘

Only shift rates that are not used in any shift can be deleted.

curl --location --request DELETE 'https://api.letsdeel.com/rest/v2/time_tracking/shift_rates/{{external_id}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

A successful response (204) returns an empty body.