Skip to main content

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.

Required scope: accounting:write

Grant 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 current provider_orphaned.documents (accounting-system documents, which can exceed provider_orphaned.entries when 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​

OK

Response Headers
    Content-Type