ExpenseSetup - Get expense setup days preview
API Url
Used to get a preview of the active expenses for each day from the given interval
http://localhost:16010/ProMarkREST/web/Expense/preview-days
Permissions: user
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| endDate | Date | The interval end date |
| expenseSetup | Object | Selected expense setup entity |
categoryoptional | Object | Category object if the coresponding level is for category |
departmentoptional | Object | Department object if the coresponding level is for department |
divisionoptional | Object | Division object if the coresponding level is for division |
employeeoptional | Object | Employee object if the coresponding level is for employee |
expensePeriodsoptional | Object[] | Expense Setup newly created and existing expense periods |
groupoptional | Object | Group object if the coresponding level is for group |
| id | String | Expense Setup Id |
| level | Integer | Expense Setup level |
expenseSetupDaysoptional | Object[] | The entity that needs to be filled with the proper values |
| startDate | Date | The interval start date |
Request example:
{"request": {"data": {"previewDays": [{"startDate": "2023-05-01","endDate": "2023-05-30","expenseSetup": {"primaryKey": "1-1206","id": "1-1206","expensePeriods": [],"employee": {"id": "1206","empNo": "R",...},"level": 1},"expenseSetupDays": []}]}}}
Success 200
| Field | Type | Description |
|---|---|---|
| expenseSetupDays | Object[] | List of expense setup days with the active expenses |
| day | Date | A day from the expense setup preview interval |
expensePeriodoptional | Object | The active expense period for a current date |
Success example:
HTTP/1.1 200 OK{"response": {"data": {"previewDays": [{"startDate": "2023-05-01","endDate": "2023-05-30","expenseSetup": {"primaryKey": "1-1206","id": "1-1206","expensePeriods": [],"employee": {"id": "1206","empNo": "R",...},"level": 1},"expenseSetupDays": [{"day": "2023-02-27","expensePeriod": {"expenseProfile": {"id": "MILEAGE","description": "Mileage/Outlay Expense","inactive": false},"fromDate": "2019-07-01","toDate": "2023-03-26","level": 2,"readOnly": true}},{"day": "2023-02-28","expensePeriod": {"expenseProfile": {"id": "MILEAGE","description": "Mileage/Outlay Expense","inactive": false},"fromDate": "2019-07-01","toDate": "2023-03-26","level": 2,"readOnly": true}},....]}]}}}
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. |