Skip to main content

List Plan Lines

GET 

/api/inventory-forecasting/runs/:runId/lines

List the lines of a plan, one per product and warehouse, paginated.

Required scope: purchase-orders:read

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

Authentication: Requires Bearer token.

Each line carries its source (make = built from its active BOM, buy = purchased, transfer = moved from another warehouse, unsourced = no BOM, supplier or transfer lane yet), the stock position (on_hand, incoming, backordered), the forecast (daily_average, forecast_30, independent_quantity over the plan horizon), the demand from builds that consume it (dependent_quantity), the suggested quantity after lot size / case pack / MOQ, the order-by date and status (covered, order_soon, stockout_risk, late), and driven_by — the structured parts the quantity is made of — with driven_by_text, the same as one sentence. All quantities are in the product's stock unit of measure. is_orderable is false for unsourced, covered or already-ordered lines; released_document names the draft document a line was turned into — its type, id and reference (the document number, e.g. PO-0066).

Filters: filter[source], filter[supplier_id], filter[warehouse_id], filter[brand_id], filter[status] (each accepts a single value or comma-separated list), filter[needs_action] (1 = only lines that still need an order), filter[search] (SKU or product name).

Ordering: group_by = source (default; make, buy, transfer, unsourced) | supplier | brand | none orders each page into contiguous groups; within a group, late lines come first, then by SKU. No sort parameter.

Pagination: page, per_page (default 10).

Request​

Responses​

OK

Response Headers
    Content-Type