Skip to navigation

Update Work Order

View as Markdown

Update an existing work order. This endpoint now handles both general field updates AND status changes.

Required Permission: update_work_orders

All fields are optional. Only send the fields you want to update.

Status Changes

You can now update the work order status through this endpoint by providing the status field along with any other fields you want to update.

  • status - Enum: draft, pending_approval, approved, scheduled, dispatched, en_route, arrived, in_progress, on_hold, completed, cancelled, rescheduled, requires_parts, requires_approval, quality_check, invoiced, closed
  • notes - string, max:1000 (activity log notes for status change)
  • reason - string, max:500 (reason for status change)
  • occurred_at - date (for backdating if authorized)

Conditional Required Fields (when changing status)

  • cancellation_reason - Required when status = cancelled
  • hold_reason - Required when status = on_hold
  • new_scheduled_start - Required when status = rescheduled (datetime)

Additional Optional Fields for Status Changes

  • completion_summary - string (when completing)
  • customer_signature_received - boolean (when completing)
  • quality_check_passed - boolean (when completing)
  • expected_resume_date - date (when on_hold)
  • new_scheduled_end - datetime (when rescheduling)
  • reschedule_reason - string, max:500 (when rescheduling)

Status Transitions

Not all status transitions are allowed. The system validates transitions based on the current status.

General Updatable Fields

  • customer_id - UUID
  • location_id - UUID
  • service_id - UUID (links work order to a service from the service catalog)
  • category - Enum: scheduled, emergency, warranty, contract, inspection, installation, repair, delivery, consultation, follow_up, recall, upgrade
  • priority - Enum: low, normal, high, urgent, emergency, critical
  • source - Enum: customer_request, scheduled_maintenance, emergency_call, contract, inspection, internal, warranty_claim, follow_up, system_generated, mobile_app, web_portal, call_center
  • scheduled_start - datetime (Y-m-d H:i:s)
  • scheduled_end - datetime (Y-m-d H:i:s)
  • requested_completion_by - datetime
  • completion_percentage - integer, min:0, max:100
  • work_started_at - datetime
  • work_completed_at - datetime
  • special_instructions - string
  • completion_summary - string
  • primary_contact_id - UUID
  • customer_presence_required - boolean
  • customer_notification_sent - boolean
  • customer_notified_at - datetime
  • preferred_communication_methods - array
  • estimated_labor_cost - numeric
  • estimated_parts_cost - numeric
  • actual_labor_cost - numeric, min:0
  • actual_parts_cost - numeric, min:0
  • customer_signature_required - boolean
  • customer_signature_received - boolean
  • customer_signed_at - datetime
  • quality_check_required - boolean
  • quality_check_passed - boolean
  • quality_checked_by - UUID
  • quality_checked_at - datetime
  • customer_satisfaction_score - integer, min:1, max:5
  • customer_feedback - string
  • requires_follow_up - boolean
  • follow_up_date - date
  • follow_up_completed - boolean
  • warranty_applicable - boolean
  • warranty_days - integer
  • warranty_expires_at - date
  • assigned_supervisor_id - UUID
  • external_work_order_id - string
  • customer_po_number - string
  • contract_number - string
  • external_references - array
  • response_time_minutes - integer
  • resolution_time_minutes - integer
  • completed_on_time - boolean
  • completed_within_estimate - boolean
  • callback_count - integer
  • requires_manager_approval - boolean
  • approved_by - UUID
  • approved_at - datetime
  • approval_notes - string
  • risk_level - Enum: low, medium, high, critical
  • safety_incident_occurred - boolean
  • safety_requirements - array
  • permit_required - boolean
  • permit_number - string

Auto-Calculated Fields (do not send these)

  • estimated_total - Automatically calculated from estimated_labor_cost + estimated_parts_cost
  • actual_total - Automatically calculated from actual_labor_cost + actual_parts_cost
  • actual_duration_minutes - Automatically calculated from work_started_at and work_completed_at

Headers

{{tenant_key_name}}stringOptional

Request

This endpoint expects a multipart form.
tag_type_ids[]stringRequired

Optional: Tag type UUIDs to sync during update

Response

Successful response