Map opening balance accounts

PATCHhttps://app.speybooks.com/api/v1/opening-balances/{id}/map

Update account mappings for unmapped or incorrectly mapped rows. Accepts an array of source label to 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, so there is no need for a subsequent GET call after remapping.

Path parameters

idstringrequired
Data import ID (e.g. dimp_2). Must be in pending status.

Body parameters

cutoverDatestringoptional
Optional cutover date override (YYYY-MM-DD).
date
mappingsarray<object>optional
Source label to target account ID overrides.
Show child parameters
sourceLabelstringrequired
Account label from the CSV (e.g. "Office Equipment").
targetAccountIdstringrequired
Target account ID (e.g. acc_1030).

Response

200Mappings updated, OBCE re-run. Returns full preview with lines, balance proof, and canConfirm.
Show response fields
balanceProofobject
Show child attributes
balancedboolean
deltastring
roundingAmountstring
roundingInjectedboolean
totalCreditstring
totalDebitstring
canConfirmboolean
cutoverDatestring
errorsarray<object>
importIdstring
linesarray<object>
Show child attributes
accountCodestring
accountIdstring
accountNamestring
accountTypestring
creditstring
debitstring
isRoundingboolean
sourceLabelstring
mappingsarray<object>
Show child attributes
confidenceinteger
methodstring
sourceLabelstring
targetAccountIdstring
targetCodestring
targetNamestring
targetTypestring
openingBalanceModestring
statsobject
Show child attributes
errorRowsinteger
ignoredRowsinteger
totalRowsinteger
validRowsinteger
unmappedarray<object>

Error codes

404Pending opening balance import not found.