Financial Data Platform | Modernbanc

Accounting and generating reports

A quick introduction to accounting with Modernbanc. In this example we will fetch the information needed for a balance sheet and income statement.

If you get stuck at any point in the Quickstart, help is just a click away! Join our Slack channel or send us a message to [email protected].

1
Creating Accounts

In Modernbanc, we're going to build a basic ledger system consisting of five primary account categories:

  1. Assets (what your company owns)
  2. Liabilities (what your company owes)
  3. Equity (the owner's or shareholders' investment in the business)
  4. Income (money the company earns)
  5. Expenses (costs incurred by the business)

To keep things organized, we'll assign labels to each account. In this context, a label serves as a tag or a marker that helps us identify to which category each account belongs.

The actions we'll undertake in this step are creating a label and creating an account.

  • Naviate to the Accounts tab in the settings dropdown or press G and then A.
  • Click the Create button in the upper right corner.
  • Fill out the form with the following values:
    • Name: Quickstart - Asset Account.
    • Unit: United States dollar (or the unit of your choice).
  • Add a label to the account
    • Click the label icon.
    • Type out asset and then click the create new item button.
    • Choose a color and the label will be created for you.
  • Click Create on the bottom right of the form.
  • Repeat the above steps to create Quickstart - Liability Account, Quickstart - Equity Account, Quickstart - Income Account, and Quickstart - Expense Account.
  • Don't forget to add the appropriate label to each account.
2
Recording Income

Now that our accounts are set up, let's record income from a sale.

Imagine we're running a business selling lawn mowers, with each one priced at $100.00 USD.

When we sell a lawn mower, we update our accounts:

  • We add $100 to our Assets account, since we now have $100 more in cash from the sale.

  • We put -$100 in our Income account. This might seem unusual, but in accounting, income is stored as a negative number.

  • Naviate to the Transactions tab in the settings dropdown or press G and then T.
  • Click the Create button in the upper right corner.
  • Fill out the form with the following values:
    • Name: Quickstart - Record sale of lawn mower.
    • From: Select our income account.
    • To: Select our asset account.
    • Date: Optionally choose a date and time for the transaction.
    • Status: completed.
    • Amount: 100.00
  • Click Create on the bottom right of the form.
3
Recording Expenses

When we sell a lawn mower, we also want to account for the cost of that lawnmower to us - the inventory expense.

To do this, we make two updates in our system:

  • We add to our Expenses account, reflecting the cost we incurred to provide the lawn mower.
  • We subtract from our Assets account, because the lawn mower - which was an asset - is no longer in our inventory.

Typically, we would have a separate asset account for inventory, but to keep things simple in this guide, we're using one asset account for everything.

  • Navigate to the Transactions tab in the settings dropdown or press G and then T.
  • Click the Create button in the upper right corner.
  • Fill out the form with the following values:
    • Name: Quickstart - Record inventory expense for sale of lawn mower.
    • From: Select our asset account.
    • To: Select our expense account.
    • Date: Optionally choose a date and time for the transaction.
    • Status: completed.
    • Amount: 70.00
  • Click Create on the bottom right of the form.
4
Generating a Balance Sheet

Now that we've made some changes to our assets with a few transactions, it's time to generate a balance sheet.

A balance sheet is a financial report that shows what a company owns (assets), owes (liabilities), and the amount invested by shareholders (equity) at a particular moment in time.

Given our setup, it's quite straightforward to gather this data. We simply send a request to fetch balances for the desired date and time. The response will include all the information we need to compile our balance sheet.

curl --location --request GET 'http://api.modernbanc.com/v1/balances?where={labels:{some:{name:{in:["asset", "liability", "equity"]}}}}&effective_date_time=<BALANCE_SHEET_DATE_TIME>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY_HERE' \
--header 'x-environment: test' \
4
Generating an Income Statement

Now that we've recorded some income and expenses, let's proceed to generate an income statement.

An income statement is a financial report that shows a company's revenues (income), expenses, and profits or losses over a specific period. It helps illustrate the company's financial performance during that time.

With our current setup, gathering this data is straightforward. We just need to know the balances in our income and expense accounts at the start and end of our reporting period. By comparing these balances, we can see the changes over the given period, which will form the basis of our income statement.

Repeat the following request for the DATE_TIME at the start of the reporting period and the end of the reporting period.

curl --location --request GET 'http://api.modernbanc.com/v1/balances?where={labels:{any:{name:{in:["income", "expense"]}}}}&effective_date_time=<DATE_TIME>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY_HERE' \
--header 'x-environment: test' \

Congratulations! You've successfully set up a basic accounting system in Modernbanc! While this system is simple, it provides the foundation upon which you can build a more complex system to meet your organization's needs. With additional features like child accounts and automated workflows, you can further customize and streamline your accounting process. Well done!

Next up: API Basics