Expense - Get expense set-up for an employee
API Url
Used to get expense set-up for an employee.
http://localhost:16010/ProMarkREST/rest/Mileage/employees/{emp_id}/expense-setup
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| emp_id | String | Unique employee ID. |
Query parameters
| Field | Type | Description |
|---|---|---|
dateoptional | Date | Registration date for expense, Default: TODAY. |
typeoptional | String | Expense type : Mileage Travel Outlay. |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| expenseSetup | Object[] | Collection of expense Setup. |
mileageoptional | Object[] | Collection of mileage setup. |
accountsoptional | Object[] | Collection of accounts. |
| description | String | Description of account |
| favorite | Boolean | If the account is favorite. |
| id | String | Unique identifier for the account object. |
isPurposeMandatoryoptional | Boolean | If Purpose is mandaory or not. If This Value is TRUE then it muse be included. |
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! |
| maxValue | Number | Maximum value. Not to be changed on the client! |
| minValue | Number | Minimum value. Not to be changed on the client! |
valueoptional | Object[] | Collection of question values. |
| description | String | Description value. |
| id | String | Id of value. |
outlayoptional | Object[] | Collection of outlay setup. |
accountsoptional | Object[] | Collection of accounts. |
| description | String | Description of account |
| favorite | Boolean | If the account is favorite. |
| id | String | Unique identifier for the account object. |
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! |
| maxValue | Number | Maximum value. Not to be changed on the client! |
| minValue | Number | Minimum value. Not to be changed on the client! |
valueoptional | Object[] | Collection of question values. |
| description | String | Description value. |
| id | String | Id of value. |
projectMandatoryoptional | Boolean | Is project is Mandatory. |
relatedToDeptoptional | Boolean | Relate to department. |
relatedToProjectoptional | Boolean | Relate to project. |
showDescrAllowanceoptional | String | Show allowance description? |
showDescrMileageoptional | String | Show mileage description? |
traveloptional | Object[] | Collection of travel setup. |
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! |
| maxValue | Number | Maximum value. Not to be changed on the client! |
| minValue | Number | Minimum value. Not to be changed on the client! |
valueoptional | Object[] | Collection of question values. |
| description | String | Description value. |
| id | String | Id of value. |
supplementsoptional | Object[] | Collection of supplements. |
| description | String | Description of supplement |
| favorite | Boolean | If the supplement is favorite. |
| id | String | Unique identifier for the supplement object. |
surplusSupplementsoptional | Object[] | Collection of surplus supplements. |
| description | String | Description of supplement |
| favorite | Boolean | If the supplement is favorite. |
| id | String | Unique identifier for the supplement object. |
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": {"expenseSetup": {"relatedToProject": true,"ProjectMandatory": false,"relatedToDept": true,"mileage": {"accounts": [{"id": "M001","description": "Mileage supplement - primary","favorite": false},{"id": "MILEAGE","description": "Mileage","favorite": false}],"questions": [{"id": "3","label": "Period of year","isMandatory": false,"inputType": 3,"dataType": 0,"values": [{"order": 1,"id": "F","description": "Fall"},{"order": 2,"id": "W","description": "Winter"},{"order": 3,"id": "SP","description": "Spring"},{"order": 4,"id": "S","description": "summer"}]},{"id": "ANTAL","label": "Number of persons","isMandatory": false,"inputType": 0,"dataType": 1,"minValue": 1,"maxValue": 10},{"id": "COLOUR","label": "Which colour","isMandatory": false,"inputType": 2,"dataType": 0,"values": [{"order": 1,"id": "R","description": "Red"},{"order": 2,"id": "B","description": "Blue"},{"order": 3,"id": "Y","description": "Yellow"},{"order": 4,"id": "Br","description": "Brown"},{"order": 5,"id": "Bl","description": "Black"},{"order": 6,"id": "G","description": "Green"},{"order": 7,"id": "Gr","description": "Gray"}]}]},"travel": {"supplements": [{"id": "TENT","description": "Tent","favorite": false}],"surplusSupplements": [{"id": "1","description": "Supplement 1","favorite": false}],"questions": [{"id": "1","label": "Hvor er du henne","isMandatory": true,"inputType": 0,"dataType": 0},{"id": "2","label": "Hvor mange","isMandatory": false,"inputType": 0,"dataType": 1,"minValue": 1,"maxValue": 10}]},"outlay": {"accounts": [{"id": "B001","description": "Betalt morgenmad","favorite": false},{"id": "B002","description": "Betalt frokost","favorite": false}],"questions": [{"id": "ANTAL","label": "Number of persons","isMandatory": false,"inputType": 0,"dataType": 1,"minValue": 1,"maxValue": 10}]}}},"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. |