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
- 200
- 401
- 403
- 404
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.