Bank Connections

Fetch the user's latest transactions

Finalizes any pending connections (confirming consent), fetches the latest transactions across the user's connected accounts, matches incoming payments against unpaid invoices, turns unmatched acquirer/platform payouts (SumUp, Stripe, Apple, …) into paid invoices, and turns outgoing ones into paid expenses.

Created expenses are named and categorised automatically, in the user's language. Categories are only ever chosen from the ones the user already has — none are invented — so needCategory counts the expenses nothing fitted, the only bank work left to do by hand. The amount, date and currency always come from the bank. Ordinary unmatched customer credits are never classified by AI on this unattended path.

Alongside the counts, details carries the rows behind them — the same buckets-of-rows shape the spreadsheet importers return, so a sync summary can be opened up instead of being six numbers. Buckets: matched (credits applied to an invoice, with invoiceId), invoices_created (payout credits booked as paid invoices, with invoiceId), expenses_created (debits booked as expenses, with expenseId), unmatched_credits (credits with no invoice — these carry the machine-readable date/amount pair so a client can offer to create one, and name the suspected invoice when there was a weak match), already_imported, pending (not booked yet) and skipped_connections (with the reason nothing was fetched).

Each bucket is capped at 200 rows; the counts are never capped.

post/bank/fetch

Response

Transactions fetched

{"stackTrail":"components:schemas:SuccessEnvelope:properties:data","oasType":"schema","type":"unknown"}
successtrue required

Example response

{
  "data": {},
  "success": true
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.