Void Payout-Channel Order Invoices in Accounting System
POST/api/ledger/reports/payout-channel-order-ar/:salesChannel/void-provider
Starts a background job that voids, in Xero or QuickBooks Online, the channel's order invoices and credits that SKU.io withdrew because a payout books their revenue but that are still in the accounting system (provider_orphaned in the summary), including emptied batch (summary) invoices / credits whose every order a payout now books. Batch documents that still include remaining orders (provider_needs_update) are never voided. Returns the tracked job id.
accounting:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token with the Sync accounting permission.
Body:
confirm_count(integer, required, min 1): must equal the channel's currentprovider_orphaned.documents(accounting-system documents, which can exceedprovider_orphaned.entrieswhen an entry is still open on more than one connection), so a stale confirmation never voids more than it showed.
Each document is voided through the normal sync pipeline. A document is cleared from the count only when the accounting system confirms the void; one that fails (for example, paid or locked there) stays counted and can be voided again. Only the documents counted at confirmation are voided: each is re-checked right before its void, and one that changed since (already voided, re-linked, no longer withdrawn, or a different accounting-system document) is skipped, not voided. A document withdrawn after the confirmation waits for the next one. The job's results list confirmed_count, documents_processed, voided_count, failed_count, skipped_count, has_failures (true when any document failed or was skipped) and per-document documents[] (ledger_entry_id, sync_link_id, reference, remote_id, status = voided / failed / skipped, error).
422 on confirm_count when it differs from the current count or nothing is left to void, and on sales_channel when the channel is not on the summary. A channel that has left payout mode can still void its kept documents.
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.