General - Get daily registrations

API Url

Get daily attendance plan and registrations.

GET
http://localhost:16010/ProMarkREST/rest/General/employees/{empId}/day-registrations

Permissions: user

Path parameters

FieldTypeDescription
empIdString

Unique employee identifier.

Query parameters

FieldTypeDescription
fromoptionalDate

Start date for registrations, Default: TODAY.

tooptionalDate

End date for absences, Default : TODAY.

transTypeoptionalString

List of registration types to be returned. Default: all.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    dayRegistrationsObject[]

Collection of daily registrations.

      approvalStatusNumber

Calculated approval status for the day (0: No approval needed, 1: Pending approva, 2: Approved, 3: Rejected).

Allowed values:[0-3]
      attendanceDateDate

Date of registration.

      empIdString

Unique employee id

      hasRegistrationsoptionalString

List of registration types that exist on the day.

      lockedBoolean

Determines if a registration can be modified or not.

      originalShiftsoptionalObject[]

Collection of original shifts for the day.

        backColorString

Backcolor of shift taken from day profile setup.

        descriptionString

Day profile description.

        foreColorString

Forecolor of shift taken from day profile setup.

        hoursPerDayNumber

Hours per day.

        idString

Day profile ID.

        normalTimeStartNumber

Normal time start of shift in seconds.

        normalTimeStopNumber

Normal time end of shift in seconds.

      projectTimeNumber

Total project time registered on the day.

      registrationMethodNumber

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).

Allowed values:[1-4]
      shiftsoptionalObject[]

Collection of shifts for the day.

        backColoroptionalString

Backcolor of shift taken from day profile setup.

        descriptionString

Day profile description.

        foreColoroptionalString

Forecolor of shift taken from day profile setup.

        hoursPerDayoptionalNumber

Hours per day.

        idString

Day profile ID.

        normalTimeStartoptionalNumber

Normal time start of shift in seconds.

        normalTimeStopoptionalNumber

Normal time end of shift in seconds.

        sequenceNumber

Order of shift in case of multi-shift.

      timeToRegisterNumber

Total project time that needs to be registered on the day.

      totalTimeNumber

Total time registered on the day expressed in seconds.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.