General - Get day registrations
API Url
Get daily attendance plan and registrations.
http://localhost:16010/ProMarkREST/rest/General/day-registrations
Permissions: user
Query parameters
| Field | Type | Description |
|---|---|---|
activityIdoptional | String | Activity Id. |
| filter | String | Employees filter. |
fromoptional | DateTime | Start date for registrations, Default: TODAY. |
pieceWorkIdoptional | String | Piece work Id. |
projectIdoptional | String | Project id. |
tooptional | DateTime | 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. |
| employees | Object[] | Collection of employees. |
avatarURIoptional | String | URI for loading the employee avatar. |
| 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. |
| 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] |
registrationsoptional | Object[] | Collection of registrations on the day. |
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. |
| id | String | Unique employee id. |
| initials | String | Employee initials. |
| name | String | Employee name. |
| no | String | Employee no. |
| sortNo | String | Employee number used for sorting. |
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": [{"id": "184","no": "4","sortNo": "!!!!!!4","initials": "PDE""name": "Peter Deltid","dayRegistrations": [{"empId": "184","attendanceDate": "2017-06-19","locked": false,"approvalStatus": 0,"registrationMethod": 1,"totalTime": 0,"timeToRegister": 0,"projectTime": 0,"shifts": [{"id": "S2200","description": "S2200","sequence": 0,"normalTimeStart": 79200,"normalTimeStop": 108000,"hoursPerDay": 27000,"totalTime": 0}]}]},{"id": "414","no": "MFA1","sortNo": "!!!!!MFA","initials": "JDO""name": "John Doe","dayRegistrations": [{"empId": "414","attendanceDate": "2017-06-19","locked": false,"approvalStatus": 2,"registrationMethod": 1,"hasRegistrations": "PR,CI,CO","totalTime": 41400,"timeToRegister": 41400,"projectTime": 7200,"shifts": [{"id": "BH","description": "BH","sequence": 0,"foreColor": "000000","backColor": "00FF40","normalTimeStart": 25200,"normalTimeStop": 54000,"hoursPerDay": 27000,"clockIn": 25200,"clockOut": 68400,"totalTime": 41400}],"registrations": [{"transSeq": 2183579,"type": "CI","description": "Clock-in","empId": "414","attendanceDate": "2017-06-19","terminalId": "R","isDeleted": false,"isErroneous": false,"regTime": "2017-06-19T07:00:00.000","actualTime": "2017-06-26T15:58:23.000","correctedRegTime": "2017-06-19T07:00:00.000","readOnly": false,"noDelete": false,"noTimeChange": false,"closedPeriod": false,"approvalStatus": 0,"signOff": {"status": 1},"clockIn": {"dayProfId": "BH","lockDayProfile": false,"isOvertime": false,"meetAgain": false,"lockUserData": false,"autoClockIn": false,"totalTimeAccountId": "","comment": ""}},{"transSeq": 2183580,"type": "CO","description": "Clock-out late","empId": "414","attendanceDate": "2017-06-19","terminalId": "R","isDeleted": false,"isErroneous": false,"regTime": "2017-06-19T19:00:00.000","actualTime": "2017-06-26T15:58:58.000","correctedRegTime": "2017-06-19T19:00:00.000","readOnly": false,"noDelete": false,"noTimeChange": false,"closedPeriod": false,"approvalStatus": 2,"approval": [{"level": 1,"groupId": "T&A","deptId": "CFP1","status": 2,"approverId": "OGG","approvalTime": "2018-03-21T14:18:21.000"}],"signOff": {"status": 1},"clockOut": {"isOvertime": false,"coTimeAtNextCI": null,"enteredTime": null,"autoBreak": false,"comment": "","lockUserData": false,"reason": {"type": "COL","code": "WP","description": "Overtime"}}},{"transSeq": 2183250,"type": "PR","description": "Project time registration","empId": "414","attendanceDate": "2017-06-19","terminalId": "MFA","isDeleted": false,"isErroneous": false,"regTime": "2017-06-19T23:59:59.000","actualTime": "2017-06-19T15:14:21.000","correctedRegTime": "2017-06-19T23:59:00.000","readOnly": false,"noDelete": false,"noTimeChange": true,"closedPeriod": false,"approvalStatus": 0,"signOff": {"status": 1},"projectTime": {"project": {"id": "000","description": "Test Dimensions"},"activity": {"id": "1","description": "Act 1"},"timeType": {"id": "NORM","description": "Normal time"},"registeredTime": 7200,"note": "Test","absenceRelated": false}}]}]}]},"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. |