Analysis - Get absence KPIs
API Url
Used for loading absence kpi data
http://localhost:16010/ProMarkREST/rest/Analysis/absence-kpis
Permissions: user
Request headers
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Query parameters
| Field | Type | Description |
|---|---|---|
absGroupIdoptional | String | ABSGR - extract based on the absence group list attribute. REASN - extract based on the reason list attribute. |
approvalGroupoptional | String | Filter by Approval group identifier. |
bonusGroupoptional | String | Filter by Bonus group identifier. |
categoryoptional | String | Filter by Category identifier. |
departmentoptional | String | Filter by department identifier. |
divisionoptional | String | Filter by Division identifier. |
empIdoptional | String | If not defined all employees, otherwise only the employee allowed for the current user |
employeeoptional | String | Filter by Employee identifier to filter on employee id |
fromoptional | Date | From/start date, If not defined 1 year back from today is defined as default. |
genderoptional | String | Filter by Gender |
getCostoptional | Boolean | TRUE if the cost is wanted, FALSE if a percentage is wanted |
getHoursoptional | Boolean | TRUE if absence and norm time is wanted in hours rather than in days |
groupByoptional | String | Comma separated list of criteria depending on which groupings are wanted |
organisationoptional | String | Filter by Organisation identifier. |
reasonGroupoptional | String | Filter by Absence reason group identifier. |
tooptional | Date | To/end date. If not defined today is set as default. |
workCenteroptional | String | Filter by Work center identifier. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| absenceDays | Object[] | Collection of employee's absence days. |
| absenceDate | Date | Absence date |
| absTime | Number | Absence time |
| bgColor | String | Background color |
| deptDescr | String | Department description |
| deptId | String | Department Identifier |
| empNo | String | |
| fgColor | String | Foregroung color |
| firstName | String | First name |
| fullName | String | Full name |
| gender | String | Gender |
| normTime | Number | Normal time |
periodLengthoptional | Number | Period length |
| reasonCode | String | Absence reason code |
| reasonDescr | String | Absence reason description |
| reasonType | String | Absence reason type |
| sortDeptId | String | Sort department Id |
| sortEmpNo | String | Sort employee number |
| surname | String | Surname |
| averageAbsences | Object[] | Collection of average absences |
absTimeoptional | Number | Group by average absence time |
amountoptional | Number | Group by average absence amount |
| description | String | Group by description. If groupBy = DEPT then it is department description |
| id | String | Employee identifier |
| normTime | Number | Group by average notmal time |
periodsoptional | Number | Group by average period |
| sortId | String | Group by identifier. If it is DEPT then it is department Id |
| keyValues | Object[] | Collection of key values |
| average | Number | Average value |
| companyAverage | Number | Company average value |
customDescr1optional | String | Custom value description 1 |
customDescr2optional | String | Custom value description 2 |
customDescr3optional | String | Custom value description 3 |
customVal1optional | Number | Custom value 1 |
customVal2optional | Number | Custom value 2 |
customVal3optional | Number | Custom value 3 |
| recNo | Number | Recod number |
| reasonTotals | Object[] | Collection of absence reason totals |
| absenceTime | String | Average absence time for each reason code |
| bgColor | String | Bg color |
| code | String | Absence reason code |
| description | String | Absence reason description |
| fgColor | String | Fg color |
| type | String | Absence reason type |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example:
{"response": {"data": {"absenceDays": [{"empNo": "HLC15","sortEmpNo": "HLC15","absDate": "2018-06-28","periodLength": 101,"absTime": 1,"normTime": 27000,"firstName": "Henrik","surname": "Lykke 15","fullName": "Henrik Lykke 15","gender": "M","deptId": "HLC","sortDeptId": "HLC","deptDescr": "Hlc afdeling","reasonType": "AA","reasonCode": "S","reasonDescr": "Sick","fgColor": "FFFFFF","bgColor": "FF0000"}],"averageAbsences": [{"id": "09","sortId": "!!!!!!!!09","descr": "Bo Haslund","normTime": 1},{"id": "HLC15","sortId": "HLC15","descr": "Henrik Lykke 15","amount": 91.22807,"normTime": 114,"absTime": 104,"periods": 2}],"reasonTotals": [{"type": "AA","code": "S","description": "Sick","fgColor": "FFFFFF","bgColor": "FF0000","absTime": 178},{"type": "AA","code": "EGENMELD","description": "Egenmelding sygdom","fgColor": "000000","bgColor": "FF00FF","absTime": 9}],"keyValues": [{"recNo": 1,"customDescr1": "descrption1","customDescr2": "description2","customDescr3": "description3","average": 39.555556,"companyAverage": 13.761888}]},"errorCode": 0,"errorMessage": ""}}