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
idstringPrefixed identifier. Always starts with
dimp_.filenamestringOriginal filename of the uploaded CSV.
totalRowsstringTotal data rows parsed from the CSV.
statusstringImport lifecycle:
pending, completed, or voided.engineVersionstringOBCE engine version used for this import.
createdAtstringISO 8601 timestamp when the import was uploaded.
completedAtstringISO 8601 timestamp when the import was confirmed, or
null if pending.statsstringParsed-row counts (valid, ignored, error) that feed the row-conservation invariant.
cutoverDatestringThe date for the opening balance journal (defaults to last day of previous month).
openingBalanceModestringEither
direct (standard) or clearing (enables outstanding doc imports). Returned by the upload and map preview responses, not by the canonical GET /:id fetch.canConfirmstringWhether the import passes all gates: balance proof, mapping completeness, singleton check.
mappingsstringArray of account mapping objects with 5-tier resolution results.
linesstringArray of preview journal lines (one per mapped account).
balanceProofstringBalance equation validation: total debits must equal total credits.
unmappedstringArray of source labels that could not be auto-mapped to chart of accounts.
errorsstringArray of error strings preventing confirmation.