Skip to main content
PUT
/
schedule
/
api
/
shift-overrides
Replace ShiftOverrides for an employee.
curl --request PUT \
  --url https://{host}/schedule/api/shift-overrides \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "employeeId": 1,
    "startsAt": "2023-11-07T05:31:56Z",
    "duration": {
      "iso": "<string>"
    },
    "comment": "<string>"
  }
]
'
{
  "items": [
    {
      "id": 1,
      "employee": {
        "id": 1
      },
      "startsAt": "2023-11-07T05:31:56Z",
      "endsAt": "2023-11-07T05:31:56Z",
      "duration": {
        "value": 1,
        "iso": "<string>"
      },
      "isLocked": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "lastUpdatedAt": "2023-11-07T05:31:56Z",
      "comment": "<string>",
      "createdBy": {
        "id": 1
      },
      "lastUpdatedBy": {
        "id": 1
      }
    }
  ]
}

Headers

Authorization
string
required

API key. Value must be formatted like so: lucca application={api_key}.

Query Parameters

employee.id
integer<int32>
required

The ID of the employee whose ShiftOverrides should be replaced.

Required range: x >= 0
startsAt.between
string
required

The date range within which existing ShiftOverrides will be replaced. Open-ended ranges can be defined with .. characters.

Examples:

"2023-01-01--2023-01-31"

"..--2023-01-01"

"2023-01-01--.."

Body

application/json
employeeId
integer<int32>
required

The ID of the employee this override applies to.

Required range: x >= 0
position
enum<string>
required
Available options:
firstHalf,
secondHalf,
fullDay
startsAt
string<date-time>
required

Start date-time of the override.

duration
Duration · object
required

The duration of the override.

nature
enum<string>
required

The nature of the shift override.

  • worked: the employee is working.
  • off: the employee is off.
  • partTime: part-time day.
  • weeklyRest: weekly rest day.
Available options:
worked,
off,
partTime,
weeklyRest
comment
null | string

Optional comment associated with the override.

Response

OK

items
ShiftOverride · object[]