Commit a schedule-board job move
commitJobRequestMoveApplies a previewed schedule-board job move. Atomically places the job on the technician at the new start time, pushes displaced jobs back, and detects plan drift for conflict safety.
Instructions
Commit a schedule-board job move
Applies the move previewed by /move/preview: places the job on the technician at the new time and pushes the displaced jobs back, atomically (per-tech advisory lock; the server recomputes the plan and fences each job on its status_version — drift since the preview returns 409 SCHEDULE_MOVE_PLAN_DRIFTED, re-preview). Same body as preview + optional expected_version. See SCHEDULE_BOARD_DESIGN.md.
409 NEXT STEPS: SCHEDULE_MOVE_PLAN_DRIFTED — the schedule changed since your preview (or expected_move_ids no longer match): re-preview, show the fresh plan, commit again. All other codes — same remedies as /move/preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Job request ID (UUID or short_code) | |
| mode | Yes | Cascade mode: overtime | next_day (must match the preview). | |
| start_at | Yes | New start — business-local naive datetime, no offset. Must match the preview and be in the future. | |
| technician_id | Yes | Target technician (must match the preview). | |
| idempotency_key | No | Unique key making retries safe: a repeat send with the same key replays the original response (header Idempotent-Replayed: true) instead of re-running the operation. Reusing a key with a different body returns 422 IDEMPOTENCY_KEY_REUSE. (sent as the Idempotency-Key header) | |
| expected_version | No | ExpectedVersion — the moved job's status_version from the preview (0 = fence on the fresh plan-read value; negatives rejected). | |
| expected_move_ids | No | ExpectedMoveIDs — the displaced job IDs the preview returned (echo data.days[].moves[].job_id). Optional but RECOMMENDED: if the schedule changed so the commit would push a different set (e.g. a job booked onto the target tech since the preview), the commit is rejected with SCHEDULE_MOVE_PLAN_DRIFTED instead of silently pushing an unseen job. | |
| expected_member_ids | No | ExpectedMemberIDs — crew moves only: the FULL member set the preview staffed (echo data.members[].technician_id). If the commit's re-plan would staff a DIFFERENT set (a previewed replacement got booked in the meantime), the commit is rejected with SCHEDULE_MOVE_PLAN_DRIFTED — crew swaps are never approved unseen. Omit to opt out. |