Approval - Get expense approval registrations
API Url
Used for loading mileage and expense approval registrations.
http://localhost:16010/ProMarkREST/rest/Approval/expenses
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 |
|---|---|---|
mileagesoptional | Object[] | Collection of mileages if it is mileage registration |
accountDescoptional | String | Mileage account description. |
accountIdoptional | String | Mileage account id. |
carRegNooptional | String | License plate of the car. |
carTypeoptional | Number | 0: Company car, 1: Private car. |
commentoptional | String | A comment for the mileage. |
distanceoptional | Number | Distance of a route. |
fromoptional | String | Starting position of a route. |
roundtripoptional | Boolean | If the mileage includes the return trip too. |
supplementsoptional | Object[] | A colection of mileage supplements. |
idoptional | String | Supplement unique id. |
supplementDescoptional | String | Supplement description. |
typeoptional | Number | Supplement type (1: Mileage supplement 1; 2: Mileage supplement 2, 3: Travel Detail supplement 4: Loose Time supplement). |
tooptional | String | Ending position of a route. |
viaoptional | String | Alternate route. |
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| expenses | Object[] | Collection of employee expense approval registrations. |
| approvalStatus | Number | Approval Status |
approvalTimeoptional | Date | Approval Date Time |
approvedByoptional | String | Approved By |
avatarURIoptional | String | URI used for loading the employee avatar. |
| empId | String | Employee identifier |
| empName | String | Employee first name. |
| empNo | String | Employee No. |
| initials | String | Employee initials. |
outlaysoptional | Object[] | Collection of outlay expenses, if it is outlay expense registration |
dateoptional | Date | Registration date. |
receiptsoptional | Object[] | Collection of receipts , if it is outlay expense registration |
accountDescoptional | String | Account description. |
accountIdoptional | String | Account ID. |
commentoptional | String | Remarks in connection with the receipt. |
dateoptional | date | Receipt date. |
entryoptional | integer | Entry number. |
idoptional | string | Receipt identifier/number. |
valueoptional | Integer | Value on the receipt. |
| registrationTime | Date | Registration Date |
rejectedHigherLeveloptional | Boolean | If it is rejected at higher level? |
rejectionCodeoptional | String | Rejection Code |
rejectionTextoptional | String | Rejection Text |
| sortEmpNo | String | Sort employee No. |
| transSeq | Number | Transaction Sequence |
travelsoptional | Object[] | Collection of travel expenses, if it is travel expense registration |
endDateoptional | Date | Travel end date-time. |
startDateoptional | Date | Travel start date-time. |
travelDetailsoptional | Object[] | Collection of travel details |
commentoptional | String | Optional comments about the travel. |
endTimeoptional | Datetime | End date. |
entryNooptional | Integer | Travel detail unique number per transaction. |
mealsoptional | Boolean[3] | Collection of booleans representing if a meal has been taken or not. |
startTimeoptional | Datetime | Start date. |
supplementDescoptional | String | Supplement description. |
supplementIdoptional | String | Supplement id if exist. |
treatedByFirstoptional | String | First approved By |
treatedTimeFirstoptional | Date | First approval Date Time |
| type | Number | Expens registration type (0: All, 1: Mileage, 2: Travel). |
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/expenses?approvalStatus=1&approvalGroup="XXX:"
HTTP/1.1 200 OK{"response": {"data": {"expenses": [{"empNo": "055","sortEmpNo": "!!!!!055","empName": "Constantine Great Emperor","initials": "CGE","type": 1,"transSeq": 2078866,"registrationTime": "2014-10-26","empId": "545","approvalStatus": 1"mileages": [{"accountId": "MILEAGE","accountDesc": "Mileage","carRegNo": "ab12345","carType": 1,"comment": "","from": "Ballerup vest","to": "Ballerup nord","via": "Taastrup","distance": 10,"roundtrip": false}]},{"empNo": "4880","sortEmpNo": "!!!!4880","empName": "Extended Approval Test","initials": "EAT","type": 2,"transSeq": 2314633,"registrationTime": "2018-03-20","empId": "831","approvalStatus": 1"travels": [{"startTime": "2018-03-19T08:00:00.000","endTime": "2018-03-20T00:00:00.000","travelDetails": [{"entryNo": 0,"meals": [false,false,false],"startTime": "2018-03-19T08:00:00.000","endTime": "2018-03-20T00:00:00.000","comment": "Company Meet"}]}]},{"empNo": "XJWS","sortEmpNo": "!!!!XJWS","empName": "John Wick Sr.","initials": "JWS","type": 3,"transSeq": 2413694,"registrationTime": "2019-01-17","empId": "762","approvalStatus": 1,"outlays": [{"date": "2019-01-17","empId": "762","receipts": [{"accountId": "OUTLAY1","accountDesc": "Expenses","date": "2019-01-08","entry": 1,"comment": "","id": "34535","value": "12",}]}]}]},"errorCode": 0,"errorMessage": ""}}