exportHistoricalOrderFinancials
Exports the unsent order financials within a date range as a CSV, aggregated exactly
as createConsolidatedSalesReceipts would send them to QuickBooks.
With documentType: SALES_RECEIPT (the default), financials are grouped by sales
channel and accounting customer, then by day (DAILY) or calendar month (MONTHLY),
and the CSV contains one document per group with the aggregated QuickBooks lines
(items, discount, shipping, tax). Only sales channels with consolidated sales
receipts enabled are included.
With documentType: INVOICE, the CSV contains one document per order financial and
accountingSalesPeriod is rejected.
A document that cannot be built (for example a missing QuickBooks item or customer mapping) is included with its error message instead of failing the export, so the file doubles as a pre-push report of what would block the real send.
The export is processed in the background; use the returned process_id to track
progress and retrieve the download link.
Business Rules
- The date range spans at most 31 days and cannot end in the future
- Omitting
salesChannelIdsincludes all of the company's eligible sales channels accountingSalesPeriodis required forSALES_RECEIPTand rejected forINVOICE
Permissions Required
accounting:update_order_financial
exportHistoricalOrderFinancials(
input: ExportHistoricalOrderFinancialsInput!
): AsynchronousActionResponse!
Arguments
exportHistoricalOrderFinancials.input ● ExportHistoricalOrderFinancialsInput! non-null input common
Parameters for ExportHistoricalOrderFinancials
Type
AsynchronousActionResponse object common
Asynchronous action response type