Outsource MO
POST/api/manufacturing/manufacturing-orders/:manufacturingOrder/outsource
Switches an existing draft or confirmed Manufacturing Order to outsourced production.
Persists production_method=outsourced, the contractor supplier, scheduling dates, and notes on the MO row. Writes a production_method_changed event with the full payload (including contractor warehouse and service fee).
Request body fields:
contractor_supplier_id(int, required) — Supplier id withis_manufacturing_contractor=true. Must exist insuppliers.contractor_warehouse_id(int, nullable) — Warehouse the contractor will receive components into. Must exist inwarehouses.outsourced_purchase_order_id(int, nullable) — Optional existing PO to link. Must exist inpurchase_orders. If omitted, an Open outsourced PO is auto-created against the contractor and linked.scheduled_start(datetime, nullable) —Y-m-d H:i:s. Persisted tomanufacturing_orders.scheduled_start.scheduled_end(datetime, nullable, must be >= scheduled_start) — Persisted tomanufacturing_orders.scheduled_end.service_fee_amount(decimal, nullable, min:0) — Recorded as a cost FinancialLine on the backing PO; flows into the MO cost_breakdown.service_fee when production is received.notes(string, nullable, max:5000) — Persisted tomanufacturing_orders.notes.
Rejected (500) if the MO status is not draft or confirmed.
Rejected (422) if contractor_supplier_id is missing or any FK does not exist.
manufacturing:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Validation: the supplier must be flagged as a manufacturing contractor; contractor_warehouse_id must be that contractor's own warehouse (when supplied, a Draft order's source warehouse is re-pointed to it; a Confirmed order releases its component reservations and re-reserves at the new warehouse); outsourced_purchase_order_id must reference an outsourced-manufacturing purchase order that is unlinked or already linked to this order. Omitting service_fee_amount preserves the existing fee on a reused purchase order — supply a value (including 0) to change it.
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 Entity
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.