Complete Operation Timer
POST/api/manufacturing/mo-operations/:moOperation/complete
Stop the timer and mark the operation done. When actual_time_minutes is omitted it's computed from the started_at timestamp.
manufacturing:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body fields:
actual_time_minutes(optional, numeric, min 0)notes(optional, string, max 2000)
When actual_time_minutes is omitted or 0, the labour cost falls back to the operation's planned expected_duration_minutes so a bare mark-done still costs out. The response's cost_source then reads 'estimated' (vs 'actual' when a timer was logged, or for a fixed_cost operation). If the operation carries a manually-set cost (cost_source='manual'), a bare mark-done without a positive actual_time_minutes keeps that cost and source untouched; logging a positive time re-derives the cost and replaces the manual value.
Returns 422 with code = mo_locked when the parent manufacturing order is Completed, Closed, or Cancelled — operations on a terminal order are immutable.
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.