Approval - Get employees pending approval
API Url
Load the list of employees pending approval with info like what type of registrations are pending approval & what's the impact on accounts.
http://localhost:16010/ProMarkREST/web/Approval/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 |
|---|---|---|
filteroptional | String | Filter expression (json encoded) to be used for filtering the employees. See the Global Employee Filter for schema & structure. |
fromoptional | Date | Start date (registration date) |
includeAccountPostingsoptional | Boolean | TRUE = Include account postings for the registrations pending approval. |
includeRegistrationCountoptional | Boolean | TRUE = Include counter on registration type for those pending approval. |
includeRegistrationsoptional | Boolean | TRUE = Include all registrations pending approval. |
skipoptional | Number | How many employees to skip. |
sortByoptional | String | Sort employees by specific fields. |
takeoptional | Number | How many employees to load. |
tooptional | Date | End date (registration date) |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| employees | Object[] | Array of employees pending approval |
avatarURIoptional | String | URI pointing to the employee's avatar picture. |
| empId | Number | Unique ID of the employee. |
| empNo | String | Employee number. |
firstRegDateoptional | Date | First registration date pending approval within the selection. |
initialsoptional | String | Employee initials. |
lastRegDateoptional | Date | Last registration date pending approval within the selection. |
| name | String | Employee full name. |
postingsoptional | Object[] | Object containing postings per account for the registrations pending approval. |
| accountId | String | Unique ID of the account. |
| description | String | Full description of the account. |
| format | String | Account format ("HH:MM", "HH.CC", ".1", ".2" and so on). |
| shortDescription | String | Raw short description of the account (may be empty). |
| unit | Number | Unit of measure (1: hours, 2: days, 3: pieces). |
| value | Number | Sum of postings on the account, expressed in seconds. |
registrationCountsoptional | Object[] | Object containing counts per registration type. |
| count | Number | Count of registration of this type pending approval. |
| type | String | Registration type. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example:
HTTP/1.1 200 OK{"response": {"data": {"employees": [{"empId": 100,"empNo": "001","name": "John Snow","initials": "JSN","firstRegDate": "2023-03-01","lastRegDate": "2023-03-14","registrationCounts": [{"type": "PR","value": 12},{"type": "AB","value": 2}],"postings": [{"accountId": "T001","description": "Total time","shortDescription": "Total","format": "HH:MM","unit": 1,"value": 403200}]}]},"errorCode": 0,"errorMessage": ""}}