GuidesAPI ReferenceChangelog
Changelog
improved

v.2.1.107

Updated: shifts endpoints to handle delayed submissions

New field added to the shifts endpoints to handle delayed submissions.

  • payroll_cycle_refis added in response of GET endpoints
  • payroll_cycle_refis added in response and requestBody of POST and PATCH endpoints

Endpoints:

Updated: POST /v2/time_tracking/shift_rates endpoint

Parameters type and value are now optional

Endpoints:

Time tracking

Create Uncategorized (Raw) Shifts

Endpoint to create uncategorized (raw) shifts.

Endpoint: POST /rest/v2/time_tracking/shifts/raw

Token scopes: time-tracking:write

API Reference: Create Uncategorized (Raw) Shifts

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": "abcd56",
    "shifts": [
      {
        "external_id": "shift_456",
        "description": "Raw entry with start/end times",
        "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
          },
          "approval_date": "2024-04-03"
        }
      }
    ]
  }
}'

Update Uncategorized (Raw) Shifts

Endpoint to update uncategorized (raw) shifts

Endpoint: PATCH /rest/v2/time_tracking/shifts/raw/:external_id

Token scopes: time-tracking:write

API Reference: Update Uncategorized (Raw) Shifts

curl --location --request PATCH 'https://api.letsdeel.com/rest/v2/time_tracking/shifts/raw/shift_example45' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data '{
    "data": {
        "description": "This is a sample updated shift",
        "date_of_work": "2023-10-01"
    }
}'