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.
orders:writeGrant 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
- 200
- 401
- 403
- 404
- 422
- 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 — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Content
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.