Link Remote Document
POST/api/ledger/reconciliation/link
Manually link a SKU entry to an existing provider document — the operator's "this is the same document" action. Recorded linked_stale so the next sync pushes an Update bringing the remote into line.
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Linking a document also clears any reconcile-screen dismissal recorded against it.
Authentication: Requires Bearer token + accounting.sync permission.
422 when the entry already has a link on this connection.
Ownership validation: the (remote_type, remote_id) pair must be a cached provider document belonging to the given connection. A document from another connection (or one not yet pulled into the local cache) is rejected with HTTP 422 — pull provider documents for the connection first, then link.
Request
Responses
- 200
- 401
- 403
- 422
- 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.
Unprocessable Entity
Response Headers
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.