OnDuty - Get employees list with their time supplement registrations
API Url
Use it to load list of employees with specific time supplement registrations.
http://localhost:16010/ProMarkREST/web/OnDuty/employees
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 |
|---|---|---|
addEmptyDaysoptional | Boolean | Create empty supplement entries for empty days. |
fromoptional | Date | Start date for displaying registrations. |
tooptional | Date | End date for displaying registrations. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| employees | Object[] | Collection of employees to display registrations for. |
| avatarURI | String | Employee avatar. |
| days | Object[] | Collection of days |
| date | Object[] | Registrations date |
| supplements | Object[] | Collection of time supplement registrations |
| description | String | Description of supplement + employee comment |
| endTime | Number | End tine of registration |
| startDate | Date | Start date of registration |
| startTime | Number | Start time of registration |
| timeInterval | String | Registration interval in System Default format. |
| empId | String | Employee Id. |
| empName | String | Employee name. |
| empNo | String | Employee number. |
| initials | String | Employee initials. |
| mobilePhone | String | Employee phone number. |
| sortNo | String | Sort number. |
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": {"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
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |