Outsource MO
POST/api/manufacturing/manufacturing-orders/1/outsource
Switches an existing draft or confirmed Manufacturing Order to outsourced production.\n\nPersists 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).\n\nRequest body fields:\n- contractor_supplier_id (int, required) — Supplier id with is_manufacturing_contractor=true. Must exist in suppliers.\n- contractor_warehouse_id (int, nullable) — Warehouse the contractor will receive components into. Must exist in warehouses.\n- outsourced_purchase_order_id (int, nullable) — Optional existing PO to link. Must exist in purchase_orders. If omitted, an Open outsourced PO is auto-created against the contractor and linked.\n- scheduled_start (datetime, nullable) — Y-m-d H:i:s. Persisted to manufacturing_orders.scheduled_start.\n- scheduled_end (datetime, nullable, must be >= scheduled_start) — Persisted to manufacturing_orders.scheduled_end.\n- 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.\n- notes (string, nullable, max:5000) — Persisted to manufacturing_orders.notes.\n\nRejected (500) if the MO status is not draft or confirmed.\nRejected (422) if contractor_supplier_id is missing or any FK does not exist.
Request
Responses
- 200
- 422
OK
Response Headers
Unprocessable Entity