Execute migration
https://app.speybooks.com/api/v1/migration/{id}/executeFinalise a validated migration and seal it. This operation is irreversible.
Execute does not import the data. The standalone imports
(contacts, opening balance, invoices, bills) have already
been written when they were confirmed in the earlier steps.
Execute takes an organisation-level lock to prevent
concurrent finalisation, re-runs the gate checks, runs the
final balance checks (the clearing accounts net to zero and
the ledger conserves), builds the reconciliation proof, and
seals the migration as completed with that proof and a
completion timestamp. Sealing is terminal.
The migration must be in ready_to_execute; call
/validate first.
If the migration is already completed, the existing
reconciliation proof is returned without re-sealing, so the
call is safe to retry on a network failure.
On a gate or balance failure the migration is returned to
ready_to_execute and a 422 is returned with the failing
check, so it can be retried once the underlying issue is
fixed.
Error responses:
404 { code: "not_found" }: migration not found422 { code: "INVALID_TRANSITION" }: not inready_to_executestatus422: a gate or balance check failed (the failing check is in the response)
Path parameters
idstringrequiredResponse
Show response fields
migrationIdstringreconciliationobjectShow child attributes
contactsobjectShow child attributes
conflictsintegercreatedintegercurrencystringcutoverDatestringledgerobjectShow child attributes
balancedbooleanobobjectShow child attributes
balancedbooleanmodestringtransactionIdstringstatusstring