List Plan Lines
GET/api/inventory-forecasting/runs/:runId/lines
List the lines of a plan, one per product and warehouse, paginated.
purchase-orders:readGrant 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
- 200
- 401
- 403
- 404
- 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.
Not Found
Response Headers
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.