Record Outsourced Receipt
POST/api/manufacturing/manufacturing-orders/:manufacturingOrder/outsourced-receipt
Record receipt of finished goods from a contractor for an outsourced MO. Runs the production-costing flow: consumes the reserved components from FIFO, produces the output inventory, and costs it as materials + the PO's service fee. The MO must be Started (in_progress / partially_completed).
manufacturing:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
A service_fee_amount override updates the cost FinancialLine on the backing PO before costing, so it flows into cost_breakdown.service_fee.
Fields:
- receipt_date (required, date)
- service_fee_amount (optional, numeric ≥ 0) — overrides the PO service-fee financial line
- lines (required, min 1):
- mo_output_line_id (NULLABLE integer) — the MO output line this received quantity produces; defaults to the primary output
- purchase_order_line_id (NULLABLE integer) — not used for finished-goods mapping; reserved for PO-linked receipts
- received_quantity (required, numeric ≥ 0)
- batch_number (optional, ≤ 128 chars) — auto-generated if blank
- expiry_date (optional, date)
- component_variance (optional): mo_component_line_id + actually_consumed_at_contractor — overrides per-component consumption
Service fee: with a per-unit rate configured, the fee is computed automatically at each receipt - omit service_fee_amount. Sending service_fee_amount on a receipt overrides the purchase order's total fee explicitly and switches the order to flat-fee mode - later receipts keep that total instead of re-truing from a rate.
Inter-stage freight: freight_amount (with optional freight_supplier_id and freight_reference) records the middle-mile shipping bill for goods arriving at this stage. It is added as a cost line on the backing purchase order and capitalizes into the received goods' landed cost rather than being expensed.
Component lot selection: when a component is lot-tracked, component_variance[].lot_allocation names the exact FIFO layers the contractor drew from, in the quantities they used (quantities are in the product's stock unit of measure). Omit it and the layers are chosen automatically in FIFO/FEFO order — which stays the default, since a contractor cannot always report the lot. Supplying it is what preserves an accurate genealogy record when they can.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
Successful response
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.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
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.