The Opening Balances object

An opening balance import represents a trial balance CSV processed through the OBCE engine. Each import tracks parsed rows, account mappings, balance proof results, and the final committed journal.

The canonical fetch (GET /opening-balances/:id) nests the persistent record under an import object (id, filename, totalRows, status, engineVersion, createdAt, completedAt) and returns the engine-computed fields (cutoverDate, stats, mappings, unmapped, lines, balanceProof, errors, canConfirm) alongside it. The upload and map responses return a flatter preview shape that additionally echoes openingBalanceMode.

Attributes

idstring
Prefixed identifier. Always starts with dimp_.
filenamestring
Original filename of the uploaded CSV.
totalRowsstring
Total data rows parsed from the CSV.
statusstring
Import lifecycle: pending, completed, or voided.
engineVersionstring
OBCE engine version used for this import.
createdAtstring
ISO 8601 timestamp when the import was uploaded.
completedAtstring
ISO 8601 timestamp when the import was confirmed, or null if pending.
statsstring
Parsed-row counts (valid, ignored, error) that feed the row-conservation invariant.
cutoverDatestring
The date for the opening balance journal (defaults to last day of previous month).
openingBalanceModestring
Either direct (standard) or clearing (enables outstanding doc imports). Returned by the upload and map preview responses, not by the canonical GET /:id fetch.
canConfirmstring
Whether the import passes all gates: balance proof, mapping completeness, singleton check.
mappingsstring
Array of account mapping objects with 5-tier resolution results.
linesstring
Array of preview journal lines (one per mapped account).
balanceProofstring
Balance equation validation: total debits must equal total credits.
unmappedstring
Array of source labels that could not be auto-mapped to chart of accounts.
errorsstring
Array of error strings preventing confirmation.