Approval - Get custom approval registrations
API Url
Used for loading custom approval registrations of requested type. custom = (project, absence (AA and AH), time supplement and number supplement registrations)
http://localhost:16010/ProMarkREST/rest/Approval/custom-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. (Not implemented yet) |
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. |
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 approval registrations |
account1optional | String | Formatted value for custom account1, based on "Approval web-part Proportal 2018" setup |
account2optional | String | Formatted value for custom account2, based on "Approval web-part Proportal 2018" setup |
activityDescroptional | String | Activity description |
activityIdoptional | String | Activity id, if used |
| approvalStatus | Number | Approval status |
avatarURIoptional | String | URI to the employee avatar picture. |
commentoptional | String | Comment if exists |
dim1Descroptional | String | Dimension1 description |
dim1Idoptional | String | Dimension1 value if used |
dim2Descroptional | String | Dimension2 description |
dim2Idoptional | String | Dimension2 value if used |
| empId | String | Employee identifier |
| empName | String | Employee first name |
| empNo | String | Employee No |
endTimeoptional | Date | End time |
formatoptional | String | Account format ("HH:MM", "HH.CC", ".1", ".2" and so on) |
| initials | String | Employee initials. |
projectDescroptional | String | Project description |
projectIdoptional | String | Project id, if used |
| registrationTime | Date | Registration Date and time as ISO-8601. |
| regType | String | Registration Type Id |
| regtypeDescr | String | Registration Type description |
rejectedHigherLeveloptional | Boolean | If it is rejected at higher level? |
signOffByoptional | String | Signof by |
signOffDateTimeoptional | Date | Sign off date time |
| sortEmpNo | String | Employee No used for sorting |
startTimeoptional | Date | Start time |
timeTypeDescroptional | String | Time type id, if exists |
timeTypeIdoptional | String | Time type id, if exists |
| transSeq | Number | Transaction Sequence |
treatedByoptional | String | Approved by |
treatedByFirstoptional | String | First approver |
treatedTimeoptional | Date | Approved date time |
treatedTimeFirstoptional | Date | First Approved date time |
unitoptional | Number | Accounts unit (1: hours, 2: days, 3: pieces). |
| value | Number | Registration value |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example for rest/Approval/custom-registrations?&approvalStatus=1&approvalGroup="XXX:"
HTTP/1.1 200 OK{"response": {"data": {"registrations": [{"empNo": "4880","sortEmpNo": "!!!!!4880","initials": "EAT","empName": "Extended Approval Test","transSeq": 2271899,"registrationTime": "2018-01-03","regType": "AN","regTypeDescr": "Number supplement","timeTypeId": "STB","timeTypeDescr": "STB SecondAppr","value": 116,"comment": "116~\u0003","unit": 3,"format": "2","empId": "831","approvalStatus": 2},{"empNo": "4880","sortEmpNo": "!!!!!4880","initials": "EAT","empName": "Extended Approval Test","transSeq": 2273705,"registrationTime": "2018-01-24","regType": "AN","regTypeDescr": "Number supplement","timeTypeId": "AARSLEFF","timeTypeDescr": "Aarsleff","value": 102,"projectId": "AARSLEFF","projectDescr": "Aarsleff project I","activityId": "ACT1","activityDescr": "Aarsleff activity 1","comment": "test~\u0003","unit": 3,"format": "2","empId": "831","approvalStatus": 2,},{"empNo": "4990","sortEmpNo": "!!!!!4880","initials": "EAI","empName": "Extended Approval II Test","transSeq": 2313713,"registrationTime": "2018-02-13","regType": "AB","regTypeDescr": "Absence","timeTypeId": "CFP10","timeTypeDescr": "Bank H","startTime": "1994-01-01T07:00:00.000","endTime": "1994-01-01T15:00:00.000","value": 27000,"comment": "","unit": 1,"format": "1","empId": "866"}]},"errorCode": 0,"errorMessage": ""}}