Skip to main content

Get Payout-Channel Order AR Summary

GET 

/api/ledger/reports/payout-channel-order-ar

Order-invoice accounts receivable on sales channels whose payouts or settlements already book the revenue (Amazon settlements, Shopify / eBay / Walmart per-payout channels). Such AR is counted twice and never cleared. One row per payout channel.

Required scope: accounting:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token (accounting:read scope for tokens).

Buckets (by each document's own date: order date for an order's own invoice, invoice date for a per-shipment invoice, credit date for a credit):

  • open: documents on/after the channel's cutover dated in an open period. These should be 0.00; the Repair (open) action removes them.
  • locked: documents on/after revenue_start whose entry is in a locked period (doubled, frozen by the lock). window_from / window_to is the doubled window the Repair (locked) action reverses on the first open day.
  • pre_settlement: documents before revenue_start. No payout carried that revenue, so it is real; informational.
  • provider_orphaned: invoices / credits SKU.io withdrew whose document is still in the accounting system (provider = xero or qbo), plus emptied batch (summary) invoices / credits whose every order a payout now books. Removed only by the Void action. amount and entries count ledger entries; documents counts the accounting-system documents themselves (an entry still open on two connections is two documents) and is the number the Void action is confirmed with; connections splits documents per accounting connection (connection_id, connection_name, provider, documents), most first. provider is the provider of the connection holding the most documents.
  • provider_needs_update: accounting-system documents that still include orders a payout now books, alongside orders that still post: batch (summary) invoices / credits whose orders partly left the batch, and consolidated invoices withdrawn in part (rebuilt without the lines of payout-booked orders). They are never voided (that would remove the remaining orders) and never updated automatically; syncing the entry (update_entry_id) updates the document. amount is the AR of the entry holding the document.

last_repair is the channel's latest repair run (null when none): at (UTC ISO-8601), scope (open or locked), tracked_job_id and status (pending, processing, completed, partial, failed or cancelled; partial means the run finished but left some documents un-repaired, so the buckets may not be 0.00 yet). A consolidated invoice (billing several orders) is counted once on each channel whose orders it bills, and is bucketed only where every order it bills belongs to that channel and is booked by its payouts.

in_payout_mode is false for a channel that has left payout mode and is listed only because it still has documents in the accounting system or earlier payout-mode windows; its open, locked and pre_settlement buckets are then empty, and its kept documents can still be listed and voided (but not repaired).

Query: as_of (Y-m-d, default today) counts entries dated up to the end of that day. An empty data array means no channel books its revenue through payouts.

Request​

Responses​

OK

Response Headers
    Content-Type