---
title: "What each movement on the account looks like it was"
method: GET
path: "/api/v1/banking/matches"
tags: ["Money"]
---

# What each movement on the account looks like it was

`GET /api/v1/banking/matches`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/banking/matches`
- Auth: API key in cookie `better-auth.session_token`

Every unmatched movement, with the best hypothesis about what it was and the evidence behind it. Money coming in is matched against open invoices, read with the team’s own matching setting, its tenants and co-tenants and the accounts that have paid each lease before, and carries `heldBecause` where something stops it being placed unattended. Money going out is matched against costs on file, supplier invoices and loan instalments, except placed rent going back to whoever paid it, which is listed in `held` and never offered as a cost. A movement with no credible hypothesis is counted in `unexplained` rather than given a low-confidence guess: a list of guesses is a list nobody reads. Nothing is posted by asking this.

## Response `200`

The suggestions, strongest first.

- object
  - `ok` unknown, required
  - `data` object, required
    - `incoming` object[], required
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `bankTransactionId` string, required: Stable record id, e.g. `lse_012`.
      - `confidence` number, required: 0 to 1. At or above the team’s matching setting a match may be placed unattended; below it, it waits for the owner.
      - `reasons` string[], required
      - `status` 'suggested' | 'accepted' | 'rejected' | 'needs_review', required
      - `explanation` string, required: One paragraph an owner can accept or reject on without opening anything else.
      - `invoiceIds` string[], required
      - `kind` 'full' | 'split' | 'partial' | 'overpayment' | 'prepayment', required
      - `allocations` object[], required
        - `invoiceId` string, required: Stable record id, e.g. `lse_012`.
        - `amount` number, required
      - `residual` number, required: Money left over after allocation, held as credit rather than booked as income.
      - `shortfall` number, required: Still open on the invoices this match touches, after allocation.
      - `heldBecause` 'deposit' | 'predates_notice' | 'recorded_by_hand' | 'looks_like_a_duplicate' | 'history' | 'undone_by_you' | 'you_declined' | 'approval_lapsed' | 'reversal' | 'same_name' | 'ended_lease' | 'deposit_and_rent' | 'named_period' | 'learned_payer_conflict' | 'second_payment': Why this movement waits for the owner however sure the match is: an awaited deposit, a transfer dated before its notice, a payment already recorded by hand, a likely duplicate, history, the owner having taken it off, declined it or let its approval lapse, a payer whose name several tenants share, a lease that has ended, a deposit and rent in one transfer, a period named that is not the oldest one open, a payer account learned on another lease, or a second payment of the same rent. Absent when nothing holds it.
    - `outgoing` object[], required
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `bankTransactionId` string, required: Stable record id, e.g. `lse_012`.
      - `confidence` number, required: 0 to 1. At or above the team’s matching setting a match may be placed unattended; below it, it waits for the owner.
      - `reasons` string[], required
      - `status` 'suggested' | 'accepted' | 'rejected' | 'needs_review', required
      - `explanation` string, required: One paragraph an owner can accept or reject on without opening anything else.
      - `kind` 'expense' | 'supplier_invoice' | 'loan', required
      - `targetLabel` string, required: What it was matched against, by name, so a list can be read without loading the row.
      - `expenseId` string: Stable record id, e.g. `lse_012`.
      - `supplierInvoiceId` string: Stable record id, e.g. `lse_012`.
      - `mortgageId` string: Stable record id, e.g. `lse_012`.
    - `held` object[], required: Money going out that is never offered as a cost, supplier payment or loan, with what holds it: placed rent going back to whoever paid it, within eight weeks.
      - `bankTransactionId` string, required: Stable record id, e.g. `lse_012`.
      - `heldBecause` 'reversal', required
      - `reverses` string, required: The placed money coming in that this movement sends back.
      - `invoiceIds` string[], required: The notices that placement paid, open again once the owner confirms it went back.
      - `contactId` string: Stable record id, e.g. `lse_012`.
      - `leaseId` string: Stable record id, e.g. `lse_012`.
      - `explanation` string, required: The sentence the owner reads on the movement.
    - `unexplained` number, required
    - `scanned` number, required
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `401`: No session. Sign in first.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
