> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Prepare trial-balance reporting with Midaz and Reporter

> Use Midaz accounting entries and Reporter templates to build a reporting workflow suited to your institution.

## Scope of this guide

This guide describes a reporting integration pattern. It is not a COSIF mapping specification and does not certify an output for BACEN submission. Define, validate, and approve any regulatory mapping in the controls and processes that own it.

## Use the current Midaz accounting model

For new accounting classifications, use the rubric codes in an OperationRoute's `accountingEntries`.

Midaz keeps the legacy `OperationRoute.code` field for backward compatibility and marks it deprecated. It is an optional external reference. Midaz does not reserve it for COSIF, does not assign it regulatory meaning, and does not write it to operations.

When `accounting.validateRoutes` is enabled on the ledger and a matching rubric resolves, Midaz records the resolved rubric code from `accountingEntries` as `routeCode` on the operation. In other conditions, `routeCode` stays empty. Use `routeCode` when you join report data to classifications. Do not use `code` as the authoritative source for a regulatory mapping.

An OperationRoute can hold accounting entries for the transaction-lifecycle actions `direct`, `hold`, `commit`, `cancel`, and `revert`, plus the supplementary keys `overdraft`, `block`, and `unblock`. Each entry can define debit and credit rubrics with a code and description.

## Build the reporting workflow

1. Define your institution's chart of accounts and the classifications required by the report.
2. Configure OperationRoutes and their accounting entries according to those classifications.
3. Configure a Reporter data source and template for the data available in your environment.
4. Generate the report and validate its content through your accounting and regulatory controls.

Reporter renders template-driven reports from configured data sources. Its supported output formats are HTML, PDF, CSV, XML, and TXT. The chosen format does not, by itself, make a report compliant with a regulatory submission requirement.

## Related documentation

* [OperationRoutes API Reference](/en/reference/products/midaz/v2/create-operation-route)
* [Reporter overview](/en/products/reporter/what-is-reporter)
* [Reporter template reference](/en/products/reporter/template-reference)
