1

Authorize end user

Your customer must first authorize your application to access their accounting service (e.g., Xero, Lexware Office, Sevdesk) via the respective authentication mechanism (e.g., OAuth2, API key) through maesn Connect.

2

Compile chart of accounts

Implement the following logic in your application to retrieve customers’ account data:

  • Call the GET /accounts endpoint to fetch the accounts from your customer’s accounting system.
  • Use the retrieved data to present your customer’s chart of accounts in your frontend. Use fields such as:
    • classification (e.g., ASSET, EQUITY, EXPENSE, LIABILITY, REVENUE) to group accounts.
    • parentAccount to visualize hierarchical relationships in the customer’s General Ledger (GL).
    • Note: For DATEV integrations, the GET /accounts endpoint only provides account ledger names.
  • Do not forget to call GET /accounts with regular intervals to keep track of any updates to your customer’s chart of accounts.
3

Synchronize contacts (optional)

Follow the steps outlined in the synchronize contacts use case to synchronize suppliers in your system with your customer’s accounting system.

4

Fetch tracking categories

If your customer has classes, locations, or departments configured, you can retrieve them from the accounting service with GET /trackingCategories.

5

Setup categorization rules

Presenting the data retrieved in the previous steps in your frontend, enable your customer to configure rules for categorizing the expenses that will be synchronized to the accounting system. The business logic will depend on your application, but bear in mind that:

  • If your customer only wants to synchronize their expenses against one single GL account, a simple dropdown menu to select the account may be sufficient.
  • Customers may want to categorize expenses based on conditional logic, such as “if Department = IT, use Account A”. This will require more from your UI!
  • You may want to give your customers the possibility to categorize the transaction at the time when they synchronize it to their accounting service, which would imply that no categorization is required in the configuration or that it is possible to override the configuration.
6

Synchronize expenses

Whenever your customer incurs spend-related transactions in your application, e.g., credit card transactions or travel expenses, you can synchronize the transactions to your customer’s Accounting system with the correct classification via the POST /expenses endpoint. It is up to your application whether these transactions should be synchronized automatically or require an end user to manually export the expenses from within your application.

7

Keep your data fresh

After fetching data initially, you should make sure to keep your customer’s data up to date by regularly retrieving data from the maesn API and looking for changes. The lastModified query parameter can be utilized on all our GET endpoints to save you the hassle of creating deltas to detect change. See our guide to keeping data fresh for more information!