Skip to main content
Source controllers: apps/erp-backend/src/report/report.controller.ts and apps/erp-backend/src/ledger-core/ledger/ledger.controller.ts
The Reports API surfaces financial and operational read models for a single entity. All endpoints are GET only. Pass the entity id as a UUID path parameter. Responses are bare JSON with no wrapper. Paginated endpoints return { rows, nextCursor }.

Entity reports

Base path: GET /api/entities/:entityId/reports

Home dashboard

GET /api/entities/:entityId/reports/home Returns the home dashboard snapshot: cash position, daily balances for the last 60 days, monthly income for the last 6 months, receivables/payables open positions, and unbooked invoice counts. Response: homeReportSchema

Balance sheet

GET /api/entities/:entityId/reports/balance-sheet Returns the balance sheet for the requested exercise period. Query params (from balanceSheetQuerySchema) Response: balanceSheetReportSchema

Income statement

GET /api/entities/:entityId/reports/income-statement Returns the income statement for the requested date range. Query params (from incomeStatementQuerySchema) Response: incomeStatementReportSchema

Income statement by dimension

GET /api/entities/:entityId/reports/income-statement-by-dimension Returns the income statement broken down by the values of a single dimension (for example, a cost center). Query params (from incomeStatementByDimensionQuerySchema) Response: incomeStatementByDimensionReportSchema

Journal report

GET /api/entities/:entityId/reports/journal Returns a paginated journal of ledger entry lines in chronological order. Each row contains the line, its parent entry, and the account it posts to. Query params (from journalReportQuerySchema) Response: journalReportPageSchema (paginated: { rows, nextCursor })

Revenue realization

GET /api/entities/:entityId/reports/revenue-realization Returns a revenue realization report for the requested period, showing recognized revenue, collected amounts, billed outstanding, and monthly breakdowns. Query params (from revenueRealizationQuerySchema) Response: revenueRealizationReportSchema

Ledger reports

Base path: GET /api/entities/:entityId/ledger

Eight-column balance

GET /api/entities/:entityId/ledger/reports/eight-column-balance Returns the classic eight-column trial balance: debit, credit, debtor balance, creditor balance, asset, liability, loss, and profit per account. Query params (from eightColumnBalanceQuerySchema) Response: eightColumnBalanceReportSchema

General ledger

GET /api/entities/:entityId/ledger/general-ledger Returns a paginated walk of one ledger account in ledger order, with a running balance from inception. Query params (from generalLedgerQuerySchema) Response: generalLedgerPageSchema (paginated: { lines, nextCursor, openingBalance, closingBalance, lineCount })

Partner ledger

GET /api/entities/:entityId/ledger/partner-ledger Returns the partner ledger for an open-item account, grouped by partner with opening/closing balances and line-level detail. Query params (from partnerLedgerQuerySchema) Response: partnerLedgerReportSchema

Status codes

Unverified: the exact field-level error messages for presentation currency / rate mismatches are defined in the Zod refinements of @sintropix/api-contract. Refer to the contract package for the precise schema shapes.