sick-leave-phases

Patch sick leave phase

Patches an existing sick leave phase based on the given id.

patch/sick-leave-phases/{id}

Request

  • Base URL: https://api.hoorayhr.io
  • URL: https://api.hoorayhr.io/sick-leave-phases/{id}
  • Auth: API key in header authorization

Path parameters

idinteger required

The id of the phase to patch.

Request body

startDatestring date-time

The start date and time of the phase

Example request

{
  "startDate": "2025-02-01T15:00:00.000Z"
}

Response

The patched sick leave phase

idinteger

Unique id of the sick leave phase

sickLeaveDossierIdinteger required

Unique id of the sick leave dossier

userIdReportedinteger nullable

Unique id of the user who reported the REPORTED_SICK phase

userIdConfirmedinteger nullable

Unique id of the user who confirmed the REPORTED_RECOVERY phase

percentagenumber required

The percentage of hours worked during the period up to 2 decimals, which is used in the calculation of the hours

expectedTotalnumber nullable

The amount of minutes the phase is expected to last based on the start date and expected return date

calculatedExpectedTotalnumber nullable

Equal to "actualTotal" when set, otherwise equal to "expectedTotal" when set on create. This value is updated every night as long as "calculatedEndDate" isn't set

actualTotalnumber nullable

The amount of minutes the phase lasts based on the start date and end date

startDatestring date-time required

The start date and time of the phase

startDateEndTimestring date-time nullable

The so called end time of the phase's first day. It can be used to indicate being absent for a part of the day, if left empty the entire day will be used (based on "startDate")

expectedReturnstring date nullable

The expected return date, as ISO date format (YYYY-MM-DD)

calculatedExpectedReturnstring date nullable

A date only version of "calculatedEndDate" when set, otherwise equal to "expectedReturn" when set on create. This value is updated to the current date every night as long as "calculatedEndDate" isn't set

calculatedEndDatestring date-time nullable

The end date and time of the phase

calculatedEndDateEndTimestring date-time nullable

The so called end time of the phase's end day. It can be used to indicate being absent for a part of the day, if left empty the "calculatedEndDate" should be seen as the end date of the phase

status'REPORTED_SICK' | 'REPORTED_RECOVERY' | 'RECOVERED' required

The type of phase

notesstring long-text nullable

A text field for storing things related to the phase

createdAtstring date-time

The creation date of the phase

updatedAtstring date-time

The date that the phase was last updated

Example response

{
  "id": 1,
  "sickLeaveDossierId": 1,
  "userIdReported": 5,
  "userIdConfirmed": 5,
  "expectedTotal": 480,
  "calculatedExpectedTotal": 960,
  "actualTotal": 960,
  "startDate": "2025-02-01T15:00:00.000Z",
  "startDateEndTime": "2025-02-01T17:00:00.000Z",
  "expectedReturn": "2025-02-05",
  "calculatedExpectedReturn": "2025-02-20",
  "calculatedEndDate": "2025-02-20T09:00:00.000Z",
  "calculatedEndDateEndTime": "2025-02-20T12:00:00.000Z",
  "status": "REPORTED_SICK",
  "notes": "I've gotten food poisoning while staying at a hotel in Tokyo for the conference. I've sent an email to my direct colleagues to hand over some important work.",
  "createdAt": "2025-02-01T14:57:17.000Z",
  "updatedAt": "2022-02-20T15:01:52.000Z",
  "labels": [
    {
      "id": 5,
      "name": "Long term leave",
      "type": "LEAVE",
      "systemCategoryType": "car",
      "createdAt": "2022-02-23T14:01:17.516Z",
      "updatedAt": "2022-02-23T14:01:17.516Z"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.