ExpenseSetup - Get expense setup days preview

API Url

Used to get a preview of the active expenses for each day from the given interval

PUT
http://localhost:16010/ProMarkREST/web/Expense/preview-days

Permissions: user

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    endDateDate

The interval end date

    expenseSetupObject

Selected expense setup entity

      categoryoptionalObject

Category object if the coresponding level is for category

      departmentoptionalObject

Department object if the coresponding level is for department

      divisionoptionalObject

Division object if the coresponding level is for division

      employeeoptionalObject

Employee object if the coresponding level is for employee

      expensePeriodsoptionalObject[]

Expense Setup newly created and existing expense periods

      groupoptionalObject

Group object if the coresponding level is for group

      idString

Expense Setup Id

      levelInteger

Expense Setup level

    expenseSetupDaysoptionalObject[]

The entity that needs to be filled with the proper values

    startDateDate

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

FieldTypeDescription
    expenseSetupDaysObject[]

List of expense setup days with the active expenses

      dayDate

A day from the expense setup preview interval

      expensePeriodoptionalObject

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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.