General - Get employee holidays

API Url

Used for loading all available holidays for an employee under each valid vacation type.

GET
http://localhost:16010/ProMarkREST/rest/General/employees/{empId}/holidays

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.

Path parameters

FieldTypeDescription
empIdString

Employee Identifier

Query parameters

FieldTypeDescription
fromoptionalinteger

From holding period year (if viewDate is used this value is ignored)

tooptionalinteger

To holding period year (if viewDate is used this value is ignored)

typeoptionalString

Holiday type

viewDateoptionaldate

View available holidays to till this date

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    holidaysObject[]

Collection of employee holidays

      accruedoptionalDate

Accrued holidays in accrued period

      accruedUntiloptionalDate

Accrued holidays till "view at" date for periodic accrued holiday types

      descriptionString

Holiday type description

      empIdString

Employee Identifier

      formatoptionalString

Account format ("HH:MM", "HH.CC", ".1", ".2" and so on)

      fromLastYearoptionalDate

Holidays from last year

      leftToTransferoptionalNumber

Left holidays to transfer

      maxTransferoptionalNumber

Maximun days to transfer

      periodEndDate

Holiday period end date

      periodStartDate

Holiday period start date

      plannedoptionalNumber

Planned holidays in the holiday period in future. If "view at" is defined, planned holidays after that date

      remainingoptionalNumber

Remaining holidays at the end of holiday period

      remainingUntiloptionalNumber

Remaining holidays until "view at" date against accured until date

      totaloptionalNumber

Total holidays in the holiday period

      transferredoptionalNumber

Transferred holidays in the holiday period

      transferRequestoptionalNumber

Requested transfer holidays in the holdiday period

      typeString

Holiday type identifier

      unitoptionalNumber

Accounts unit (1: hours, 2: days).

      usedoptionalNumber

Used holidays in the holiday period until today. If "View at" is defined, used holidays till that date

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"holidays": [
{
"empId": "468",
"type": "EXTRA",
"description": "Extra Holiday",
"periodStart": "2017-01-01",
"periodEnd": "2017-12-31",
"fromLastYear": 0,
"accrued": 0,
"total": 0,
"used": 0,
"planned": 0,
"remaining": 0,
"maxTransfer": 0,
"transferRequest": 0,
"transferred": 0,
"leftToTransfer": 0,
"unit": 1,
"format": "HH:MM"
},
{
"empId": "468",
"type": "EXTRA",
"description": "Extra Holiday",
"periodStart": "2018-01-01",
"periodEnd": "2018-12-31",
"fromLastYear": 0,
"accrued": 180000,
"total": 180000,
"used": 0,
"planned": 0,
"remaining": 180000,
"maxTransfer": 36000,
"transferRequest": 0,
"transferred": 0,
"leftToTransfer": 36000,
"unit": 1,
"format": "HH:MM"
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}