Cancel Manufacturing Order
POST/api/manufacturing/manufacturing-orders/:id/cancel
Cancel a manufacturing order. Transitions any non-closed status → Cancelled and releases any inventory reservations.
Required body fields:
reason_code(string, required) — must be one of the 5 allowed values:plan_changed— Plan changedmaterials_unavailable— Materials unavailablecustomer_cancellation— Customer cancellationequipment_issue— Equipment issueother— Other
Optional body fields:
notes(string, nullable, max 2000) — Free-text reason explanationreason_notes(string, nullable, max 2000) — Alias fornotes— accepted for API consistency. Ifnotesis absent andreason_notesis provided, it is copied intonotesduring validation. Sending both meansnoteswins.
Returns 422 if reason_code is missing or not in the allowed list.
Authentication: Bearer token required.
manufacturing:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
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.