Repair Payout-Channel Order AR
POST/api/ledger/reports/payout-channel-order-ar/:salesChannel/repair
Starts a background job that removes one channel's doubled order-invoice AR and returns its tracked job id (poll it with the tracked jobs endpoints).
accounting:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token with the Sync accounting permission.
Body:
scope(string, required):openre-derives the channel's order invoices and credits dated in open periods, so the ones its payouts book are withdrawn (a draft entry is discarded, a posted one reversed);lockedmoves the channel's cut-over back to its revenue start and reverses the doubled locked-period entries on the first open day. Locked months' statements do not change; the correction lands in the first open month. Neither scope changes documents in the accounting system.
422 on scope when the channel has left payout mode (in_payout_mode false in the summary: its order invoices are no longer doubled, and only its kept accounting-system documents can be voided), when nothing applies (no cut-over or no open-period AR for open; no locked-period AR for locked), and on sales_channel when the channel's revenue is not booked by payouts.
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 Content
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.