Confirm bill import
POST
https://app.speybooks.com/api/v1/bill-imports/{id}/confirmConfirm a bill import. In one atomic transaction the engine, for each
valid row, creates the supplier contact if it was unmatched, creates
the bill (its status set from the payment state: sent,
partial, or paid), posts the contra-wash clearing entry that
moves the bill onto the payables ledger, and, for a partially paid
bill, records a synthetic payment for the amount already paid.
The clearing account must net to zero at commit. If it does not, the entire transaction is rolled back and nothing is written.
Error responses:
422: the import is not confirmable (canConfirm is false), a required account is missing, or the clearing account does not net to zero at commit
Path parameters
idstringrequiredData import ID (e.g. dimp_4). Must be in pending status with canConfirm: true.
Response
200Import confirmed. Returns documentsCreated, syntheticPaymentsCreated, clearingBalance (should be 0), direction, and engineVersion.
Show response fields
clearingBalanceintegerdirectionstringdocumentsCreatedintegerengineVersionstringsyntheticPaymentsCreatedintegerError codes
404Pending bill import not found.
409An active bill import was confirmed concurrently (singleton violation).
422Import not confirmable: canConfirm is false, missing accounts, or clearing imbalance on commit.