Creating or updating an absence

Copy
Note - Absences include Holidays, Sickness, Study/Exam etc.

Models

Absence

Copy
{
  "Id": <guid>,
  "EmployeeId": <guid>,
  "AbsenceReasonId": <guid>,
  "Narrative": <string>,
  "StartDate": <date>,
  "EndDate": <date>
}

The Absence represents the whole absence. It has a link to an employee and an Absence Reason. There is a Start and End Date. The narrative is optional.

AbsenceDay

Copy
{
  "Id": <guid>,
  "AbsenceId": <guid>,
  "Date": <date>,
  "DurationDays": <decimal>,
  "DurationMinutes": <int>,
  "DayPart": <AM|PM|AllDay|None>
}

The Absence Day is a single day within the Absence. There is a collection of Absence Days where the duration is not zero.

Absence Endpoint

Create Absence

Copy
POST https://api.iris.co.uk/attendance/absences

The employee and absence reason must exist. The absence reason must also be supported.

Update Absence

Copy
PUT https://api.iris.co.uk/attendance/absences/{id}

You can only update the dates. The system deletes any existing Absence Days outside of the new start/ end dates.

Create Absence Day

Copy
POST https://api.iris.co.uk/attendance/absencedays

The Absence Id is required and must exist. The Employee Id is not required and is read-only via the Employee Id on the Absence. The duration is required, refer to Absence Day Duration for more details. To set the Absence Day to zero duration, delete the Absence Day.

Update Absence Day

Copy
PUT https://api.iris.co.uk/attendance/absencedays/{id}

You can only update the duration and day part. Refer to Absence Day Duration for details.