Export Sales Order Line Financials
GET/api/v2/financials/sales-order-lines/export
Exports sales order line financials. The endpoint picks one of two response modes based on dataset size:
-
SYNC (≤ 1,000 rows or scope=current_page) — streams the file inline as the response body. Content-Type is text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
-
QUEUED (> 1,000 rows) — dispatches ExportSalesOrderFinancialsTrackedJob and returns a JSON envelope with the tracked_job_log_id. The frontend should poll the job tray; when the job completes the resulting file is fetched via the export/download endpoint.
Authentication: Requires Bearer token (Power User access required).
Filters and sorts mirror the List Sales Order Line Financials endpoint.
Exported columns now include an 'Allocation' column (after 'Revenue Allocated') — 'Cost-corrected' when the line's revenue was re-allocated in proportion to bundle-group COGS, otherwise 'Document' (SKU-7157).
Request
Responses
- 200
Successful response