Skip to main content

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 with is_manufacturing_contractor=true. Must exist in suppliers.
  • contractor_warehouse_id (int, nullable) — Warehouse the contractor will receive components into. Must exist in warehouses.
  • 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.
  • scheduled_start (datetime, nullable) — Y-m-d H:i:s. Persisted to manufacturing_orders.scheduled_start.
  • scheduled_end (datetime, nullable, must be >= scheduled_start) — Persisted to manufacturing_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 to manufacturing_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.

Required scope: manufacturing:write

Grant 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

OK

Response Headers
    Content-Type