Wiki source code of absence_management/get_absences.php
Last modified by YellowFox_RD on 2024/12/19 10:11
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | (% class="box" %) | ||
| 2 | (((Table of Contents))) | ||
| 3 | {{toc/}} | ||
| 4 | |||
| 5 | Get all absences for all or specific employees. | ||
| 6 | = Description = | ||
| 7 | (% class="green mark" %)GET(%%)//** /absence_management/get_absences.php?company**=RTI_COMPANYKEY**&import**=RTI_IMPORTKEY**&start**=YYYYMMDDHHIISS**&end**=YYYYMMDDHHIISS// | ||
| 8 | = Parameter = | ||
| 9 | |=parameter|=description|=type|=hint|=mandatory | ||
| 10 | |company|RTI company key|string||yes | ||
| 11 | |import|RTI import key|string||yes | ||
| 12 | |start|start of queried timerange|string|Format: YYYYMMDDHHIISS|yes | ||
| 13 | |end|end of queried timerange|string|Format: YYYYMMDDHHIISS|yes | ||
| 14 | |employeeNumbers|array of employee numbers|json|Restriction to specific employees | ||
| 15 | If this parameter is not set, all absences of all employees, **who own an employee number**, will be returned | ||
| 16 | Format: [ 'NR1','NR2', ... ]|no | ||
| 17 | |withHolidays|return holidays as well|bool|Each 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. | ||
| 18 | Default: //true//|no | ||
| 19 | |withDeleted|return deleted absences as well|bool|Deleted 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. | ||
| 20 | Default: //false//|no | ||
| 21 | |group|name of the personnel group to which the restriction is to be made|string|The exact name of a personnel group must be given|no | ||
| 22 | |||
| 23 | = Return value = | ||
| 24 | A **string** in Json format is returned. Returns "(% class="error" %)**ERROR:description**(%%)" on error. | ||
| 25 | |||
| 26 | == Attributes == | ||
| 27 | |=attribute|=format|=description | ||
| 28 | |employeeNumber|string|employee number for identification | ||
| 29 | |createDate|string (according to ISO 8601) ~| null|create date of entry | ||
| 30 | |deleteDate|string (according to ISO 8601) ~| null|delete date of entry | ||
| 31 | |startDate|string (according to ISO 8601)|begin of absence | ||
| 32 | |endDate|string (according to ISO 8601)|end of absence | ||
| 33 | |factor|float|share of working day based on assigned work profile | ||
| 34 | value is between 0 and 1 with 1 being equivalent to a full day | ||
| 35 | |type|string|short name of absence type according to portal settings | ||
| 36 | |remark|string ~| null|optional description text | ||
| 37 | |isRestTime|bool|flag if this absence is an annual leave | ||
| 38 | |isFlexTime|bool|flag if this absence is subtracted from flex time account | ||
| 39 | |isHoliday|bool|flag if this absence is a holiday according to assigned holiday profile | ||
| 40 | |ignored | ||
| 41 | ((( | ||
| 42 | * weekDays | ||
| 43 | * calendarDays | ||
| 44 | )))|object | ||
| 45 | ((( | ||
| 46 | * int[] | ||
| 47 | * string[] (according to ISO 8601) | ||
| 48 | )))|Absences with a long duration might exclude some days in between. | ||
| 49 | weekDays: numbers of weekdays (value 0 to 6 = sunday to saturday), e.g. weekend | ||
| 50 | calendarDays: explicit dates, e.g. a holiday | ||
| 51 | |workTime | ||
| 52 | ((( | ||
| 53 | * targetTimeInMinutes | ||
| 54 | * calculatedTimeInMinutes | ||
| 55 | )))|object | ||
| 56 | ((( | ||
| 57 | * int | ||
| 58 | * int | ||
| 59 | )))|Working time relevant data. Values can only be determined correctly if YellowTimeManager 3.0 has been booked and set up correctly. | ||
| 60 | ((( | ||
| 61 | * targetTimeInMinutes = target working time according to working time profiles during the absence period. | ||
| 62 | * 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) | ||
| 63 | ))) | ||
| 64 | |||
| 65 | == Example == | ||
| 66 | |||
| 67 | {{code language="java"}}[ | ||
| 68 | { | ||
| 69 | "employeeNumber": "0815", | ||
| 70 | "createDate": "2021-04-15T13:53:23+02:00", | ||
| 71 | "deleteDate": null, | ||
| 72 | "startDate": "2021-03-08T00:00:00+01:00", | ||
| 73 | "endDate": "2021-03-08T23:59:59+01:00", | ||
| 74 | "factor": 1, | ||
| 75 | "type": "BA", | ||
| 76 | "remark": null, | ||
| 77 | "isRestTime": false, | ||
| 78 | "isFlexTime": false, | ||
| 79 | "isHoliday": false, | ||
| 80 | "ignored": { | ||
| 81 | "weekDays": [], | ||
| 82 | "calendarDays": [] | ||
| 83 | }, | ||
| 84 | "workTime": { | ||
| 85 | "targetTimeInMinutes": 0, | ||
| 86 | "calculatedTimeInMinutes": 0 | ||
| 87 | } | ||
| 88 | }, | ||
| 89 | ... | ||
| 90 | ]{{/code}} | ||
| 91 |

