Skip to main content

Get Sales Order Line Items

GET 

/api/v2/sales-orders/:salesOrder/line-items

Returns line items with full product details, inventory, allocations, and warehouse info. Pre-loads realtime inventory for all products in a single query. Loaded in parallel with show.

Required scope: orders:read

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

Unmapped channel lines (product_id is null) include a listing object describing the raw sales-channel listing (Amazon, Shopify, eBay, WooCommerce) used by the "Link Line Item to Product" modal. For Amazon lines whose seller SKU matches a synced AmazonProduct, the listing object also includes the internal id and integration_instance_id, which the UI uses to deep-link to the Amazon product detail page.

Each line item includes bundle_proration_basis ("cost" | "price" | "quantity" | null). For bundle component lines this indicates the methodology used to prorate the bundle’s price across its components: "cost" — proportional to component unit costs (used when all components have unit_cost > 0); "price" — proportional to component prices (fallback when any component is missing a cost but all have price > 0); "quantity" — equal split per component quantity (last-resort fallback). Null for non-component lines and for legacy component lines expanded before this feature (those were price-based).

Each line item also carries immutable order-line provenance: channel_product_external_id (string|null) is the sales-channel listing identifier the line came in as, snapshotted the first time the line is mapped to a product listing — it is never overwritten by a later remap, and survives deletion of the convenience listing pointer. sales_channel_product_id (int|null) is reserved for the forthcoming sales_channel_products supertype and is null until that phase ships. Lines that have not yet been mapped report both as null.

Authentication: Requires Bearer token.

Allocation lock: allocation_locked (bool) is true when the line is tied to a fulfillment order beyond open+unsubmitted — submitted to a carrier, or a channel-imported/manual/pickup fulfillment. When true, allocation_locked_reason (string) explains why the line can no longer be allocated/re-allocated (e.g. add stock to reconcile an imported fulfillment). The UI disables the "Allocate" action and shows the reason.

Backorder coverage. Each entry in backorder_coverages reports the receipt state of the covering purchase order LINE, not just the header: ordered_quantity, received_quantity and is_fully_received. Once is_fully_received is true the stock has already landed, so eta describes a past arrival and must not be presented as an expected delivery date. A partially received line keeps a meaningful eta for the outstanding remainder.

Each line's warehouse block carries tracks_inventory (does SKU.io count the stock there) and channel_fulfilled (does the sales channel ship this order from that warehouse — a native Amazon order at FBA, or any order at AWD / Walmart WFS / Fulfilled-by-Faire). channel_fulfilled is an order-level answer: a Walmart or Shopify order routed to an FBA warehouse is an Amazon Multi-Channel Fulfillment order SKU.io submits itself, so it is false there.

unrecorded_channel_shipment — present when a sales channel reported shipping units that could not be recorded against stock at all (an unmapped SKU, identity-tracked stock, or a pool with nothing to give). It carries the quantity involved, the reason, and the remedy. null when the line has no such shipment. Units that COULD be recorded become inventory debt instead and appear on the inventory debt report rather than here.

warehouse_location_locked is true when someone chose the line's warehouse by hand on a Shopify order whose integration follows Shopify location changes; such lines stay where they are until unlocked (Unlock Sales Order Line Warehouse).

Line delivery method: on an order that mixes shipping and Click & Collect, each line carries its own delivery method. requested_shipping_method_id / requested_shipping_method_name are null when the line follows the order's shipping method; is_pickup_intent is true when the line is collected in store.

requires_pallet_delivery (bool, per line): the buyer chose pallet (freight/LTL) delivery for this line at checkout. Set by the sales channel; read-only.

COGS breakdown. cogs (null when cost breakdowns are not available) explains the line's average cost: base_unit_cost, the fifo_layers consumed (each with its unit_cost today), total_cost, unit_cost and is_finalized. Once the line is shipped (is_finalized true and cost of goods has been booked), unit_cost and total_cost are the booked cost of goods sold for the line, the figure on its cost-of-goods journal, and do not move when a consumed layer is later revalued. layer_unit_cost_now is the consumed layers' current average cost per unit (after any later supplier price true-up or landed cost), or null when no FIFO layer was consumed. Before the line is shipped, unit_cost and total_cost are the provisional cost from the layers.

Each line item includes is_workflow_insert (boolean): true when the line was added to the order by an Add Order Line workflow (for example a thank-you card in every parcel). Such a line was never sold on the sales channel, so it is never reported as an unmapped channel line, and it is recorded as shipped together with the channel's shipment once the channel has shipped the rest of the order.

Request​

Responses​

OK