Invoices

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.

post/invoices/scan-statement

Request

Request body multipart/form-data

filesstring binary required

One or more CSV/Excel bank-statement files (repeat the field for multiple files).

markPaidstring

Set to false to record payments without flipping isPaid on full matches. Defaults to true.

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.