Returns receipts, trips, and daily allowances grouped by state, as well as many other collections needed for the first web app load.
An example output for the test company:
GET /api/home 200 { "cost_centers": { "Cost Center": [ { "id": 691, "company_id": 17, "name": "Ololo CC", "created_at": "2020-10-09T16:08:31.229Z", "updated_at": "2020-10-09T16:18:12.242Z", "dimension_name": "Cost Center", "deactivated": false, "send_to_accounting": true, "external_id": "”06”" }, { "id": 692, "company_id": 17, "name": "Weird Cost Center", "created_at": "2020-10-09T17:06:42.363Z", "updated_at": "2020-10-09T17:06:42.363Z", "dimension_name": "Cost Center", "deactivated": false, "send_to_accounting": true, "external_id": null } ] }, "batch_dates": [ "2021-04-13T00:00:00.000Z", "2021-02-25T00:00:00.000Z", "2021-02-23T00:00:00.000Z", "2021-01-05T00:00:00.000Z", "2020-12-10T00:00:00.000Z", "2020-11-09T00:00:00.000Z", "2020-10-10T00:00:00.000Z", "2020-10-09T00:00:00.000Z", "2020-09-07T00:00:00.000Z", "2020-07-20T00:00:00.000Z", "2020-07-01T00:00:00.000Z" ], "missing_receipts": [], "transactions_on_review": [], "transactions_in_draft": [], "transactions_in_reviewing": [], "transactions_in_unapproved": [], "transactions_in_queue": [], "transactions_in_accounted": [ { "id": 2759, "description": "another personal asset", "_id": "receipt-2759", "user_name": "HackH", "state": "accounted", "user_id": 1, "type": "receipt", "updated_at": "2021-04-13T12:22:21.779Z", "cost_center_ids": [], "date": "2021-04-13", "approvers": [], "approved_by": [], "approved_by_ids": [], "current_approvers_ids": [], "transaction_approvers": [], "created_at": "2021-04-13T12:21:01.132Z", "company_id": 17, "payed_at": null, "credit_account_id": 208, "debit_account_id": 210, "tax_percentage": null, "taxable": 355.0, "cost_center_id": 0, "connected_to_bill_line": false, "vat_code": null, "bill_id": null, "uuid": null, "billed_amount": null, "billed_amount_currency": null, "original_amount": "355.00", "original_amount_currency": "EUR", "user": { "id": 1, "name": "HackH", "email": "buru@hack.com", "country": { "id": 3, "name": "Sweden", "currency": "SEK", "currency_symbol": "kr" } }, "cost_centers": [], "comments": [], "attachments": [], "vat_lines": [ { "id": 2714, "transaction_id": 2759, "taxable": 355.0, "tax_percentage": "0.0", "currency": "EUR" } ], "credit_account": { "id": 208, "code": "222", "deactivated": false, "accountable_type": "AssetAccount", "name": "Company Asset", "url": "/api/accounts/208", "assignee_ids": [], "position": 1, "default_vat_id": null, "credit_cards": [] }, "debit_account": { "id": 210, "code": "333", "accountable_type": "ExpenseAccount", "name": "Default expense", "url": "/api/accounts/210", "assignee_ids": [], "position": 3, "default_vat_id": null, "deactivated": false, "limit": "" } } ], "trips_on_review": [], "trips_in_draft": [], "trips_in_reviewing": [], "trips_in_unapproved": [], "trips_in_queue": [], "trips_in_accounted": [], "daily_allowances_on_review": [], "daily_allowances_in_draft": [], "daily_allowances_in_reviewing": [], "daily_allowances_in_unapproved": [], "daily_allowances_in_queue": [], "daily_allowances_in_accounted": [], "rewards_on_review": [], "rewards_in_draft": [], "rewards_in_reviewing": [], "rewards_in_unapproved": [], "rewards_in_queue": [], "rewards_in_accounted": [], "accounts": [ { "id": 208, "code": "222", "accountable_type": "AssetAccount", "name": "Company Asset", "url": "/api/accounts/208", "assignee_ids": [], "position": 1, "default_vat_id": null, "deactivated": false, "limit": "", "show_participants_field": "", "conditional_fields_description": "", "credit_cards": [] }, { "id": 209, "code": "111", "accountable_type": "AssetAccount", "name": "Personal Asset", "url": "/api/accounts/209", "assignee_ids": [], "position": 2, "default_vat_id": null, "deactivated": false, "limit": "", "show_participants_field": "", "conditional_fields_description": "", "credit_cards": [] }, { "id": 210, "code": "333", "accountable_type": "ExpenseAccount", "name": "Default expense", "url": "/api/accounts/210", "assignee_ids": [], "position": 3, "default_vat_id": null, "deactivated": false, "limit": "", "show_participants_field": "", "conditional_fields_description": "", "conditional_fields": [] } ], "allowance_countries": [ { "id": 1, "name": "Ukraine", "country": { "id": 1, "name": "Finland", "currency": "EUR", "created_at": "2017-09-06T11:51:21.283Z", "updated_at": "2021-01-15T18:09:35.537Z", "code": "FI" }, "currency_symbol": "€" }, { "id": 2, "name": "Sweden", "country": { "id": 1, "name": "Finland", "currency": "EUR", "created_at": "2017-09-06T11:51:21.283Z", "updated_at": "2021-01-15T18:09:35.537Z", "code": "FI" }, "currency_symbol": "€" }, { "id": 3, "name": "Finland", "country": { "id": 1, "name": "Finland", "currency": "EUR", "created_at": "2017-09-06T11:51:21.283Z", "updated_at": "2021-01-15T18:09:35.537Z", "code": "FI" }, "currency_symbol": "€" } ], "vats": [ { "id": 1, "title": "0% ALV", "value": "0.0" }, { "id": 2, "title": "10% ALV", "value": "0.1" }, { "id": 3, "title": "14% ALV", "value": "0.14" }, { "id": 4, "title": "24% ALV", "value": "0.24" } ], "vehicles": [ { "id": 1, "name": "Auto", "country": { "id": 1, "name": "Finland", "currency": "EUR", "created_at": "2017-09-06T11:51:21.283Z", "updated_at": "2021-01-15T18:09:35.537Z", "code": "FI" }, "years": [ { "id": 1, "year": 2017, "cost_cents": "300.0", "additional_passenger_cents": "0.0" }, { "id": 2, "year": 2018, "cost_cents": "350.0", "additional_passenger_cents": "0.0" }, { "id": 10, "year": 2019, "cost_cents": "350.0", "additional_passenger_cents": "0.0" }, { "id": 20, "year": 2020, "cost_cents": "400.0", "additional_passenger_cents": "0.0" }, { "id": 31, "year": 2021, "cost_cents": "400.0", "additional_passenger_cents": "0.0" } ] }, { "id": 2, "name": "Bicicletta", "country": { "id": 1, "name": "Finland", "currency": "EUR", "created_at": "2017-09-06T11:51:21.283Z", "updated_at": "2021-01-15T18:09:35.537Z", "code": "FI" }, "years": [ { "id": 3, "year": 2017, "cost_cents": "100.0", "additional_passenger_cents": "0.0" }, { "id": 6, "year": 2018, "cost_cents": "110.0", "additional_passenger_cents": "0.0" }, { "id": 11, "year": 2019, "cost_cents": "110.0", "additional_passenger_cents": "0.0" }, { "id": 21, "year": 2020, "cost_cents": "110.0", "additional_passenger_cents": "0.0" }, { "id": 32, "year": 2021, "cost_cents": "110.0", "additional_passenger_cents": "0.0" } ] }, { "id": 6, "name": "Finnish Auto", "country": { "id": 1, "name": "Finland", "currency": "EUR", "created_at": "2017-09-06T11:51:21.283Z", "updated_at": "2021-01-15T18:09:35.537Z", "code": "FI" }, "years": [ { "id": 15, "year": 2019, "cost_cents": "430.0", "additional_passenger_cents": "0.0" }, { "id": 25, "year": 2020, "cost_cents": "430.0", "additional_passenger_cents": "0.0" }, { "id": 36, "year": 2021, "cost_cents": "430.0", "additional_passenger_cents": "0.0" } ] }, { "id": 9, "name": "Autolla (0.43 EUR/km)", "country": { "id": 1, "name": "Finland", "currency": "EUR", "created_at": "2017-09-06T11:51:21.283Z", "updated_at": "2021-01-15T18:09:35.537Z", "code": "FI" }, "years": [ { "id": 18, "year": 2019, "cost_cents": "43.0", "additional_passenger_cents": "0.0" }, { "id": 28, "year": 2020, "cost_cents": "43.0", "additional_passenger_cents": "0.0" }, { "id": 30, "year": 2021, "cost_cents": "45.0", "additional_passenger_cents": "1.0" } ] } ], "currencies": [ { "symbol": "€", "code": "EUR", "symbol_with_code": "€ (EUR)", "code_with_name": "EUR, Euro" }, { "symbol": "$", "code": "USD", "symbol_with_code": "$ (USD)", "code_with_name": "USD, US Dollar" }, { "symbol": "¥", "code": "JPY", "symbol_with_code": "¥ (JPY)", "code_with_name": "JPY, Japanese Yen" }, { "symbol": "£", "code": "GBP", "symbol_with_code": "£ (GBP)", "code_with_name": "GBP, Pound Sterling" }, { "symbol": "kr", "code": "SEK", "symbol_with_code": "kr (SEK)", "code_with_name": "SEK, Swedish Krona" }, { "symbol": "kr", "code": "NOK", "symbol_with_code": "kr (NOK)", "code_with_name": "NOK, Norwegian Krone" }, { "symbol": "kr.", "code": "DKK", "symbol_with_code": "kr. (DKK)", "code_with_name": "DKK, Danish Crown" }, { "symbol": "CHF", "code": "CHF", "symbol_with_code": "CHF (CHF)", "code_with_name": "CHF, Swiss Franc" }, { "symbol": "Lt", "code": "LTL", "symbol_with_code": "Lt (LTL)", "code_with_name": "LTL, Lithuanian Litas" }, { "symbol": "$", "code": "CAD", "symbol_with_code": "$ (CAD)", "code_with_name": "CAD, Canadian Dollar" }, { "symbol": "$", "code": "HKD", "symbol_with_code": "$ (HKD)", "code_with_name": "HKD, Hongkong Dollar" }, { "symbol": "$", "code": "AUD", "symbol_with_code": "$ (AUD)", "code_with_name": "AUD, Australian Dollar" }, { "symbol": "$", "code": "NZD", "symbol_with_code": "$ (NZD)", "code_with_name": "NZD, New Zealand Dollar" }, { "symbol": "R", "code": "ZAR", "symbol_with_code": "R (ZAR)", "code_with_name": "ZAR, South African Rand" }, { "symbol": "ر.س", "code": "SAR", "symbol_with_code": "ر.س (SAR)", "code_with_name": "SAR, Saudi Arabian Riyal" }, { "symbol": "د.م.", "code": "MAD", "symbol_with_code": "د.م. (MAD)", "code_with_name": "MAD, Morocco Dirham" }, { "symbol": "د.ك", "code": "KWD", "symbol_with_code": "د.ك (KWD)", "code_with_name": "KWD, Kuwaiti Dinar" }, { "symbol": "د.إ", "code": "AED", "symbol_with_code": "د.إ (AED)", "code_with_name": "AED, United Arab Emirates Dirham" }, { "symbol": "$", "code": "SGD", "symbol_with_code": "$ (SGD)", "code_with_name": "SGD, Singapore Dollar" }, { "symbol": "RM", "code": "MYR", "symbol_with_code": "RM (MYR)", "code_with_name": "MYR, Malaysian Ringgit" }, { "symbol": "₹", "code": "INR", "symbol_with_code": "₹ (INR)", "code_with_name": "INR, Indian Rupee" }, { "symbol": "₽", "code": "RUB", "symbol_with_code": "₽ (RUB)", "code_with_name": "RUB, Russian Rouble" }, { "symbol": "Kč", "code": "CZK", "symbol_with_code": "Kč (CZK)", "code_with_name": "CZK, Czech Koruna" }, { "symbol": "zł", "code": "PLN", "symbol_with_code": "zł (PLN)", "code_with_name": "PLN, Polish Zloty" }, { "symbol": "Ft", "code": "HUF", "symbol_with_code": "Ft (HUF)", "code_with_name": "HUF, Hungarian Forint" }, { "symbol": "฿", "code": "THB", "symbol_with_code": "฿ (THB)", "code_with_name": "THB, Thailand Baht" }, { "symbol": "₩", "code": "KRW", "symbol_with_code": "₩ (KRW)", "code_with_name": "KRW, Korean won republic" }, { "symbol": "د.ت", "code": "TND", "symbol_with_code": "د.ت (TND)", "code_with_name": "TND, Tunisian Dinar" }, { "symbol": "лв.", "code": "BGN", "symbol_with_code": "лв. (BGN)", "code_with_name": "BGN, Bulgarian Lev" }, { "symbol": "R$", "code": "BRL", "symbol_with_code": "R$ (BRL)", "code_with_name": "BRL, Brazilian Real" }, { "symbol": "¥", "code": "CNY", "symbol_with_code": "¥ (CNY)", "code_with_name": "CNY, Chinese Renminbi" }, { "symbol": "kn", "code": "HRK", "symbol_with_code": "kn (HRK)", "code_with_name": "HRK, Croatian Kuna" }, { "symbol": "₪", "code": "ILS", "symbol_with_code": "₪ (ILS)", "code_with_name": "ILS, Israeli Sheqel" }, { "symbol": "$", "code": "MXN", "symbol_with_code": "$ (MXN)", "code_with_name": "MXN, Mexican Peso" }, { "symbol": "Lei", "code": "RON", "symbol_with_code": "Lei (RON)", "code_with_name": "RON, Romanian Leu" }, { "symbol": "РСД", "code": "RSD", "symbol_with_code": "РСД (RSD)", "code_with_name": "RSD, Serbia Dinar" }, { "symbol": "₺", "code": "TRY", "symbol_with_code": "₺ (TRY)", "code_with_name": "TRY, Turkish Lira" }, { "symbol": "₸", "code": "KZT", "symbol_with_code": "₸ (KZT)", "code_with_name": "KZT, Kazakstan Tenge" } ], "user": { "id": 1, "name": "HackH", "email": "buru@hack.com", "ssn": "120464-126J", "last_sign_in_at": "2021-05-19T14:30:19.863Z", "sign_in_count": 394, "roles": [ "manager", "employee" ], "forward_email_address": "0a75abc7-e2e6-4ea4-bd94-7797ae8783e1@0.0.0.0", "send_reminder_emails": true, "iban": "FI2112345600000785", "bic": "NDEAFIHH", "locale": "en", "state": "accepted", "memberships": 17, "show_optional_fields": true, "last_description": "another personal asset", "country_id": 3, "unconfirmed_email": null, "external_id": null, "settings": { "id": 299, "user_id": 1, "company_id": 17, "default_asset_account_id": null, "default_expense_account_id": null, "normalized_default_cost_centers": null, "mileage_vehicle_category_id": null, "allowance_country_category_id": null }, "companies_to_switch": [ { "id": 21, "name": "\"Create new company\" test", "send_data_to_incomes_register": true, "show_reward_form": false }, { "id": 2, "name": "AltCorp", "send_data_to_incomes_register": true, "show_reward_form": true }, { "id": 1, "name": "BuruCorp", "send_data_to_incomes_register": true, "show_reward_form": true }, { "id": 3, "name": "Cost Centers Co", "send_data_to_incomes_register": true, "show_reward_form": true }, { "id": 22, "name": "Digia ERP", "send_data_to_incomes_register": true, "show_reward_form": true }, { "id": 14, "name": "Foreign Country Corp", "send_data_to_incomes_register": true, "show_reward_form": true }, { "id": 19, "name": "Japanese Zaibatsu", "send_data_to_incomes_register": true, "show_reward_form": false }, { "id": 6, "name": "NeoCorp1", "send_data_to_incomes_register": true, "show_reward_form": true }, { "id": 8, "name": "NeoCorp3", "send_data_to_incomes_register": true, "show_reward_form": true }, { "id": 9, "name": "Procountor Corp", "send_data_to_incomes_register": true, "show_reward_form": true }, { "id": 20, "name": "Reward Corp", "send_data_to_incomes_register": true, "show_reward_form": true }, { "id": 11, "name": "Swedish Corp", "send_data_to_incomes_register": false, "show_reward_form": true }, { "id": 16, "name": "Swiss Company", "send_data_to_incomes_register": false, "show_reward_form": true }, { "id": 12, "name": "US Division", "send_data_to_incomes_register": false, "show_reward_form": true }, { "id": 25, "name": "gggfff", "send_data_to_incomes_register": true, "show_reward_form": false }, { "id": 10, "name": "Рога и Копыта лтд.", "send_data_to_incomes_register": true, "show_reward_form": true } ], "company": { "id": 17, "name": "Spreadsheet Corp", "send_data_to_incomes_register": true, "show_reward_form": true }, "current_tax_card": { "id": 38, "user_id": 1, "image": { "url": "http://thinkpad.local:9000/rcam-test/tax_card/1/07ae8fca-3a94-4e4e-ae20-2cefefa6c4f7.png/07ae8fca-3a94-4e4e-ae20-2cefefa6c4f7.png" }, "tax_percentage": "0.27", "is_current": true }, "approvers": [], "country": { "id": 3, "name": "Sweden", "currency": "SEK", "currency_symbol": "kr" } }, "company": { "id": 17, "name": "Spreadsheet Corp", "business_id": null, "created_at": "2019-09-10T09:42:38.569Z", "schedule": "weekly", "accountant_email": null, "is_vat_registered": true, "send_receipts_weekdays": [ null ], "time_to_scheduled_batch_run": { "seconds": 34, "negative": false, "total": 359674, "weeks": 0, "days": 4, "hours": 3, "minutes": 54 }, "format_time_to_scheduled_batch_run": "4 days", "iban": null, "mileage_vehicle_category_id": 1, "allowance_country_category_id": 1, "bic": null, "billing_number": null, "software": "spreadsheet", "einvoice_address": null, "allowance_account_code": "7880", "mileage_account_code": "7870", "default_approver_id": null, "policy_en": "", "policy_fi": "", "policy_sv": "", "locale": "fi", "reimbursement_account_id": null, "show_trip_form": true, "show_daily_allowance_form": true, "show_reward_form": true, "show_optional_fields": true, "employees_see_all_users": false, "ssn_visible_on_forms_and_export": false, "allowance_abroad_account_code": "7880", "country_id": 1, "activate_default_receipts_filter": false, "integration_id": 19, "is_nonprofit": false, "send_data_to_incomes_register": true, "notify_users_about_payments": false, "count_additional_passengers": true, "show_change_approval_cycle": true, "external_id": null, "missing_receipts_weekly_reminder": false, "missing_receipts_daily_reminder": false, "user_request_recipients": null, "contact_person_for_invoicing": null, "country": { "id": 1, "name": "Finland", "currency": "EUR", "currency_symbol": "€" } } }