Skip to main content

List Relink Candidates

GET 

/api/ledger/entries/:entry/relink-candidates

Provider documents this voided or deleted entry could be linked to INSTEAD of recreating one — the confidence-ranked "link to an existing document" picker. Use this when the accounting document was voided in the provider and a replacement already exists there (e.g. a bill was voided and re-raised): rather than minting a duplicate, adopt the document that is already in the provider.

Reads the provider-document cache for the connection of the entry's voided link and returns the unlinked documents of the same kind, ranked best-first. Each candidate carries per-signal match flags — amount_match, date_match, reference_match, and confident (amount AND date within tolerance) — so the top result is usually the correct replacement. Documents already linked to another entry, or themselves voided/deleted, are excluded. Documents dismissed on the reconcile screen are still offered — flagged dismissed: true and ranked below equally-confident undismissed candidates; linking one clears its dismissal. Returns an empty list when the entry has no voided/deleted link to recover.

Authentication: Requires Bearer token.

Query parameters: search (optional) — free-text narrowing.

Response: 200 with data as an array of candidate documents ordered most-confident first.

Request

Responses

OK

Response Headers
    Content-Type