Bill Imports
Import outstanding purchase bills from CSV using the Outstanding Document Closure Engine (ODCE) with the payables (AP) direction. This is a mirror of invoice imports with DIRECTION_AP — the ODCE engine is direction-agnostic, using the same code with different clearing accounts (2198 MC_AP instead of 1198 MC_AR).
Precondition gates (identical to invoice imports):
- Opening balances must exist
- Opening balances must be in Clearing Mode
- Cash VAT scheme is blocked
On confirm, the engine creates migrated bills, posts contra-wash clearing journal entries (DR MC_AP, CR Trade Creditors), and generates synthetic payment records for partially paid bills. The clearing zero-sum invariant is verified at commit: OB(MC_AP) + Δ(MC_AP) = 0.
All monetary values in API responses are formatted as pounds (e.g. "1500.00"). Internal storage uses pence (integer minor units).
Endpoints
https://app.speybooks.com/api/v1/bill-imports/upload Upload bills file GET https://app.speybooks.com/api/v1/bill-imports/{id} Get bill import details DELETE https://app.speybooks.com/api/v1/bill-imports/{id} Delete a bill import POST https://app.speybooks.com/api/v1/bill-imports/{id}/confirm Confirm bill import POST https://app.speybooks.com/api/v1/bill-imports/{id}/void Void bill import