Analysis - Get absence KPIs

API Url

Used for loading absence kpi data

GET
http://localhost:16010/ProMarkREST/rest/Analysis/absence-kpis

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Query parameters

FieldTypeDescription
absGroupIdoptionalString

ABSGR - extract based on the absence group list attribute. REASN - extract based on the reason list attribute.

approvalGroupoptionalString

Filter by Approval group identifier.

bonusGroupoptionalString

Filter by Bonus group identifier.

categoryoptionalString

Filter by Category identifier.

departmentoptionalString

Filter by department identifier.

divisionoptionalString

Filter by Division identifier.

empIdoptionalString

If not defined all employees, otherwise only the employee allowed for the current user

employeeoptionalString

Filter by Employee identifier to filter on employee id

fromoptionalDate

From/start date, If not defined 1 year back from today is defined as default.

genderoptionalString

Filter by Gender

getCostoptionalBoolean

TRUE if the cost is wanted, FALSE if a percentage is wanted

getHoursoptionalBoolean

TRUE if absence and norm time is wanted in hours rather than in days

groupByoptionalString

Comma separated list of criteria depending on which groupings are wanted

organisationoptionalString

Filter by Organisation identifier.

reasonGroupoptionalString

Filter by Absence reason group identifier.

tooptionalDate

To/end date. If not defined today is set as default.

workCenteroptionalString

Filter by Work center identifier.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    absenceDaysObject[]

Collection of employee's absence days.

      absenceDateDate

Absence date

      absTimeNumber

Absence time

      bgColorString

Background color

      deptDescrString

Department description

      deptIdString

Department Identifier

      empNoString
      fgColorString

Foregroung color

      firstNameString

First name

      fullNameString

Full name

      genderString

Gender

      normTimeNumber

Normal time

      periodLengthoptionalNumber

Period length

      reasonCodeString

Absence reason code

      reasonDescrString

Absence reason description

      reasonTypeString

Absence reason type

      sortDeptIdString

Sort department Id

      sortEmpNoString

Sort employee number

      surnameString

Surname

    averageAbsencesObject[]

Collection of average absences

      absTimeoptionalNumber

Group by average absence time

      amountoptionalNumber

Group by average absence amount

      descriptionString

Group by description. If groupBy = DEPT then it is department description

      idString

Employee identifier

      normTimeNumber

Group by average notmal time

      periodsoptionalNumber

Group by average period

      sortIdString

Group by identifier. If it is DEPT then it is department Id

    keyValuesObject[]

Collection of key values

      averageNumber

Average value

      companyAverageNumber

Company average value

      customDescr1optionalString

Custom value description 1

      customDescr2optionalString

Custom value description 2

      customDescr3optionalString

Custom value description 3

      customVal1optionalNumber

Custom value 1

      customVal2optionalNumber

Custom value 2

      customVal3optionalNumber

Custom value 3

      recNoNumber

Recod number

    reasonTotalsObject[]

Collection of absence reason totals

      absenceTimeString

Average absence time for each reason code

      bgColorString

Bg color

      codeString

Absence reason code

      descriptionString

Absence reason description

      fgColorString

Fg color

      typeString

Absence reason type

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"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": ""
}
}