Skip to main content

Raise a Manufacturing Order for a Sales Order Line

POST 

/api/sales-orders/:salesOrder/lines/:salesOrderLine/build-to-order/raise

Raises a manufacturing order for one sales order line now, using the same per-line build-to-order run as Raise Manufacturing Orders for a Sales Order: the order is created for the line's uncovered shortfall, confirmed, and carries the line's customer options (snapshot on the order, bound to the recipe steps that use them). Works even while the automatic build-to-order setting is off, because someone asked for it. No request body.

Required scope: orders:write

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

Refused with 422 (reason under errors.sales_order_line) when the sales order isn't open, the product isn't eligible (no default recipe, a never-build or buy policy, kit or bundle, FBA or dropship warehouse), the line already has an open manufacturing order, or stock already covers the line.

Authentication: Bearer token with the orders and manufacturing write scopes, the sales orders update permission and the manufacturing permission.

Response: result has the same shape as the order-level run (raised, grown, cancelled, flagged, exceptions, unchanged_lines); build_to_order is the line's refreshed build-to-order block: eligible, state (building | exception | pending | none), has_default_bom, manufacturing_orders, exception, can_raise and raise_disabled_reason.

Request​

Responses​

OK

Response Headers
    Content-Type