absence_management/get_absences.php

Last modified by YellowFox_RD on 2024/12/19 10:11

Table of Contents

Get all absences for all or specific employees.

Description

GET /absence_management/get_absences.php?company=RTI_COMPANYKEY&import=RTI_IMPORTKEY&start=YYYYMMDDHHIISS&end=YYYYMMDDHHIISS

Parameter

parameterdescriptiontypehintmandatory
companyRTI company keystringyes
importRTI import keystringyes
startstart of queried timerangestringFormat: YYYYMMDDHHIISSyes
endend of queried timerangestringFormat: YYYYMMDDHHIISSyes
employeeNumbersarray of employee numbersjsonRestriction to specific employees
If this parameter is not set, all absences of all employees, who own an employee number, will be returned
Format: [ 'NR1','NR2', ... ]
no
withHolidaysreturn holidays as wellboolEach employee can be assigned to a holiday profile. If this parameter is active, the holidays will be returned as absences as well. You can recognize such entries by the atrribute isHoliday = true. 
Default: true
no
withDeletedreturn deleted absences as wellboolDeleted absences are not returned by default. You can change this by setting this parameter to true. You can recognize such entries by the attribute "deleteDate" being set.
Default: false
no
groupname of the personnel group to which the restriction is to be madestringThe exact name of a personnel group must be givenno

Return value

string in Json format is returned. Returns "ERROR:description" on error.

Attributes

attributeformatdescription
employeeNumberstringemployee number for identification
createDatestring (according to ISO 8601) | nullcreate date of entry
deleteDatestring (according to ISO 8601) | nulldelete date of entry
startDatestring (according to ISO 8601)begin of absence
endDatestring (according to ISO 8601)end of absence
factorfloatshare of working day based on assigned work profile
value is between 0 and 1 with 1 being equivalent to a full day
typestringshort name of absence type according to portal settings
remarkstring | nulloptional description text
isRestTimeboolflag if this absence is an annual leave
isFlexTimeboolflag if this absence is subtracted from flex time account
isHolidayboolflag if this absence is a holiday according to assigned holiday profile
ignored
  • weekDays
  • calendarDays
object
  • int[]
  • string[] (according to ISO 8601)
Absences with a long duration might exclude some days in between.
weekDays: numbers of weekdays (value 0 to 6 = sunday to saturday), e.g. weekend
calendarDays: explicit dates, e.g. a holiday
workTime
  • targetTimeInMinutes
  • calculatedTimeInMinutes
object
  • int
  • int
Working time relevant data. Values can only be determined correctly if YellowTimeManager 3.0 has been booked and set up correctly.
  • targetTimeInMinutes = target working time according to working time profiles during the absence period.
  • calculatedTimeInMinutes = credited working time, depending on target working time, share of absence and whether the absence is subtracted from the flextime account (flextime account absences do not credit working hours)

Example

[
    {
        "employeeNumber": "0815",
        "createDate": "2021-04-15T13:53:23+02:00",
        "deleteDate": null,
        "startDate": "2021-03-08T00:00:00+01:00",
        "endDate": "2021-03-08T23:59:59+01:00",
        "factor": 1,
        "type": "BA",
        "remark": null,
        "isRestTime": false,
        "isFlexTime": false,
        "isHoliday": false,
        "ignored": {
            "weekDays": [],
            "calendarDays": []
        },
"workTime": {
           "targetTimeInMinutes": 0,
           "calculatedTimeInMinutes": 0
       }    
},
...
]