Preview Channel Settlement Revenue Switch
GET/api/ledger/settings/channel-sync/:integrationInstance/settlement-revenue/preview
Previews what switching a sales channel between Per order and Per payout revenue booking would do to its open orders, before you save the switch. Read-only: nothing is changed.
accounting:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token with the Manage accounting settings permission.
Query parameters:
accounting_sync_mode(required):per_orderorper_payout.payout_accounting_start_date(optional, Y-m-d or empty): the start date the switch would set. Left out = the current one.per_order_revenue_entries_off_from(optional, Y-m-d or empty): the cut-over the same save would set. It is kept as given, soswitch_dateandinvoices_stop_fromfollow it. Left out = derived as the save derives it.payout_processors[](optional, Storefront stores only): the processors (stripe,paypal) the store would book by payouts. Left out = its saved selection; empty = none. Only orders a payout can carry (paid through one of them, or already snapshotted as payout-settled) are counted.
Straddling orders are open orders (not cancelled, not drafts, imported from the channel) sold in the lookback_days (60) before switch_date that no payout or settlement line names yet, so their settlement arrives after the switch.
Response fields:
current_mode/accounting_sync_mode/mode_changes: the channel's mode now, the proposed one, and whether they differ.switch_date: entering Per payout, the first sale day the settlements book (the start date, else the switch day); leaving it, today.lookback_from,lookback_days: the earliest sale day counted.awaiting_settlement(count,total= net sales in your home currency): the straddling orders.awaiting_booked_bysays what keeps booking their revenue:invoices(entering Per payout: their invoices stay, their settlement lines go to the clearing account) orsettlements(leaving Per payout: their settlements book them on arrival, their invoices stay unposted).claimed_by_settlements(entering Per payout with a start date in the past, else null): orders sold fromswitch_dateup to now that the settlements take over; their invoices and credits stop posting frominvoices_stop_from.clearing_account_mapped: whether the account the payout lines of invoice-booked orders post to instead of revenue is set; null when the channel has none.payout_term: what the channel calls its payout documents:settlement(Amazon, Walmart) orpayout(eBay, Shopify, TikTok Shop).messagesuse the same word.messages: plain-language sentences describing the effect.
Errors: 422 when the mode is missing or invalid, the date is malformed, or the channel has no payouts or settlements that book revenue; 404 when the channel 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.
Unprocessable Entity
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.