Returns extended data of receipts, trips, daily allowances and rewards in accounted state.
By default returns the expenses from the latest batch date. Each page contains collections of expenses from one batch date, starting from the most recent batch date, with each next page having batch dates in descending order.
The list of batch dates is returned on /api/home
.
Expenses are returned either from one batch date (via page
parameter) or from one batch document, if batch_reference_number
is present.
GET /api/home 200 { "has_more_items": true, "transactions_in_accounted": [], "daily_allowances_in_accounted": [ { "id": 93, "description": "test perdiem 1", "_id": "daily_allowance-93", "user_name": "KATE Key", "state": "accounted", "user_id": 58, "type": "daily_allowance", "updated_at": "2023-02-16T13:00:40.746Z", "cost_center_ids": [ 66 ], "date": "2021-12-05", "approvers": [], "approved_by": [ "Le Admin" ], "approved_by_ids": [ "1" ], "current_approvers_ids": [], "transaction_approvers": [], "created_at": "2022-03-31T11:00:59.254Z", "company_id": 2, "paid_at": "2023-03-16T21:09:41.200Z", "batch_sending_failed": null, "cost_centers": [ { "id": 66, "name": "test cost center", "dimension_name": "123.0", "assignee_ids": [ 1 ], "deactivated": false, "external_id": "7037", "required_dimension": false, "approvers": [] } ], "reverse_of": null, "reverse_id": null, "number_of_days": 0, "cost_center_id": 0, "taxable": 62.1, "subtotal": 62.1, "free_meals_cost": 0, "user": { "id": 58, "name": "KATE Key", "email": "k@k.com", "country": { "id": 1, "name": "Finland", "currency": "EUR", "currency_symbol": "€" } }, "comments": [ { "comment": "this is comment!", "user_name": "Le Admin", "created_at": "23/08/23 12:13", "disapprove_comment": false, "reversal_comment": false } ], "free_meal_days": [ { "id": 962, "daily_allowance_id": 93, "had_breakfast": false, "had_lunch": false, "had_dinner": false, "is_full": true, "created_at": "2022-03-31T11:00:59.267Z", "updated_at": "2022-03-31T11:00:59.267Z", "date": "2021-11-29" }, { "id": 963, "daily_allowance_id": 93, "had_breakfast": false, "had_lunch": false, "had_dinner": false, "is_full": true, "created_at": "2022-03-31T11:00:59.268Z", "updated_at": "2022-03-31T11:00:59.268Z", "date": "2021-11-30" } ], "documents": [], "entries": [ { "id": 186, "daily_allowance_id": 93, "country_id": 1, "start_time": "2021-11-29 10:30 Z", "end_time": "2021-11-30 10:30 Z", "country": { "id": 1, "name": "Finland", "country": { "id": 1, "name": "Finland", "currency": "EUR", "created_at": "2019-01-03T11:08:01.182Z", "updated_at": "2019-01-03T11:08:01.182Z", "code": null }, "currency_symbol": "€", "has_breakfast": false, "has_free_meal_days": true, "free_meal_day_threshold": 2, "free_meal_day_per_date": false, "multi_country": true } } ] } ], "trips_in_accounted": [], "rewards_in_accounted": [] }
Param name | Description |
---|---|
page
optional |
Page number. Starts from 0. Ignored if Validations:
|
batch_reference_number
optional |
Batch Reference Number, to return the expenses from the corresponding batch document. E.g. Validations:
|