Clear Sync Errors
POST/api/ledger/entries/:entry/clear-errors
Dismiss THIS single entry's parked sync errors (needs_action / failed_retryable) SYNCHRONOUSLY by superseding its open sync operations across every connection, then return the refreshed entry so the detail page drops the error banner without a page refresh. This powers the entry detail page's "Clear errors" button.
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
It clears the error WITHOUT auto-retrying — the user runs Resync Now afterwards to re-attempt the push. The bulk equivalent — POST /api/ledger/entries/bulk with action clear_errors — stays an async tracked job for multi-entry selections.
Authentication: Requires Bearer token.
Request body: none.
Behaviour: transitions the entry's open operations (except InFlight) to Superseded per connection, then recomputes and refreshes the entry's display status. A no-op (cleared: false) when the entry has no open sync errors.
Response: 200 with data.cleared (bool — whether any open ops were superseded) and data.entry (the refreshed ledger entry object, whose display_status no longer reports needs_attention). message summarises the outcome.
Permission: requires accounting.sync (granular permissions; admins bypass; unenforced when the tenant's granular_permissions feature flag is off). Returns 403 without it; 404 when the entry does not exist.
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.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
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.