Expenses
Retrieve expenses
General
Server Side SDKs
Core API
- Companies
- Invite Links
- Integrations
- Sync
- Jobs
- Passthrough
Unified API
- Accounting
- Accounts
- Bank Accounts
- Bank Transactions
- Bills
- Bill Payments
- Bill Credit Notes
- Contacts
- Company Info
- Currencies
- Documents
- Expenses
- Invoice Credit Notes
- Invoices
- Invoice Payments
- Items
- Journal Entries
- Purchase Orders
- Sales Orders
- Goods Receipt Notes
- Projects
- Tax Rates
- Tracking Categories
- Balance Sheet
- Cash Flow Statements
- Income Statements
Expenses
Retrieve expenses
Retrieve expenses from the database based on the ID
POST
/
accounting
/
expenses
/
all
curl --request POST \
--url https://api.rootfi.dev/accounting/expenses/all \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '{
"take": 10,
"skip": 0,
"orderBy": {
"document_number": "asc"
},
"filter": {
"account_id": {
"eq": "3770712000000076064"
}
}
}'
{
"data": {
"data": [
{
"rootfi_id": 1234,
"rootfi_company_id": 123456,
"rootfi_organisation_id": 1,
"rootfi_integration_type": "MEKARI_JURNAL",
"rootfi_updated_at": "2021-09-28T15:00:00.000Z",
"rootfi_created_at": "2021-09-28T15:00:00.000Z",
"platform_id": "3770712000001676061",
"account_id": "3770712000000076064",
"contact_id": "3770712000000418001",
"currency_id": null,
"document_number": "A-001",
"payment_mode": "CASH",
"posted_date": "2023-06-03T00:00:00.000Z",
"memo": "Test Invoice",
"tax_amount": 0,
"currency_rate": 1,
"total_amount": 40,
"sub_total": 40,
"updated_at": "2023-11-01T00:00:00.000Z",
"currency": {
"data": {
"platform_id": null,
"name": null,
"code": null,
"symbol": null,
"is_base_currency": null,
"exchange_rate": null,
"updated_at": null
}
},
"line_items": {
"data": [
{
"platform_id": "1234567890123456789",
"line_item_type": "BILLS",
"line_item_type_id": "1234567890123456789",
"tracking_category_ids": [],
"item_id": "1234567890123456789",
"tax_id": "1234567890123456789",
"account_id": null,
"description": "Test Item",
"quantity": 1,
"unit_amount": 100,
"total_amount": 100,
"sub_total": null,
"tax_amount": 0,
"total_discount": null,
"updated_at": "2021-09-28T15:00:00.000Z"
}
]
},
"documents": {
"data": [
{
"platform_id": "3770712000000208009_3770712000000085029",
"file_name": "sample_upload.xlsx",
"file_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"file_size": 6019.53125,
"document_type_id": "3770712000000085029",
"document_type": "EXPENSES",
"document_uploaded": false,
"download_link": "https://storage.googleapis.com/rootfi2022.appspot.com/documents/1/1784/ZOHO_BOOKS/3770712000000208009_3770712000000085029.xlsx?GoogleAccessId=97295109335-compute%40developer.gserviceaccount.com&Expires=1698833890&Signature=M3Qv12jN6HUSNTeXlmN0nXV8PaKVKB5KM8PteIT9OUmfq%2BIFlFX0bbM0so%2F9MxX5etUivaaF%2BpCdPg3aTwr%2BiII0Vi2KS8A%2FiUX1JbWshnIZcusoqOdXT3Plnzye4gHPOkkbU7euvfwlxKNkdNrYIXyiCW531tg8D7XBwksAXyYkhZzydxUE7ehHbmIosOwv7FsLihs6m7jO36QDl%2BDf7v05%2FBA%2FHGkbRYyeykf%2BM0qG1uGdUzPqLtX5Dk%2FM8oKApt0TUb6qxdUq%2BEIX%2FNCdO%2FMC3zZ9UJ7bAtOTpWaBBwZV8QPm%2FexYx0D61%2FHth1saawn5KmMlKNQQVvGYBWbhtg%3D%3D&response-content-disposition=filename%3D%22sample_upload.xlsx%22",
"updated_at": null
}
]
}
}
],
"total_count": 0
},
"request_timestamp": "2021-09-28T15:00:00.000Z",
"response_timestamp": "2021-09-28T15:00:00.000Z",
"request_id": "7a1c0e42-9f85-4d6e-bb5d-358a72913c0b"
}
Expenses are Payment made by a business at the time of purchase (ex. a credit card payment)
curl --request POST \
--url https://api.rootfi.dev/accounting/expenses/all \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '{
"take": 10,
"skip": 0,
"orderBy": {
"document_number": "asc"
},
"filter": {
"account_id": {
"eq": "3770712000000076064"
}
}
}'
Authorizations
Body
application/json
Response
200 - application/json
The response is of type object
.
curl --request POST \
--url https://api.rootfi.dev/accounting/expenses/all \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '{
"take": 10,
"skip": 0,
"orderBy": {
"document_number": "asc"
},
"filter": {
"account_id": {
"eq": "3770712000000076064"
}
}
}'
{
"data": {
"data": [
{
"rootfi_id": 1234,
"rootfi_company_id": 123456,
"rootfi_organisation_id": 1,
"rootfi_integration_type": "MEKARI_JURNAL",
"rootfi_updated_at": "2021-09-28T15:00:00.000Z",
"rootfi_created_at": "2021-09-28T15:00:00.000Z",
"platform_id": "3770712000001676061",
"account_id": "3770712000000076064",
"contact_id": "3770712000000418001",
"currency_id": null,
"document_number": "A-001",
"payment_mode": "CASH",
"posted_date": "2023-06-03T00:00:00.000Z",
"memo": "Test Invoice",
"tax_amount": 0,
"currency_rate": 1,
"total_amount": 40,
"sub_total": 40,
"updated_at": "2023-11-01T00:00:00.000Z",
"currency": {
"data": {
"platform_id": null,
"name": null,
"code": null,
"symbol": null,
"is_base_currency": null,
"exchange_rate": null,
"updated_at": null
}
},
"line_items": {
"data": [
{
"platform_id": "1234567890123456789",
"line_item_type": "BILLS",
"line_item_type_id": "1234567890123456789",
"tracking_category_ids": [],
"item_id": "1234567890123456789",
"tax_id": "1234567890123456789",
"account_id": null,
"description": "Test Item",
"quantity": 1,
"unit_amount": 100,
"total_amount": 100,
"sub_total": null,
"tax_amount": 0,
"total_discount": null,
"updated_at": "2021-09-28T15:00:00.000Z"
}
]
},
"documents": {
"data": [
{
"platform_id": "3770712000000208009_3770712000000085029",
"file_name": "sample_upload.xlsx",
"file_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"file_size": 6019.53125,
"document_type_id": "3770712000000085029",
"document_type": "EXPENSES",
"document_uploaded": false,
"download_link": "https://storage.googleapis.com/rootfi2022.appspot.com/documents/1/1784/ZOHO_BOOKS/3770712000000208009_3770712000000085029.xlsx?GoogleAccessId=97295109335-compute%40developer.gserviceaccount.com&Expires=1698833890&Signature=M3Qv12jN6HUSNTeXlmN0nXV8PaKVKB5KM8PteIT9OUmfq%2BIFlFX0bbM0so%2F9MxX5etUivaaF%2BpCdPg3aTwr%2BiII0Vi2KS8A%2FiUX1JbWshnIZcusoqOdXT3Plnzye4gHPOkkbU7euvfwlxKNkdNrYIXyiCW531tg8D7XBwksAXyYkhZzydxUE7ehHbmIosOwv7FsLihs6m7jO36QDl%2BDf7v05%2FBA%2FHGkbRYyeykf%2BM0qG1uGdUzPqLtX5Dk%2FM8oKApt0TUb6qxdUq%2BEIX%2FNCdO%2FMC3zZ9UJ7bAtOTpWaBBwZV8QPm%2FexYx0D61%2FHth1saawn5KmMlKNQQVvGYBWbhtg%3D%3D&response-content-disposition=filename%3D%22sample_upload.xlsx%22",
"updated_at": null
}
]
}
}
],
"total_count": 0
},
"request_timestamp": "2021-09-28T15:00:00.000Z",
"response_timestamp": "2021-09-28T15:00:00.000Z",
"request_id": "7a1c0e42-9f85-4d6e-bb5d-358a72913c0b"
}