General - Get daily registrations
API Url
Get daily attendance plan and registrations.
http://localhost:16010/ProMarkREST/rest/General/employees/{empId}/day-registrations
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| empId | String | Unique employee identifier. |
Query parameters
| Field | Type | Description |
|---|---|---|
fromoptional | Date | Start date for registrations, Default: TODAY. |
tooptional | Date | End date for absences, Default : TODAY. |
transTypeoptional | String | List of registration types to be returned. Default: all. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| dayRegistrations | Object[] | Collection of daily registrations. |
| approvalStatus | Number | Calculated approval status for the day (0: No approval needed, 1: Pending approva, 2: Approved, 3: Rejected). [0-3] |
| attendanceDate | Date | Date of registration. |
| empId | String | Unique employee id |
hasRegistrationsoptional | String | List of registration types that exist on the day. |
| locked | Boolean | Determines if a registration can be modified or not. |
originalShiftsoptional | Object[] | Collection of original shifts for the day. |
| backColor | String | Backcolor of shift taken from day profile setup. |
| description | String | Day profile description. |
| foreColor | String | Forecolor of shift taken from day profile setup. |
| hoursPerDay | Number | Hours per day. |
| id | String | Day profile ID. |
| normalTimeStart | Number | Normal time start of shift in seconds. |
| normalTimeStop | Number | Normal time end of shift in seconds. |
| projectTime | Number | Total project time registered on the day. |
| registrationMethod | Number | Registration method on day (1: CI/CO or Absence required, 2: CI/CI or Absence when relevant, 3: Only Absence, 4: Present/not present or Absence). [1-4] |
shiftsoptional | Object[] | Collection of shifts for the day. |
backColoroptional | String | Backcolor of shift taken from day profile setup. |
| description | String | Day profile description. |
foreColoroptional | String | Forecolor of shift taken from day profile setup. |
hoursPerDayoptional | Number | Hours per day. |
| id | String | Day profile ID. |
normalTimeStartoptional | Number | Normal time start of shift in seconds. |
normalTimeStopoptional | Number | Normal time end of shift in seconds. |
| sequence | Number | Order of shift in case of multi-shift. |
| timeToRegister | Number | Total project time that needs to be registered on the day. |
| totalTime | Number | Total time registered on the day expressed in seconds. |
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": {"dayRegistrations": [{"empId": "414","attendanceDate": "2019-01-02","locked": false,"approvalStatus": 1,"registrationMethod": 1,"hasRegistrations": "PR,CI,CO","totalTime": 31380,"timeToRegister": 31380,"projectTime": 31380,"shifts": [{"id": "SSUN1","description": "Sunday Rest","sequence": 0,"foreColor": "000000","backColor": "00FF40","normalTimeStart": 25200,"normalTimeStop": 54000,"hoursPerDay": 27000}],"originalShifts": [{"id": "OGSHIFT1","description": "6-14","foreColor": "000000","backColor": "34B5AE","normalTimeStart": 12600,"normalTimeStop": 37800,"hoursPerDay": 0},{"id": "OGSHIFT2","description": "16-20","normalTimeStart": 46800,"normalTimeStop": 79200,"hoursPerDay": 32400}],"registrations": [{"transSeq": 2413002,"type": "PR","description": "Project time registration","empId": "414","empNo": "MFA1","empName": "John Doe","attendanceDate": "2019-01-02","terminalId": "MFA","isDeleted": false,"isErroneous": false,"regTime": "2019-01-02T07:00:00.000","actualTime": "2019-01-16T12:28:33.000","correctedRegTime": "2019-01-02T07:00:00.000","readOnly": false,"noDelete": false,"noTimeChange": true,"closedPeriod": false,"approvalStatus": 0,"signOff": {"status": 2,"by": "MFA","time": "2019-01-16T12:28:32.000"},"projectTime": {"project": {"id": "4711","description": "Project reg. on Portal/Mobil"},"activity": {"id": "BACKEND","description": "Back end logic"},"timeType": {"id": "HAND","description": "Hand hours"},"extraInfo": [{"id": "BUDGET","description": "Budget","value": {"id": "2016","description": "Forcast year 2016"}},{"id": "DEPT:","description": "Department","value": {"id": "14","description": "Department 14"}}],"registeredTime": 31380,"from": 789030000,"to": 789066000,"absenceRelated": false}},{"transSeq": 2413075,"type": "CI","description": "Auto Clock-in","empId": "414","empNo": "MFA1","empName": "John Doe","attendanceDate": "2019-01-02","terminalId": "MFA","isDeleted": false,"isErroneous": false,"regTime": "2019-01-02T07:00:00.000","actualTime": "2019-01-16T12:28:32.000","correctedRegTime": "2019-01-02T07:00:00.000","readOnly": false,"noDelete": false,"noTimeChange": false,"closedPeriod": false,"approvalStatus": 0,"signOff": {"status": 2,"by": "MFA","time": "2019-01-16T12:28:32.000"},"clockIn": {"dayProfId": "BH","lockDayProfile": false,"isOvertime": false,"meetAgain": false,"lockUserData": true,"autoClockIn": true,"totalTimeAccountId": "","comment": ""}},{"transSeq": 2413076,"type": "CO","description": "Auto Clock-out late","empId": "414","empNo": "MFA1","empName": "John Doe","attendanceDate": "2019-01-02","terminalId": "MFA","isDeleted": false,"isErroneous": false,"regTime": "2019-01-02T17:00:00.000","actualTime": "2019-01-16T12:28:32.000","correctedRegTime": "2019-01-02T15:00:00.000","readOnly": false,"noDelete": false,"noTimeChange": false,"closedPeriod": false,"approvalStatus": 1,"approval": [{"level": 1,"groupId": "T&A","deptId": "CFP1","status": 1}],"signOff": {"status": 2,"by": "MFA","time": "2019-01-16T12:28:32.000"},"clockOut": {"isOvertime": false,"coTimeAtNextCI": null,"enteredTime": null,"autoBreak": false,"comment": "","lockUserData": false,"reason": {"type": "COL","code": "DEF","description": "Default Clock-out Late reason for approval"}}}]}]},"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. |