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.
-
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 a background job and returns a JSON envelope with the tracked_job_log_id. The frontend should poll the tracked job log endpoints; 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'.
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.