Approval - Get approval registrations
API Url
Used for loading approval registrations of requested type (protime,projob,RejectedHigherLevel).
http://localhost:16010/ProMarkREST/rest/Approval/registrations
Permissions: user
Query parameters
| Field | Type | Description |
|---|---|---|
approvalGroupoptional | String | Approval Group ID. If not defined all valid approval groups are taken by default. |
approvalStatusoptional | Number | Approval status to filter data (1: Untreated, 2: Approved, 3: Rejected). In not defined then untreated transactions are returned. 1-3 |
expandoptional | String | 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'). |
fieldsoptional | String | List of fields to be returned in the collection. Used for limiting amount of data.(Not implemented yet) |
fromoptional | Date | Start date for loading registrations. |
tooptional | Date | End date for loading registrations. |
typeoptional | String | 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. "protime""projob""rejectedHigherLevel" |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| registrations | Object | Collection of employee registrations |
accountInfooptional | String | Registration account Information |
approvalTimeoptional | Date | Approval time for approved transaction as date-time ISO-8601. |
approvedByoptional | String | Approved By for approved transaction. |
avatarURIoptional | String | URI used for loading the employee avatar. |
clockInoptional | Date | Clock In as date-time ISO-8601. |
clockOutoptional | Date | Clock Out as date-time ISO-8601. |
commentoptional | String | Transaction comment |
| empId | String | Employee id |
| empName | String | Employee first name |
| empNo | String | Employee No |
| initials | String | Employee initials |
projectInfooptional | String | Project info if transaction is related to the project. |
reasonoptional | String | Transaction approval reasons |
| registrationTime | Date | Registration Date and time as ISO-8601. |
rejectedByoptional | String | Rejected by for rejected transaction. |
| rejectedHigherLevel | Boolean | If Rejected at higher level |
rejectedTextoptional | String | Rejection Text for rejected transaction. |
rejectionCodeoptional | String | Rejection code if transaction is rejected only. |
rejectionTimeoptional | Date | Rejection time for rejected transaction as date-time ISO-8601. |
| sortEmpNo | String | Sort employee No |
supplementaryInfooptional | String | Transaction supplementary Information (eg, reason code description, value) |
| transSeq | Number | Transaction Sequence |
treatedByFirstoptional | String | First Approver. |
treatedTimeFirstoptional | Date | First approved date/time |
| type | String | Registration Type 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": {"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": ""}}