Returns receipts, trips, daily allowances and rewards grouped by state (except for accounted expenses), as well as many other collections needed for the first web app load.
Expenses in accounted state are available via /archive
GET /api/expenses
200
{
"batch_dates": [
"2020-07-20T00:00:00.000Z",
"2020-07-16T00:00:00.000Z",
"2020-06-15T00:00:00.000Z",
"2020-05-04T00:00:00.000Z"
],
"transactions_on_review": [],
"transactions_in_draft": [],
"transactions_in_reviewing": [],
"transactions_in_unapproved": [],
"transactions_in_queue": [],
"trips_on_review": [],
"trips_in_draft": [],
"trips_in_reviewing": [],
"trips_in_unapproved": [],
"trips_in_queue": [],
"daily_allowances_on_review": [],
"daily_allowances_in_draft": [],
"daily_allowances_in_reviewing": [],
"daily_allowances_in_unapproved": [],
"daily_allowances_in_queue": [
{
"id": 149,
"description": "Daily allowance with time zone",
"_id": "daily_allowance-149",
"user_name": "Hack Häckermann",
"state": "queue",
"user_id": 1,
"type": "daily_allowance",
"updated_at": "2022-12-23T15:24:48.581Z",
"cost_center_ids": [],
"date": "2022-12-02",
"approvers": [],
"approved_by": [],
"approved_by_ids": [],
"current_approvers_ids": [],
"transaction_approvers": [],
"created_at": "2022-12-23T15:22:02.906Z",
"company_id": 19,
"paid_at": null,
"batch_sending_failed": false,
"cost_centers": [],
"reverse_of": null,
"number_of_days": 0,
"cost_center_id": 0,
"taxable": 2500.0,
"subtotal": 50.0,
"free_meals_cost": 25.0,
"user": {
"id": 1,
"name": "Hack Häckermann",
"email": "buru@hack.com",
"country": {
"id": 12,
"name": "Estonia",
"currency": "EUR",
"currency_symbol": "€",
"default_tax_percentage": 0.0
}
},
"comments": [],
"free_meal_days": [
{
"id": 1182,
"daily_allowance_id": 149,
"had_breakfast": false,
"had_lunch": true,
"had_dinner": true,
"is_full": true,
"created_at": "2022-12-23T15:22:02.962Z",
"updated_at": "2022-12-23T15:22:02.962Z",
"date": "2022-12-01"
}
],
"documents": [],
"entries": [
{
"id": 516,
"daily_allowance_id": 149,
"country_id": 8,
"start_time": "2022-12-01 13:15 Z",
"end_time": "2022-12-02 12:30 Z",
"country": {
"id": 8,
"name": "Japan",
"country": {
"id": 10,
"name": "Japan",
"currency": "JPY",
"created_at": "2020-04-24T14:41:04.217Z",
"updated_at": "2020-04-24T14:41:04.217Z",
"code": null,
"default_tax_percentage": "0.0"
},
"currency_symbol": "¥",
"has_breakfast": false,
"has_free_meal_days": true,
"free_meal_day_threshold": 2,
"free_meal_day_per_date": false,
"multi_country": true
}
}
]
}
],
"rewards_on_review": [],
"rewards_in_draft": [],
"rewards_in_reviewing": [],
"rewards_in_unapproved": [],
"rewards_in_queue": [
{
"id": 70,
"description": "Japanese reward. 1 Koku",
"_id": "reward-70",
"user_name": "Hack Häckermann",
"state": "queue",
"user_id": 1,
"type": "reward",
"updated_at": "2022-12-20T22:44:32.866Z",
"cost_center_ids": [],
"date": "2022-12-21",
"approvers": [],
"approved_by": null,
"approved_by_ids": [],
"current_approvers_ids": [],
"transaction_approvers": [],
"created_at": "2022-12-20T22:44:32.866Z",
"company_id": 19,
"paid_at": null,
"batch_sending_failed": false,
"cost_centers": [],
"reverse_of": null,
"reward_type_id": 32,
"income_tax_percentage": "0.0",
"taxable": 10000.0,
"cost": 10000.0,
"user": {
"id": 1,
"name": "Hack Häckermann",
"email": "buru@hack.com",
"country": {
"id": 12,
"name": "Estonia",
"currency": "EUR",
"currency_symbol": "€",
"default_tax_percentage": 0.0
}
},
"comments": [],
"reward_type": {
"id": 32,
"name": "Daimyo reward",
"company_id": 19,
"expense_account_id": 333,
"account_code": "1111",
"cost": 10000.0,
"deactivated": false,
"assignee_ids": [],
"transaction_code": "336",
"transaction_code_description": "Work reward",
"deduct_income_tax": false,
"fixed_price": true
},
"tax_card": {
"id": 48,
"user_id": 1,
"image": {
"url": "http://thinkpad.local:9000/rcam-test/tax_card/1/f09e967d-4496-4511-975e-96cf50c566ea.png/f09e967d-4496-4511-975e-96cf50c566ea.png?X-Amz-Expires=259200&X-Amz-Date=20231109T164349Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=BURULAPTOP%2F20231109%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=9d2dc8f8ce4aa9b81677b951281c803a6285efea73fcf78dd4a2a100a419882b"
},
"tax_percentage": "0.6",
"is_current": true
},
"documents": []
},
{
"id": 71,
"description": "another koku",
"_id": "reward-71",
"user_name": "Hack Häckermann",
"state": "queue",
"user_id": 1,
"type": "reward",
"updated_at": "2022-12-20T23:51:24.330Z",
"cost_center_ids": [],
"date": "2022-12-21",
"approvers": [],
"approved_by": null,
"approved_by_ids": [],
"current_approvers_ids": [],
"transaction_approvers": [],
"created_at": "2022-12-20T23:51:24.330Z",
"company_id": 19,
"paid_at": null,
"batch_sending_failed": false,
"cost_centers": [],
"reverse_of": null,
"reward_type_id": 32,
"income_tax_percentage": "0.0",
"taxable": 10000.0,
"cost": 10000.0,
"user": {
"id": 1,
"name": "Hack Häckermann",
"email": "buru@hack.com",
"country": {
"id": 12,
"name": "Estonia",
"currency": "EUR",
"currency_symbol": "€",
"default_tax_percentage": 0.0
}
},
"comments": [],
"reward_type": {
"id": 32,
"name": "Daimyo reward",
"company_id": 19,
"expense_account_id": 333,
"account_code": "1111",
"cost": 10000.0,
"deactivated": false,
"assignee_ids": [],
"transaction_code": "336",
"transaction_code_description": "Work reward",
"deduct_income_tax": false,
"fixed_price": true
},
"tax_card": {
"id": 48,
"user_id": 1,
"image": {
"url": "http://thinkpad.local:9000/rcam-test/tax_card/1/f09e967d-4496-4511-975e-96cf50c566ea.png/f09e967d-4496-4511-975e-96cf50c566ea.png?X-Amz-Expires=259200&X-Amz-Date=20231109T164349Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=BURULAPTOP%2F20231109%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=9d2dc8f8ce4aa9b81677b951281c803a6285efea73fcf78dd4a2a100a419882b"
},
"tax_percentage": "0.6",
"is_current": true
},
"documents": []
},
{
"id": 72,
"description": "Ggg reward",
"_id": "reward-72",
"user_name": "Hack Häckermann",
"state": "queue",
"user_id": 1,
"type": "reward",
"updated_at": "2022-12-21T12:42:25.299Z",
"cost_center_ids": [],
"date": "2022-12-21",
"approvers": [],
"approved_by": null,
"approved_by_ids": [],
"current_approvers_ids": [],
"transaction_approvers": [],
"created_at": "2022-12-21T12:42:25.299Z",
"company_id": 19,
"paid_at": null,
"batch_sending_failed": false,
"cost_centers": [],
"reverse_of": null,
"reward_type_id": 33,
"income_tax_percentage": "0.6",
"taxable": 333.0,
"cost": 333.0,
"user": {
"id": 1,
"name": "Hack Häckermann",
"email": "buru@hack.com",
"country": {
"id": 12,
"name": "Estonia",
"currency": "EUR",
"currency_symbol": "€",
"default_tax_percentage": 0.0
}
},
"comments": [],
"reward_type": {
"id": 33,
"name": "Another reward",
"company_id": 19,
"expense_account_id": 334,
"account_code": "3333",
"cost": 333.0,
"deactivated": false,
"assignee_ids": [],
"transaction_code": "208",
"transaction_code_description": "Notice period compensation",
"deduct_income_tax": true,
"fixed_price": false
},
"tax_card": {
"id": 48,
"user_id": 1,
"image": {
"url": "http://thinkpad.local:9000/rcam-test/tax_card/1/f09e967d-4496-4511-975e-96cf50c566ea.png/f09e967d-4496-4511-975e-96cf50c566ea.png?X-Amz-Expires=259200&X-Amz-Date=20231109T164349Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=BURULAPTOP%2F20231109%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=9d2dc8f8ce4aa9b81677b951281c803a6285efea73fcf78dd4a2a100a419882b"
},
"tax_percentage": "0.6",
"is_current": true
},
"documents": []
},
{
"id": 73,
"description": "Another reward",
"_id": "reward-73",
"user_name": "Hack Häckermann",
"state": "queue",
"user_id": 1,
"type": "reward",
"updated_at": "2022-12-21T12:46:52.898Z",
"cost_center_ids": [],
"date": "2022-12-21",
"approvers": [],
"approved_by": null,
"approved_by_ids": [],
"current_approvers_ids": [],
"transaction_approvers": [],
"created_at": "2022-12-21T12:46:52.898Z",
"company_id": 19,
"paid_at": null,
"batch_sending_failed": false,
"cost_centers": [],
"reverse_of": null,
"reward_type_id": 33,
"income_tax_percentage": "0.6",
"taxable": 333.0,
"cost": 333.0,
"user": {
"id": 1,
"name": "Hack Häckermann",
"email": "buru@hack.com",
"country": {
"id": 12,
"name": "Estonia",
"currency": "EUR",
"currency_symbol": "€",
"default_tax_percentage": 0.0
}
},
"comments": [],
"reward_type": {
"id": 33,
"name": "Another reward",
"company_id": 19,
"expense_account_id": 334,
"account_code": "3333",
"cost": 333.0,
"deactivated": false,
"assignee_ids": [],
"transaction_code": "208",
"transaction_code_description": "Notice period compensation",
"deduct_income_tax": true,
"fixed_price": false
},
"tax_card": {
"id": 48,
"user_id": 1,
"image": {
"url": "http://thinkpad.local:9000/rcam-test/tax_card/1/f09e967d-4496-4511-975e-96cf50c566ea.png/f09e967d-4496-4511-975e-96cf50c566ea.png?X-Amz-Expires=259200&X-Amz-Date=20231109T164349Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=BURULAPTOP%2F20231109%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=9d2dc8f8ce4aa9b81677b951281c803a6285efea73fcf78dd4a2a100a419882b"
},
"tax_percentage": "0.6",
"is_current": true
},
"documents": []
},
{
"id": 74,
"description": "lglflgflg",
"_id": "reward-74",
"user_name": "Hack Häckermann",
"state": "queue",
"user_id": 1,
"type": "reward",
"updated_at": "2022-12-21T12:49:22.767Z",
"cost_center_ids": [],
"date": "2022-12-21",
"approvers": [],
"approved_by": null,
"approved_by_ids": [],
"current_approvers_ids": [],
"transaction_approvers": [],
"created_at": "2022-12-21T12:49:22.767Z",
"company_id": 19,
"paid_at": null,
"batch_sending_failed": false,
"cost_centers": [],
"reverse_of": null,
"reward_type_id": 33,
"income_tax_percentage": "0.6",
"taxable": 333.0,
"cost": 333.0,
"user": {
"id": 1,
"name": "Hack Häckermann",
"email": "buru@hack.com",
"country": {
"id": 12,
"name": "Estonia",
"currency": "EUR",
"currency_symbol": "€",
"default_tax_percentage": 0.0
}
},
"comments": [],
"reward_type": {
"id": 33,
"name": "Another reward",
"company_id": 19,
"expense_account_id": 334,
"account_code": "3333",
"cost": 333.0,
"deactivated": false,
"assignee_ids": [],
"transaction_code": "208",
"transaction_code_description": "Notice period compensation",
"deduct_income_tax": true,
"fixed_price": false
},
"tax_card": {
"id": 48,
"user_id": 1,
"image": {
"url": "http://thinkpad.local:9000/rcam-test/tax_card/1/f09e967d-4496-4511-975e-96cf50c566ea.png/f09e967d-4496-4511-975e-96cf50c566ea.png?X-Amz-Expires=259200&X-Amz-Date=20231109T164349Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=BURULAPTOP%2F20231109%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=9d2dc8f8ce4aa9b81677b951281c803a6285efea73fcf78dd4a2a100a419882b"
},
"tax_percentage": "0.6",
"is_current": true
},
"documents": []
},
{
"id": 75,
"description": "finally fixed??",
"_id": "reward-75",
"user_name": "Hack Häckermann",
"state": "queue",
"user_id": 1,
"type": "reward",
"updated_at": "2022-12-21T13:00:08.933Z",
"cost_center_ids": [],
"date": "2022-12-21",
"approvers": [],
"approved_by": null,
"approved_by_ids": [],
"current_approvers_ids": [],
"transaction_approvers": [],
"created_at": "2022-12-21T13:00:08.933Z",
"company_id": 19,
"paid_at": null,
"batch_sending_failed": false,
"cost_centers": [],
"reverse_of": null,
"reward_type_id": 33,
"income_tax_percentage": "0.6",
"taxable": 333.0,
"cost": 333.0,
"user": {
"id": 1,
"name": "Hack Häckermann",
"email": "buru@hack.com",
"country": {
"id": 12,
"name": "Estonia",
"currency": "EUR",
"currency_symbol": "€",
"default_tax_percentage": 0.0
}
},
"comments": [],
"reward_type": {
"id": 33,
"name": "Another reward",
"company_id": 19,
"expense_account_id": 334,
"account_code": "3333",
"cost": 333.0,
"deactivated": false,
"assignee_ids": [],
"transaction_code": "208",
"transaction_code_description": "Notice period compensation",
"deduct_income_tax": true,
"fixed_price": false
},
"tax_card": {
"id": 48,
"user_id": 1,
"image": {
"url": "http://thinkpad.local:9000/rcam-test/tax_card/1/f09e967d-4496-4511-975e-96cf50c566ea.png/f09e967d-4496-4511-975e-96cf50c566ea.png?X-Amz-Expires=259200&X-Amz-Date=20231109T164349Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=BURULAPTOP%2F20231109%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=9d2dc8f8ce4aa9b81677b951281c803a6285efea73fcf78dd4a2a100a419882b"
},
"tax_percentage": "0.6",
"is_current": true
},
"documents": []
},
{
"id": 76,
"description": "won't work again",
"_id": "reward-76",
"user_name": "Hack Häckermann",
"state": "queue",
"user_id": 1,
"type": "reward",
"updated_at": "2022-12-21T13:00:47.147Z",
"cost_center_ids": [],
"date": "2022-12-21",
"approvers": [],
"approved_by": null,
"approved_by_ids": [],
"current_approvers_ids": [],
"transaction_approvers": [],
"created_at": "2022-12-21T13:00:47.147Z",
"company_id": 19,
"paid_at": null,
"batch_sending_failed": false,
"cost_centers": [],
"reverse_of": null,
"reward_type_id": 33,
"income_tax_percentage": "0.6",
"taxable": 333.0,
"cost": 333.0,
"user": {
"id": 1,
"name": "Hack Häckermann",
"email": "buru@hack.com",
"country": {
"id": 12,
"name": "Estonia",
"currency": "EUR",
"currency_symbol": "€",
"default_tax_percentage": 0.0
}
},
"comments": [],
"reward_type": {
"id": 33,
"name": "Another reward",
"company_id": 19,
"expense_account_id": 334,
"account_code": "3333",
"cost": 333.0,
"deactivated": false,
"assignee_ids": [],
"transaction_code": "208",
"transaction_code_description": "Notice period compensation",
"deduct_income_tax": true,
"fixed_price": false
},
"tax_card": {
"id": 48,
"user_id": 1,
"image": {
"url": "http://thinkpad.local:9000/rcam-test/tax_card/1/f09e967d-4496-4511-975e-96cf50c566ea.png/f09e967d-4496-4511-975e-96cf50c566ea.png?X-Amz-Expires=259200&X-Amz-Date=20231109T164349Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=BURULAPTOP%2F20231109%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=9d2dc8f8ce4aa9b81677b951281c803a6285efea73fcf78dd4a2a100a419882b"
},
"tax_percentage": "0.6",
"is_current": true
},
"documents": []
},
{
"id": 77,
"description": "Koku reward",
"_id": "reward-77",
"user_name": "Hack Häckermann",
"state": "queue",
"user_id": 1,
"type": "reward",
"updated_at": "2022-12-23T21:07:33.287Z",
"cost_center_ids": [],
"date": "2022-12-23",
"approvers": [],
"approved_by": null,
"approved_by_ids": [],
"current_approvers_ids": [],
"transaction_approvers": [],
"created_at": "2022-12-23T21:07:33.287Z",
"company_id": 19,
"paid_at": null,
"batch_sending_failed": false,
"cost_centers": [],
"reverse_of": null,
"reward_type_id": 35,
"income_tax_percentage": "0.6",
"taxable": 555.0,
"cost": 555.0,
"user": {
"id": 1,
"name": "Hack Häckermann",
"email": "buru@hack.com",
"country": {
"id": 12,
"name": "Estonia",
"currency": "EUR",
"currency_symbol": "€",
"default_tax_percentage": 0.0
}
},
"comments": [],
"reward_type": {
"id": 35,
"name": "Koku",
"company_id": 19,
"expense_account_id": 335,
"account_code": "555",
"cost": 555.0,
"deactivated": false,
"assignee_ids": [],
"transaction_code": "336",
"transaction_code_description": "Work reward",
"deduct_income_tax": true,
"fixed_price": true
},
"tax_card": {
"id": 48,
"user_id": 1,
"image": {
"url": "http://thinkpad.local:9000/rcam-test/tax_card/1/f09e967d-4496-4511-975e-96cf50c566ea.png/f09e967d-4496-4511-975e-96cf50c566ea.png?X-Amz-Expires=259200&X-Amz-Date=20231109T164349Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=BURULAPTOP%2F20231109%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=9d2dc8f8ce4aa9b81677b951281c803a6285efea73fcf78dd4a2a100a419882b"
},
"tax_percentage": "0.6",
"is_current": true
},
"documents": []
}
]
}