CloseCore
Back to blog
ERP Integrations

How to Use the Business Central API to Speed Up Month-End Close

Pull a trial balance with the built-in Business Central API, trace changes to posted ledger entries, and see what an extension adds for month-end close.

Albert Lo
Albert Lo
August 21, 2026•5 min read

If you export a trial balance from Business Central on Monday and someone posts a late adjustment on Tuesday, the workpaper your reviewer opens on Wednesday can show a stale balance. Because of this, you may need to pull a trial balance every day and run your comparisons again each day.

Fortunately, with just a little bit of software code, you can refresh the trial balance automatically and even on demand to ensure that you're always comparing the latest general ledger balances with your reconciliation workpapers. The Business Central API lets you refresh the trial balance for any company and period.

Start with the trial balance to check balances across accounts. Then drill down to the transactions: pull the posted general ledger entries behind any amount that needs an explanation. Together, those two checks help you catch changes and document the supporting detail for review.

Fetch a trial balance with the Business Central API

This example pulls August 2026 for one company in Business Central Online. Send an OAuth bearer token with each request. Microsoft’s authentication setup

  1. Find the company ID. In Postman, set your base URL to https://api.businesscentral.dynamics.com/v2.0/{tenantId}/{environment}/api/v2.0. Replace the placeholders with your tenant ID and environment name. Send a GET request to the base URL plus /companies, and copy the id for the company you want to close.
  2. Request the trial balance. Send a GET request to the same base URL plus /companies({companyId})/trialBalances, substituting the ID you copied. In Postman’s Params tab, add a key named $filter with the value dateFilter ge 2026-08-01 and dateFilter le 2026-08-31. If the response includes @odata.nextLink, follow it until you have all the rows. Microsoft’s trial balance request reference
  3. Read the amounts. Use totalDebit minus totalCredit for August’s net activity (i.e. for income statement accounts). Use balanceAtDateDebit minus balanceAtDateCredit for the balance at August 31 (i.e. for balance sheet accounts). The API returns amounts as text, so convert them to numbers using the response’s number format. Trial balance fields
  4. Check: compare the results with Business Central. Run the Business Central Trial Balance report for the same company, date range, accounts, and currency basis, and compare them with the API results. Business Central Trial Balance report
August 2026 trial balance response for account 50110, Cost of Materials, showing debits of 1,493,924.93 and credits of 8,484.57.

Pull the entries behind a balance

Now that you have pulled a trial balance, it's time to dig into the entries responsible for the balance.

The built-in v2.0 generalLedgerEntries resource returns posted G/L entries for one company, including posting date, account number, document number and type, description, debit and credit amounts, and the last modification timestamp. The related dimensionSetLines show the dimensions assigned to each entry. Microsoft’s G/L entry resource reference

To see what changed in account 50110 in August, send a GET request to the base URL plus /companies({companyId})/generalLedgerEntries. Set $filter to postingDate ge 2026-08-01 and postingDate le 2026-08-31 and accountId eq {accountId}, using the accountId for account 50110 from the trial balance result. Follow @odata.nextLink to get all the entries. Subtract total credits (creditAmount) from total debits (debitAmount) and compare the result with August’s net activity in the trial balance. For a balance sheet account, add that activity to the opening balance to check the month-end balance.

Six of 536 August 2026 ledger entries for Cost of Materials, with dates, document numbers, debits, credits, and departments.

For a department breakdown, add $expand=dimensionSetLines and use the dimension codes defined for that company. Include entries without a department so the breakdown adds up to the account total.

Where the built-in API falls short

The standard v2.0 generalLedger resource doesn't include source vendor or customer, external document number, creation and posting-user information, or reversal relationships.

A vendor name helps explain a professional-fees variance. An external invoice reference helps locate the supporting document. A reversal link shows which original entry a reversal belongs to.

The CloseCore extension for Business Central

We built the CloseCore extension because an account amount and a document number usually don't give the preparer enough context to investigate an exception.

In Business Central, developers expose additional fields through a new API page or query in an AL extension. The enriched G/L entries are available at api/closecore/accounting/v1.0/companies({companyId})/generalLedgerEntries within the same tenant and environment. Microsoft’s API development guide

The extension exposes enriched posted G/L entries, account classifications, and dimension information. Related APIs provide vendor and customer ledger entries, payment-application detail, bank entries, and inventory valuation relationships.

Combine the enhanced data returned by the extension with CloseCore's Auto Export and add-in for Excel to reduce time spent manually performing exports from Business Central into your workbooks.

A brief technical note: Microsoft’s analytics API for Power BI does include vendor and customer numbers and dimensions on G/L entries. But if anyone sets a date range on the Power BI Reports Setup page, its G/L queries return that range instead of the dates you request in an API request, which makes it unreliable as an API. Microsoft’s G/L entry query

Beyond the trial balance: Retrieve multi-dimensional balances for reporting

The extension’s glAccountBalances endpoint adds up entries with the same account and the same set of dimensions. (Business Central gives each combination a number called the dimension set ID.) Filter by posting date to get monthly totals you can use in a report by department or location.

August totals for account 50110 with dimension set 9 highlighted. Set 9 combines Department Sales, Customer Group Medium Business, Area America North, and Salesperson Jim Olive.

The latest extension version supports Account, Account Type, Subsidiary, and mapped Department, Class, and Location groupings.

Use cases for the Business Central extension

Two recent conversations with Business Central finance teams illustrated the flexible uses for the CloseCore extension for Business Central. One team described the repeated manual effort of uploading trial balances while keeping workpapers in SharePoint and Excel.

Another team, managing many entities in one Business Central instance, already had an automated process to dump the trial balance from Business Central into OneDrive for reconciliations. For variance reporting, they wanted a breakdown by department and details about the vendors and customers behind the entries. Example: professional fees jump $24,000 in a month; the department breakdown shows Operations drove $20,000 of it, and the vendor name and invoice reference on the enriched general ledger entries lead directly to the consulting invoice behind it.

Connect the data to reconciliation and review

CloseCore uses the Business Central connection to bring balances and transaction detail into reconciliation and reporting work. A preparer can investigate the entries behind a balance, keep the supporting workpaper with the reconciliation, and tie out the workpaper to the balance, all directly from one place.

The extension's read-only APIs are free for an authorized Business Central application to use without a platform subscription. Business Central integration guide

For teams working in spreadsheets, the Excel add-in brings ERP data to the workbook in just a few clicks. help the team identify movements and drill into their causes. See how these workflows fit into the close process in our guide to close management software.