Skip to main content

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

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:

  • scope (string, required): open re-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); locked moves 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​

OK

Response Headers
    Content-Type