Skip to navigation

Reassign Team

View as Markdown

Atomically replace the entire team dispatched on a work order with a different team. Closes the existing team-dispatch (unassign_reason=‘reassigned’), cancels its non-terminal assignment rows, then creates a fresh team-dispatch and member rows for the new team.

Body fields:

  • work_order_id (required, UUID): must currently have an active team dispatch.
  • new_team_id (required, UUID): different from the current team_id.
  • reason (optional, string max 500): captured in the activity log entry on the team-dispatch row.
  • scheduled_start_time (optional, ISO-8601): new schedule start.
  • scheduled_end_time (optional, ISO-8601, after start): new schedule end.

Applies same pre-execution checks as assign-team to the new team (TEAM_EMPTY, location mode, understaffed/lead-missing modes, member overlap).

Fires (after commit): TeamReassigned, TeamUnassigned (for the old team-dispatch), TeamDispatched (for the new one), and TeamDispatchUnderstaffed / TeamDispatchLeadMissing if applicable to the new team.

Headers

{{tenant_key_name}}stringOptional

Request

This endpoint expects a multipart form.
reasonstringRequired

Optional: captured in the activity log (max 500 chars).

new_team_idstringRequired

Required: UUID of the new team. Must differ from the current team_id.

work_order_idstringRequired

Required: UUID of the work order. Must currently have an active team dispatch.

scheduled_end_timestringRequired

Optional: ISO-8601 new schedule end (after scheduled_start_time).

scheduled_start_timestringRequired

Optional: ISO-8601 new schedule start.

Response

Successful response