List Document Link Candidates
GET/api/ledger/entries/:entry/link-candidates
Provider documents an unmatched ledger entry could be linked to for the first time — the confidence-ranked picker for pointing a never-linked SKU entry at the document it already corresponds to in the provider (e.g. a bill that was imported into the provider some other way), instead of syncing a duplicate. This is the sibling of List Relink Candidates, which recovers a voided/deleted link; this one is for an entry that has never been linked.
Reads the provider-document cache for the tenant's accounting connection and returns the unlinked documents ranked best-first. Each candidate carries per-signal match flags — amount_match, date_match, reference_match, and confident (amount AND date within tolerance). Documents already linked to another entry 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 is already linked. Link the chosen document with POST /api/ledger/reconciliation/link.
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.