ProRoster - Get plan employees
API Url
This api is used to load employees of a plan and can be expanded to load the assigned demands and absences to those employees.
http://localhost:16010/ProMarkREST/rest/ProRoster/plans/{id}/employees
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| id | String | The Plan unique identifier or the Plan ID. |
Query parameters
| Field | Type | Description |
|---|---|---|
empIdsoptional | Number | List of employee ids separated by comma. Used to return the data only for certain employees. If list contains employees that are not in the plan, they are ignored. If list is empty, then all employees are returned |
empNooptional | String | List of employee numbers separated by comma. Used to return the data only for certain employees. If list contains employees that are not in the plan, they are ignored. If list is empty, then all employees are returned This cannot be used together with empIds. It must be either one or the other. If both are sent, then only the empIds will be taken into consideration. |
expandoptional | String | Comma separated list of items to exapnd (assignedDemands = load demands , absences = load absences, notes = load notes). |
fieldsoptional | String | List of fields with comma delimiter to include in the response. Example to get only 2 attributes fields=dayProfile,normalTime. |
filterIdoptional | Number | Employee filter id. |
fromoptional | String | The start date of the period inside a plan ( If not provided default is start of the current week). |
tooptional | String | The end date of the period inside a plan ( If not provided default is end of the current week). |
usePlanIdoptional | Boolean | If TRUE, then the path parameter id is the Plan Id, otherwise is plan's unique identifier. Default is FALSE. |
Parameter
| Field | Type | Description |
|---|---|---|
ignoreDayProfileoptional | Object[] | |
| isLocked | Boolean | Is the attribute locked. |
| value | Boolean |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| employees | Object[] | |
absencesoptional | Object[] | Collection of absence intervals. |
backColoroptional | String | The reason background color in HEX without #. |
| code | String | The reason code. |
| date | Date | Absence date. |
| description | String | The reason description. |
| empId | String | The employee ID. |
foreColoroptional | String | The reason foreground color in HEX without #. |
fromoptional | Number | Absence start time in seconds from midnight. |
| id | String | Unique identifier for the absence. |
| isCompanyAbs | Boolean | TRUE = Absence from Company Calendar. |
| isPublished | Boolean | TRUE if the absence has been published to absence calendar. |
tooptional | Number | Absence end time in seconds from midnight. |
apprGroupDescoptional | String | Employee's approval group description. |
apprGroupIdoptional | String | Employee's approval group id. |
assignedDemandsoptional | Object[] | Collection of demands (only when expand=demands). |
acceptBeforeoptional | Object[] | |
daysoptional | Number | Accept days before shift takes place. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
approvalGroupoptional | Object[] | |
descriptionoptional | String | Description of the approvalGroup. |
idoptional | String | Id of the approvalGroup. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
assignmentMethodoptional | Object[] | |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
methodoptional | String | Assignment methode Automatic = "A" or Manual "M". |
| backColor | String | BackGround color in HEX without #. |
| baseDemandId | Number | The Id of the base demand from which the demand was created. |
categoryoptional | Object[] | |
descriptionoptional | String | Description of the category. |
idoptional | String | Id of the category. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| date | Date | The date of the demand . |
dayProfileoptional | Object[] | The day profile object. |
backColoroptional | String | BackGround color. |
| description | String | Description of the day profile. |
endTimeoptional | Number | Normal time end of day profile. |
foreColoroptional | String | ForeGround color. |
idoptional | String | Day profile ID. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| isVariable | Boolean | True if day profile is variable. |
startTimeoptional | Number | Normal time start of day profile. |
departmentoptional | Object[] | |
descriptionoptional | String | Description of the department. |
idoptional | String | Id of the department. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| description | String | Description of the demand. |
| empId | String | The Id of the employee assigned to a demand. |
| foreColor | String | ForeGround color in HEX without #. |
groupoptional | Object[] | |
descriptionoptional | String | Description of the group. |
idoptional | String | Id of the group. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| id | Number | The Id of the demand. |
| isPublished | Boolean | False = the assigned demand is not published. True = the assigned demand is published. |
| isTask | Boolean | True if demand is task, false if not. |
maximumBidsoptional | Object[] | |
amountoptional | Number | Number of employees to bid in. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| name | String | The name of the demand . |
normalTimeoptional | Object[] | Normal time interval for variable day profiles. |
endTimeoptional | Number | End time of the interval in seconds. |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
startTimeoptional | Number | Start time of the interval in seconds. |
| planId | Number | The Id of the plan. |
qualificationSetupoptional | Object[] | |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
qualificationoptional | Object[] | |
descriptionoptional | String | Description of the qualification. |
empQualIdoptional | String | Id of the employee qualification. |
idoptional | Number | Id of the demand qualification. |
orderoptional | Number | Order of qualifications. |
primaryoptional | Boolean | true = This is a primary qualification. |
| requiredEmployees | Object[] | |
| amount | Number | Number of employees |
| isLocked | Boolean | Is the attribute locked. |
| isRequired | Boolean | Is the attribute required. |
| version | Number | Version number of the demand. |
cardNooptional | String | Employee's card number. |
categoryDescoptional | String | Employee's category description. |
categoryIdoptional | String | Employee's category id. |
deptDescoptional | String | Employee's department description. |
deptIdoptional | String | Employee's department. |
divisionDescoptional | String | Employee's division description. |
divisionIdoptional | String | Employee's division id. |
empIdoptional | String | The Id of the employee. |
empNameoptional | String | First name + Last name. |
empNooptional | String | The number of the employee. |
firstWorkingDayoptional | Date | Employee's first working day. |
genderoptional | String | Employee's gender. |
groupDescoptional | String | Employee's group description. |
groupIdoptional | String | Employee's group id. |
initialsoptional | String | Employee's initials. |
lastWorkingDayoptional | Date | Employee's last working day. |
locksoptional | Object[] | |
| avatarURI | String | URI for loading employee avatar. If no picture exists, this will be skipped. |
| date | Date | The date which is locked. |
| name | String | The fullname of the user. |
| since | Date | The starting day of the locked date. |
| user | String | The user id who locked the date. |
managerIdoptional | String | Employee's manager id. |
managerNameoptional | String | Employee's manager description. |
shiftsoptional | Object[] | Collection of shifts (only when expand=shifts). |
attendanceTimeoptional | Object[] | Attendancetime interval of the shift. |
endTimeoptional | Number | End time of the interval in seconds. |
startTimeoptional | Number | Start time of the interval in seconds. |
clockInoptional | Number | Clock in time |
clockInTypeoptional | String | Clock in type: CIL = Clock in late, CIE = Clock in early |
clockOutoptional | Number | Clock out time |
clockOutTypeoptional | String | Clock out type: COL = Clock out late, COE = Clock out early |
| date | Date | The date of the shift. |
dayProfileoptional | Object[] | The day profile object. |
backColoroptional | String | BackGround color. |
| description | String | Description of the day profile. |
endTimeoptional | Number | Normal time end of day profile. |
foreColoroptional | String | ForeGround color. |
| id | String | Day profile ID. |
| isVariable | Boolean | True if day profile is variable. |
startTimeoptional | Number | Normal time start of day profile. |
departmentoptional | Object[] | The department object. |
descriptionoptional | String | Description of the department. |
| id | String | Id of the department. |
| empId | String | The Id of the employee. |
groupoptional | Object[] | The group object. |
descriptionoptional | String | Description of the group. |
| id | String | Id of the group. |
hasClockInoptional | Boolean | True if shift has CI/CO registrations. False if not. Returned only if shift is in the past. |
| id | Number | The Id of the shift. |
| isNew | Boolean | True if shift is just created False if not. |
| isPublished | Boolean | True if shift is published False if not. |
normalTimeoptional | Object[] | Normal time interval for variable day profiles. |
endTimeoptional | Number | End time of the interval in seconds. |
startTimeoptional | Number | Start time of the interval in seconds. |
| planId | Number | The Id of the plan. |
weekNormoptional | Number | Employee's week norm in hours, with two decimals. |
workPlaceoptional | String | Employee's working place code. |
workPlaceDescoptional | String | Employee's working place description. |
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": [{"cardNo: "CMD1","categoryId: "MFA","deptDesc: "Warehouse Transport & Spedition","deptId: "MFA_AND","empId: "833","empNo: "CMD1","firstWorkingDay: "2017-10-12""fullName: "Ciprian Dinu 1","gender: "Male","initials: "CMD1","managerDesc: "Mircea Alexandru","managerId: "MFA","workingPlace": "3","workingPlaceDesc": "Site 3","absences": [{"id": "2153930522\u00011\u00010","empId": "833","date": "2018-01-01","code": "A","description": "Bank Holidays","backColor": "B7FFB7","foreColor": "008000","isCompanyAbs": false,"isPublished": true},{"id": "2153930524\u00011\u00010","empId": "833","date": "2018-01-03","code": "S","description": "Sick","backColor": "FF0000","foreColor": "FFFFFF","from": "2018-09-10T08:30:00.000","to": "2018-09-10T11:00:00.000","isCompanyAbs": false,"isPublished": true}],"assignedDemands": [{"id": 2153908066,"planId": 2153557517,"name": "Weld","empId": "893","description": "Welder","foreColor": "000040","backColor": "000050","version": 1,"dayProfile": [{"id": "DAY","startTime": 46800,"endTime": 61200,"description": "Day Shift 13:00 - 17:00","isVariable": false,"foreColor": "000080","backColor": "00FF40","isRequired": false,"isLocked": true}],"requiredEmployees": [{"amount": 5,"isRequired": true,"isLocked": true}],"department": [{"id": "0000007215","description": "SAP-HR-department 15","isRequired": false,"isLocked": true}],"assignmentMethod": [{"isRequired": false,"isLocked": false}],"group": [{"id": "1","description": "BH1","isRequired": false,"isLocked": true}],"approvalGroup": [{"id": "01","description": "Kem Default","isRequired": true,"isLocked": true}],"maximumBids": [{"amount": 10,"isRequired": true,"isLocked": true}],"category": [{"id": "02","description": "Part-day absence","isRequired": false,"isLocked": true}],"acceptBefore": [{"days": 2,"isRequired": false,"isLocked": true}],"qualificationSetup": [{"isRequired": true,"isLocked": true,"qualifications": [{"id": "1","description": "Welding certificate f","primary": true,"order": 1},{"id": "2","description": "Truck certificate","primary": true,"order": 2}]}]}],"locks": [{"date": "2019-01-31","since": "2019-01-28","user": "CMD","name": "Ciprian Dinu","avatarURI": "/rest/Resources/employees/833/avatar?eTag=745325195000"}]"shifts": [{"id": 802925200,"empId": "933","date": "2019-06-12","planId": 2163133252,"isPublished": false,"isNew": false,"dayProfile": [{"id": "FLEX","startTime": 28800,"endTime": 57600,"description": "Fixed/flex","isVariable": false,"foreColor": "FFFFFF","backColor": "5032F5"}],"attendanceTime": [{"startTime": 39600,"endTime": 50400}],"department": [{"id": "SUMMERDP","description": "Hotel Summer department"}],"group": [{"id": "1","description": "BH1"}]}]}]},"errorCode": 0,"errorMessage": ""}}
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. |