Skip to main content

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:

Required scope: reports:read

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

  1. INLINE (≤ 1,000 rows, or scope=current_page, which exports only the page/per_page window) — returns the file as the response body. format=xlsx returns an Open XML workbook (Content-Type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet); format=csv returns a UTF-8 CSV stream (Content-Type text/csv).

  2. QUEUED (> 1,000 rows) — dispatches a background job and returns a JSON envelope with the tracked_job_log_id. Poll the tracked job log endpoints; when the job completes, fetch the resulting file from the export/download endpoint.

Both modes produce the same columns in the same order, so the file does not change shape when a dataset crosses the 1,000-row boundary.

Authentication: Requires Bearer token (Power User access required).

Filters and sorts mirror the List Sales Order Line Financials endpoint.

Exported columns 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'.

Request​

Responses​

OK

Response Headers
    Content-Type
    Content-Disposition