Approves expense. If params of the expense are present, updates the expense before approval
Disapprove expense with a comment
Param name | Description |
---|---|
comment
optional |
The reason of expense disapproval; will be displayed to user Validations:
|
Get the list of all daily allowances accessible by the current user. Can be paginated and/or filtered by daily allowance state
Param name | Description |
---|---|
archived_after
optional |
Return only daily allowances accounted on and after the supplied date. Date format: YYYYMMDD (example: 20180702) Validations:
|
page
optional |
Return only one page of daily allowances. Default per-page is 10 Validations:
|
per_page
optional |
Number of daily allowances returned per page. Works only in combination with “page” param. Default value is 10 Validations:
|
state
optional |
Validations:
|
Get the total cost, deduction cost, and taxalbe with tax (Swedish calculator only) of the daily allowance in cents, based on year values, entries, and free meals.
[ { "entries": [ { "country_id": 1, "start_time": 1716890400, "end_time": 1716976800 } ], "year":2024, "free_meal_days": [ { "date": "2024-05-28", "is_full": true, "had_lunch": true, "had_dinner": true } ], "user_id": 1, "time_zone": "Europe/Helsinki", "is_reverse": false } ]
Param name | Description |
---|---|
user_id
required |
Allowance User id Validations:
|
time_zone
optional |
Used Timezone Validations:
|
year
required |
Year in which allowance happens. Validations:
|
is_reverse
required |
If the allowance is a reverse of the other allowance Validations:
|
free_meal_days
required |
An array with the specific meals attributes. At least one item should be present Validations:
|
date
required |
Date in YYYY-MM-DD format. Validations:
|
is_full
required |
Whether the day corresponding to that “free meal day” is a “full day” or a “half day”. Validations:
|
had_breakfast
optional |
True if user had breakfast on that day. Only specific Allowance countries have breakfast free meals enabled. Validations:
|
had_lunch
optional |
True if user had lunch on that day. Validations:
|
had_dinner
optional |
True if user had dinner on that day. Validations:
|
breakfast_is_taxable
optional |
Defines if breakfast is taxable (Swedish calculator only). Validations:
|
lunch_is_taxable
optional |
Defines if lunch is taxable (Swedish calculator only). Validations:
|
dinner_is_taxable
optional |
Defines if dinner is taxable (Swedish calculator only). Validations:
|
entries
required |
An array with the specific entry attributes (country, start/end time in UNIX format) to pass to calculator. At least one item should be present in array Validations:
|
entries[country_id]
required |
ID of the Allowance country Validations:
|
entries[start_time]
required |
Start time in unix format: the seconds timestamp of the given date. Validations:
|
entries[end_time]
required |
End time in unix format: the seconds timestamp of the given date. Validations:
|
Daily Allowance costs break down in cents
Param name | Description |
---|---|
subtotal
required |
Total cost of the Daily Allowance. Validations:
|
deduction
required |
Meal Deduction cost of the Daily Allowance. Validations:
|
taxable
required |
Total amount for taxalbe meals, including tax (Swedish calculator only). Validations:
|
tax
required |
Total tax (Swedish calculator only). Validations:
|