Atomically dispatch all active members of a team to a work order. Creates one work_order_team_dispatch row plus per-member work_order_assignment rows in a single transaction.
Body fields:
- work_order_id (required, UUID): work order to dispatch the team to.
- team_id (required, UUID): workforce team (not soft-deleted, tenant-scoped).
- scheduled_start_time (optional, ISO-8601): assignment scheduled start.
- scheduled_end_time (optional, ISO-8601, after scheduled_start_time): assignment scheduled end.
- assignment_notes (optional, string max 2000): notes copied to each assignment row.
Validation 422 codes: TEAM_EMPTY, TEAM_DISPATCH_EXISTS, LOCATION_MISMATCH (when tenant team_dispatch_location_mode='strict'), TEAM_UNDERSTAFFED (when team_dispatch_understaffed_mode='block'), TEAM_LEAD_MISSING (when team_dispatch_lead_missing_mode='block'), MEMBER_OVERLAPPING_ASSIGNMENT.
Idempotent: re-dispatching the same team to a work order that already has the same active team-dispatch returns the existing row with 200.
Fires: TeamDispatched (always); TeamDispatchUnderstaffed / TeamDispatchLeadMissing if applicable.
Request
This endpoint expects a multipart form.
team_idstringRequired
Required: UUID of the workforce team (not soft-deleted, tenant-scoped).
work_order_idstringRequired
Required: UUID of the work order to dispatch the team to.
assignment_notesstringRequired
Optional: notes copied to each per-member assignment row (max 2000 chars).
scheduled_end_timestringRequired
Optional: ISO-8601 assignment scheduled end (must be after scheduled_start_time).
scheduled_start_timestringRequired
Optional: ISO-8601 assignment scheduled start.