Set Sync Override
POST/api/ledger/entries/:entry/sync-override
Set or clear the entry's durable sync override (Layer A). This endpoint is THE sanctioned writer of ledger_journal_entries.sync_override — the override is durable user intent, and regeneration never touches the column, so it survives rebuilds (fixes the legacy is_sync_enabled clobber bug).
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Authentication: Requires Bearer token.
Request body fields:
override(required-present, nullable) — one of:"force_enabled"— force the entry eligible for sync"force_disabled"— force the entry excluded from syncnull— clear the override back to derived eligibility
The key MUST be present in the body (HTTP 422 if omitted); send null to clear.
After the write, sync work and display status are re-evaluated. The response echoes the entry's id, the saved sync_override and the recomputed display_status. Returns 404 when the entry does not exist.
Permission: requires accounting.sync (granular permissions; admins bypass; unenforced when the tenant's granular_permissions feature flag is off). Returns 403 without it.
Every write records provenance (who set the override and when), returned as sync_override_provenance on the entry; clearing the override clears the provenance with it.
Request
Responses
- 200
- 401
- 403
- 404
- 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.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
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.