Expense - Get travel details
API Url
Used to get all mileages for an employee.
http://localhost:16010/ProMarkREST/rest/Mileage/employees/{emp_id}/travel-details
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| emp_id | String | Unique employee ID. |
Query parameters
| Field | Type | Description |
|---|---|---|
endDateoptional | Date | End date, Default : TODAY. |
startDateoptional | Date | Start date. |
Parameter
| Field | Type | Description |
|---|---|---|
| answer | String | The answer to the question. |
| answerDescription | String | The answer description for those questions that are supplied also with a list of values. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| expenses | Object[] | Collection of expenses. |
activityDescoptional | String | Activity description. |
activityIdoptional | String | Activity Id. |
| attendanceDate | Date | Date on the transaction. |
departmentDescoptional | String | Department description. |
departmentIdoptional | String | Department Id. |
descriptionoptional | String | Description. |
| endDate | Date | Travel end date-time. |
projectDescoptional | String | Project description. |
projectIdoptional | String | Project Id. |
questionsoptional | Object[] | Collection of questions. |
| dataType | Number | Data type of the question (0: Text, 1: Integer, 2: Decimal, 3: Boolean: 4: Date. 5: Time of day, 6: Date and time, 7: Time duration, 8: Time interval, 9: Date interval, 10: Date and time interval). Not to be changed on the client! 0-10 |
| id | String | Unique identifier for the question. |
| inputType | Number | Suggestion with controll type to display on the client (0: Standard input, depends on 'dataType', 1: Fill-in, 2: Drop-down, 3: Combo-box, 4: Text area, 5: Radio-set, 6: Check-box, 7: Selection list, 8: Calendar, 9: Calendar drop-down, 10: External lookup URI). Not to be changed on the client! 0-10 |
| isMandatory | Boolean | true = It is mandatory to enter an answer (select a value) on the question. Not to be changed on the client! |
| label | String | Label to display on the question. Not to be changed on the client! |
maxValueoptional | Number | Maximum value. Not to be changed on the client! |
minValueoptional | Number | Minimum value. Not to be changed on the client! |
| order | Number | The question order. |
| readOnly | Boolean | TRUE = Transaction is read-only (approved already). |
| startDate | Date | Travel start date-time. |
| transSeq | Integer | Transaction unique number. |
travelDetailsoptional | Object[] | Collection of travel details |
| endTime | Datetime | End date. |
| entryNo | Integer | Travel detail unique number per transaction. |
| meals | Logical | Collection of booleans representing if a meal has been taken or not. |
purposeoptional | String | Optional comments about the travel. |
| startTime | Datetime | Start date. |
supplementDescoptional | String | Supplement description. |
supplementIdoptional | String | Supplement id if needed. |
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": {"expenses": [{"transSeq": 2098475,"startTime": "2017-09-07T08:00:00.000","endTime": "2017-09-09T00:00:00.000","travelDetail": [{"entryNo": 3,"supplementId": "AMT","supplementDesc": "Supplement AMT","startTime": "2017-09-07T08:00:00.000","endTime": "2017-09-08T00:00:00.000","meals": [false, true, true],"purpose": "I had a flat tire on the way"}],"questions": [{"id": "2","order": 1,"label": "Number of persons","isMandatory": false,"inputType": 0,"dataType": 1,"answer": "6","answerDescription": "2018 Budget"},{"id": "1","order": 2,"label": "Client name","isMandatory": true,"inputType": 0,"dataType": 0,"answer": "Magnus A/S"}]}]},"errorCode": 0,"errorMessage": ""}}
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |