Skip to main content

List Sales Order Line Financials

GET 

/api/financials/sales-order-lines

Returns a paginated list of sales order line financial records with detailed P&L data per order line.

Authentication: Requires Bearer token (Power User access required)

Response fields:

  • id: Record ID
  • sales_order_line_id: Associated sales order line ID
  • sales_order: {id, order_number}
  • description: Line item description
  • product: {id, sku}
  • sku, brand_name, store_name, integration_name, integration_instance_name, sub_sales_channel_name, supplier_name
  • order_date, order_status, fulfillment_status
  • customer: {id, name}
  • quantity, amount
  • revenue, revenue_allocated, credits, discount
  • revenue_allocation_basis: "document" (revenue follows the order document) or "cost_corrected" (bundle-group revenue re-allocated in proportion to actual COGS so no component shows a phantom line-level loss — SKU-7157)
  • document_revenue: pre-correction revenue computed from the order document (quantity × amount − included tax); equals revenue unless revenue_allocation_basis is cost_corrected (column-driven requests: served under the revenue_allocation_basis inclusion key — returned whenever the Allocation column is included)
  • cogs, cogs_returned, cost_allocated, total_cost
  • profit, profit_margin
  • created_at, updated_at

Filtering & sorting: revenue_allocation_basis is available as a filterable column (text operators; values: document, cost_corrected) and as a sort field (sort=revenue_allocation_basis or -revenue_allocation_basis) alongside the existing columns — SKU-7157. The matching report column is hidden by default in the UI.

Request

Responses

Successful response