Map opening balance accounts
PATCH
https://app.speybooks.com/api/v1/opening-balances/{id}/mapUpdate account mappings for unmapped or incorrectly mapped rows. Accepts an array of source label → target account ID overrides and an optional cutover date. Re-runs the OBCE engine and returns a full updated preview with lines, mappings, unmapped, balanceProof, errors, and canConfirm.
Use this endpoint after reviewing the auto-mapped results from upload to correct any mismatches before confirming. The response is the complete preview — there is no need for a subsequent GET call after remapping.
Path parameters
id string requiredData import ID (e.g. dimp_2). Must be in pending status.
Body parameters
cutoverDate string optionalOptional cutover date override (YYYY-MM-DD).
mappings array<object> optionalSource label to target account ID overrides.
Show child parameters
sourceLabel string requiredAccount label from the CSV (e.g. "Office Equipment").
targetAccountId string requiredTarget account ID (e.g. acc_1030).
Response
200 Mappings updated, OBCE re-run. Returns full preview with lines, balance proof, and canConfirm.
Show response fields
balanceProof objectShow child attributes
balanced booleandelta stringroundingAmount stringroundingInjected booleantotalCredit stringtotalDebit stringcanConfirm booleancutoverDate stringerrors array<object>importId stringlines array<object>Show child attributes
accountCode stringaccountId stringaccountName stringaccountType stringcredit stringdebit stringisRounding booleansourceLabel stringmappings array<object>Show child attributes
confidence integermethod stringsourceLabel stringtargetAccountId stringtargetCode stringtargetName stringtargetType stringstats objectShow child attributes
errorRows integerignoredRows integertotalRows integervalidRows integerunmapped array<object>Error codes
404 Pending opening balance import not found.