Approval - Get approval registrations

API Url

Used for loading approval registrations of requested type (protime,projob,RejectedHigherLevel).

GET
http://localhost:16010/ProMarkREST/rest/Approval/registrations

Permissions: user

Query parameters

FieldTypeDescription
approvalGroupoptionalString

Approval Group ID. If not defined all valid approval groups are taken by default.

approvalStatusoptionalNumber

Approval status to filter data (1: Untreated, 2: Approved, 3: Rejected). In not defined then untreated transactions are returned.

Size range: 1-3
expandoptionalString

Expand specified properties (comma delimiter) with descriptions. Supported values are: 'all', extrainfo,extrainfovalue,reason Supports also exclusions, so you can add a minus in front (eg. '-extraInfo').

fieldsoptionalString

List of fields to be returned in the collection. Used for limiting amount of data.(Not implemented yet)

fromoptionalDate

Start date for loading registrations.

tooptionalDate

End date for loading registrations.

typeoptionalString

Transaction types. If not defined default = protime. RejectedHigherLevel = all transactions that are rejected at higher level(second approval/escalated level). When "rejectedHigherLevel" is used approvalStaus is ignored.

Allowed values:"protime""projob""rejectedHigherLevel"

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    registrationsObject

Collection of employee registrations

      accountInfooptionalString

Registration account Information

      approvalTimeoptionalDate

Approval time for approved transaction as date-time ISO-8601.

      approvedByoptionalString

Approved By for approved transaction.

      avatarURIoptionalString

URI used for loading the employee avatar.

      clockInoptionalDate

Clock In as date-time ISO-8601.

      clockOutoptionalDate

Clock Out as date-time ISO-8601.

      commentoptionalString

Transaction comment

      empIdString

Employee id

      empNameString

Employee first name

      empNoString

Employee No

      initialsString

Employee initials

      projectInfooptionalString

Project info if transaction is related to the project.

      reasonoptionalString

Transaction approval reasons

      registrationTimeDate

Registration Date and time as ISO-8601.

      rejectedByoptionalString

Rejected by for rejected transaction.

      rejectedHigherLevelBoolean

If Rejected at higher level

      rejectedTextoptionalString

Rejection Text for rejected transaction.

      rejectionCodeoptionalString

Rejection code if transaction is rejected only.

      rejectionTimeoptionalDate

Rejection time for rejected transaction as date-time ISO-8601.

      sortEmpNoString

Sort employee No

      supplementaryInfooptionalString

Transaction supplementary Information (eg, reason code description, value)

      transSeqNumber

Transaction Sequence

      treatedByFirstoptionalString

First Approver.

      treatedTimeFirstoptionalDate

First approved date/time

      typeString

Registration Type description

  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": {
"registrations": [
{
"empNo": "028",
"sortEmpNo": "!!!!!028",
"empName": "Alexander Severus Emperor",
"initials": "ASE",
"transSeq": 2048662,
"registrationTime": "2013-08-23T10:00:00.000",
"type": "Clock-out early",
"supplementaryInfo": "Meeting out",
"clockIn": "2013-08-23T09:06:00.000",
"clockOut": "2013-08-23T10:00:00.000",
"reason": "Transaction added or modified"
},
{
"empNo": "029",
"sortEmpNo": "!!!!!029",
"empName": "Maximinus Thrax Emperor",
"initials": "MTE",
"transSeq": 2048664,
"registrationTime": "2013-07-15T08:00:00.000",
"type": "Clock-in",
"clockIn": "2013-08-23T09:06:00.000",
"clockOut": "2013-08-23T10:00:00.000",
"reason": "Transaction added or modified"
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}