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:
reports:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
-
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).
-
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
- 200
- 401
- 403
- 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.
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.