Skip to main content

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).

Authorization

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 sync
    • null — 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

OK

Response Headers
    Content-Type