Skip to main content

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.

Required scope: manufacturing:write

Grant 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

OK

Response Headers
    Content-Type