# Matching

> Match receipts to bank transactions and review the decisions.

MCP toolset: `matching` (https://app.getoatmilk.com/api/mcp?toolset=matching)

## matching

- [`matching.candidates`](https://app.getoatmilk.com/docs/api/matching.candidates.md) — List what an entry could be matched with, best first. For a receipt: unmatched bank or card lines in the same direction across available history, ranked by amount (including a charge in another currency that names the receipt amount), vendor name, what people matched before, and how usual the date gap is. For a bank entry: unlinked receipts with the same amount across available history. Each candidate has its amount, date, a name and why it was suggested. Confirm with accounting_match_transaction or accounting_attach_receipt.

- [`matching.confirm`](https://app.getoatmilk.com/docs/api/matching.confirm.md) — Confirm a proposed exact-amount receipt match after finance review. Requires decision, receipt and transaction revisions, proposed target revision when attaching to an existing bank entry, reason and idempotency key. Canonical provider amounts and original evidence are preserved.

- [`matching.list`](https://app.getoatmilk.com/docs/api/matching.list.md) — List the latest receipt-to-transaction matching decisions with source candidates, separate match probability and confidence, and review reasons. Finance access required.

- [`matching.reject`](https://app.getoatmilk.com/docs/api/matching.reject.md) — Say a candidate bank transaction is not the payment for a receipt, using decisionId, expectedRevision, entryId, entryRevision, transactionId, an optional reason and idempotencyKey. That transaction is not suggested for the receipt again and the receipt goes to a person; the vendor pairing counts against future suggestions only when the line names a different vendor; matching reruns. Send undo: true to lift a rejection. Finance access required.

- [`matching.request`](https://app.getoatmilk.com/docs/api/matching.request.md) — Queue a new durable matching pass over stored receipts and bank transactions. Uses the matching evaluator through AI Gateway and returns a job generation. Never creates bank transactions from model output. Finance access and idempotency key required.

- [`matching.rerunEntry`](https://app.getoatmilk.com/docs/api/matching.rerunEntry.md) — Check one receipt's match again with its current details, without queueing a pass over every receipt. Supply entryId and idempotencyKey. Saves a fresh matching decision for the receipt, never confirms a match, and returns the receipt's latest decision. Use it when a receipt was edited after matching looked at it. Finance access required.

- [`matching.status`](https://app.getoatmilk.com/docs/api/matching.status.md) — Read durable matching progress. Queued or processing status does not mean reconciliation has completed.

## matching.receiptConsolidation

- [`matching.receiptConsolidation.candidates`](https://app.getoatmilk.com/docs/api/matching.receiptConsolidation.candidates.md) — Find current source-backed existing purchases and complete Wise card payment groups for one receipt. Candidates require original-source review and do not prove business use or tax eligibility. Returns explicit limits and source blockers; never confirms a match.

- [`matching.receiptConsolidation.confirm`](https://app.getoatmilk.com/docs/api/matching.receiptConsolidation.confirm.md) — Dashboard-only confirmation after a finance member reviews the current original documents and source-backed payment identity. Requires exact preview fingerprint, revisions and original IDs. Adds a receipt association and alias without changing bank amounts, allocations, financial fields, tax or review status. API, MCP and automatic actors cannot approve.

- [`matching.receiptConsolidation.preview`](https://app.getoatmilk.com/docs/api/matching.receiptConsolidation.preview.md) — Inspect current originals, source identities, exact signed payment pieces and revisions before manually linking a receipt to an existing bank purchase. No financial fields or allocations are changed.

- [`matching.receiptConsolidation.undo`](https://app.getoatmilk.com/docs/api/matching.receiptConsolidation.undo.md) — Dashboard-only History rollback of a receipt consolidation whose exact revisions and source state remain unchanged. Restores only its receipt alias and added association; existing purchases, bank pieces, allocations, tax and review status remain intact.
