OnDuty - Get employees list with their time supplement registrations

API Url

Use it to load list of employees with specific time supplement registrations.

GET
http://localhost:16010/ProMarkREST/web/OnDuty/employees

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
addEmptyDaysoptionalBoolean

Create empty supplement entries for empty days.

fromoptionalDate

Start date for displaying registrations.

tooptionalDate

End date for displaying registrations.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    employeesObject[]

Collection of employees to display registrations for.

      avatarURIString

Employee avatar.

      daysObject[]

Collection of days

        dateObject[]

Registrations date

        supplementsObject[]

Collection of time supplement registrations

          descriptionString

Description of supplement + employee comment

          endTimeNumber

End tine of registration

          startDateDate

Start date of registration

          startTimeNumber

Start time of registration

          timeIntervalString

Registration interval in System Default format.

      empIdString

Employee Id.

      empNameString

Employee name.

      empNoString

Employee number.

      initialsString

Employee initials.

      mobilePhoneString

Employee phone number.

      sortNoString

Sort number.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

{
"response": {
"data": {
"employees": [
{
"empId": "1912",
"empNo": "EMP01",
"empName": "Employee #1",
"phone": "+4546900000",
"avatarURI": "/rest/Resources/employees/1912/avatar?eTag=813583113000",
"initials": "PMEMP1",
"sortNo": "EMP01",
"days": [
{
"date": "2020-10-01",
"supplements": [
{
"startDate": "2020-10-01",
"startTime": 28800,
"endTime": 36000,
"timeInterval": "08:00 - 10:00",
"description": "Rdighedsvagt SWIFT"
}
]
}
]
}
]
}
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.