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
Retrieve expenses
Retrieve expenses from the database based on the ID
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
asc
, desc
asc
, desc
asc
, desc
asc
, desc
asc
, desc
asc
, desc
asc
, desc
asc
, desc
asc
, desc
asc
, desc
Response
The ID that the accounting platform uses to identify this expense
The unique ID we assign for that data's information
The RootFi designated id for the company
The RootFi designated id for the organisation
The accounting platform from which the data is being retrieved
ZOHO_BOOKS
, QUICKBOOKS_SANDBOX
, QUICKBOOKS
, XERO
, TALLY
, SAGE_CLOUD_ACCOUNTING
, MS_DYNAMICS_365
, SAGE_ZA_CLOUD_ACCOUNTING
, MYOB_BUSINESS
, WAVE
, ODOO_ACCOUNTING
, NETSUITE
, WAFEQ
, MEKARI_JURNAL
, BUSY
, ROOTFI_SANDBOX
, QOYOD
The latest date at which RootFi updated this data
The date at which RootFi first synced this data
Account ID of the expense
Contact ID of the expense
Currency ID of the expense
Reference number for the expense
Payment mode of the expense
Date of creation of the expense
Memo description of the expense
Total tax amount levied on the expense
Rate between the currency of the payment and the base currency
Total value of the expense
Total pre tax value of the expense
The date at which the expense was updated on the accounting platform
The ISO-4217 currency code and related financial details of the transaction or entity
Currency associated with the account.
The ID that the accounting platform uses to identify this currency
The name of the currency
The code of the currency
The symbol of the currency
Is this the base currency of the organisation?
The exchange rate of the currency
The last ISO 8601 timestamp that the data was updated at
Array of Expense Line items associated with the expense
The item id of the line item
The tax id of the line item
The quantity of the line item
The unit amount of the line item
The platform id of the line item
The line item type of the line item
BILLS
, INVOICES
, BILL_CREDIT_NOTES
, INVOICE_CREDIT_NOTES
, EXPENSES
, PURCHASE_ORDERS
, SALES_ORDERS
The line item type id of the line item
The tracking category ids of the line item
The account id of the line item
The description of the line item
The total amount of the line item
The sub total of the line item
The tax amount of the line item
The total discount of the line item
The last ISO 8601 timestamp that the data was updated at
Array or collection of documents associated with the transaction or entity, often containing additional details or proofs
The ID that the accounting platform uses to identify this document
The ID that the accounting platform uses to identify this document type
The name of the file
The type of file
The size of the file
The type of document
The date the document was uploaded
The link to download the document
The date the document was last updated
The total count of the accounts
The time at which the request was received by the server
The time at which the response was sent by the server
The unique ID of the request
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"
}