---
title: "The document match policy's verdict for one document"
method: GET
path: "/accountant/companies/{customerId}/documents/{documentId}/match-judgment"
tags: ["Accountant Documents"]
---

# The document match policy's verdict for one document

`GET /accountant/companies/{customerId}/documents/{documentId}/match-judgment`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/documents/{documentId}/match-judgment`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

The one rule every automated matcher applies (match / hold / no_fit, with a reason code and the candidate bank rows). Read only: it changes no link and records nothing. Reachable by an assigned accountant, the bookkeeping service token and the bookkeeping agent key. The agent key reads the verdict as the agent may act on it: a writable match of a pair a person unmatched or rejected comes back with `writeAllowed` false and reason `pair_rejected_by_person`. Any other writable match stays writable only once its date window has really closed: the window's last day is past and every bank or card account the window waits on is covered through it by evidence (a completed feed sync less the account's posting lag, a Stripe backfill, a completed reconciliation, or a QuickBooks reconciled-through date; never the newest row's date). Until then it comes back with `writeAllowed` false, `recheck` true and reason `window_open` (the agent waits and judges it again). Unreadable evidence keeps the window open. An entity no live source delivers to (CSV or manual rows only) is writable at once. Everyone else reads the policy's verdict unchanged.

## Path parameters

- `customerId` string, uuid, required
- `documentId` string, uuid, required

## Response `200`

The verdict

- object
  - `success` true, required
  - `data` DocumentMatchJudgment, required
    - `policyVersion` string, required
    - `documentId` string, uuid, required
    - `documentType` 'invoice' | 'bill' | 'receipt' | 'contract', required
    - `verdict` 'match' | 'hold' | 'no_fit', required
    - `reason` 'unique_strict_match' | 'unique_after_dropping_applied' | 'bill_terms_window_match' | 'pair_rejected_by_person' | 'window_open' | 'possible_duplicate' | 'billed_party_mismatch' | 'other_client_ledger_hit' | 'cross_company_duplicate' | 'phi_content' | 'unassigned' | 'archived' | 'already_linked' | 'unsupported_document_type' | 'qbo_history' | 'missing_required_evidence' | 'ambiguous_candidates' | 'candidates_already_applied' | 'category_conflict' | 'recurring_bill_terms_window' | 'payment_before_bill_date' | 'competing_open_bill' | 'payment_in_closed_period' | 'vendor_unconfirmed' | 'amount_near_miss' | 'no_bank_row_feed_covers' | 'no_bank_row_feed_gap', required: `pair_rejected_by_person` and `window_open` only in the bookkeeping agent key's read (verdict match, writeAllowed false): a person unmatched or rejected this pair; evidence does not yet show the match's date window complete (judged again later)
    - `transactionId` string, uuid, nullable, required: The bank row; set only when verdict is match
    - `openItem` boolean, required: An accountant must look
    - `recheck` boolean, required: Judge again on the next run
    - `writeAllowed` boolean, required: An automated path may write this verdict
    - `shadow` boolean, required: A match judged but never written (bill terms-window matches; invoices until their AR posting)
    - `evidenceNote` string, nullable, required: Why the match is safe; set on every writable match, for the evidence record
    - `holds` object[], required
      - `reason` 'possible_duplicate' | 'billed_party_mismatch' | 'other_client_ledger_hit' | 'cross_company_duplicate' | 'phi_content', required
      - `detail` object
    - `candidates` object[], required
      - `transactionId` string, uuid, required
      - `occurredOn` string, date, required
      - `amountCents` integer, required
      - `currency` string, required
      - `direction` 'in' | 'out', required
      - `description` string, required
      - `merchantName` string, nullable, required
      - `dateDiffDays` integer, required
      - `vendorScore` number, required
      - `window` 'strict' | 'bill_terms' | 'nearby', required
      - `disposition` 'eligible' | 'applied_to_same_vendor_amount' | 'transaction_already_linked' | 'category_conflict', required
      - `pairsWithDocumentId` string, uuid, nullable, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found

## Changes

- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/documents/:documentId/match-judgment/get.md)

---

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