Match a bank statement against unpaid invoices
Parses one or more uploaded bank-statement files (CSV or Excel) into transactions, keeps incoming credits, and matches them against the user's unpaid (non-quote) invoices. Matching is reference-first: an invoice reference (hash, e.g. NA001) or an exact-total amount with a strong client-name match is auto-applied (invoice marked paid + a payment recorded); a credit below the total that strongly identifies an invoice records a partial payment. Several credits can settle the same invoice in one upload; it is marked paid when cumulative payments cover its total. Lower-confidence amount-only matches and credits exceeding the remaining balance are returned as suggestions and never applied. Re-importing the same statement is idempotent (known statement fingerprints are matched first, then existing payments are reconciled one-to-one by amount + date for alternate exports and legacy entries). Explicit invoice references prevent a payment from being assigned to another invoice for the same client. When a non-CHF invoice is marked paid, its CHF exchange rate is stored.
Request
- Base URLhttps://api.vocal.email/v1
- Auth
- API key in header X-API-Key
- or HTTP bearer
- TypeScripthttps://skmtc.dev/vocal/apis/magic-heidi-invoicing-software-api/docs/invoices/scan-statement/post.tsA function with typed inputs. Its response is checked against the schema.
Request body multipart/form-data
Response
Statement processed; returns a summary plus the applied matches, suggestions and unmatched transactions.
Changes
No recorded changes to this operation across all 5 revisions of this API.