API ReferenceWork Order
workOrder.create
Type: Mutation · Auth: Workspace-aware
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| ticketId | string | No | — | ID of the associated ticket |
| projectId | string | No | — | ID of the associated project |
| pmScheduleId | string | No | — | ID of the associated pm schedule |
| customerId | string | Yes | — | ID of the associated customer |
| siteId | string | Yes | — | ID of the associated site |
| workType | enum(service_call, installation, inspection, preventive_maintenance, emergency, other) | Yes | — | Work type |
| dispatchStatus | enum(unscheduled, scheduled, dispatched, en_route, on_site, completed, canceled) | Yes | "unscheduled" | Dispatch status |
| scheduledStart | string.date-time | No | — | Scheduled start |
| scheduledEnd | string.date-time | No | — | Scheduled end |
| technicianUserIds | string[] | No | — | Technician user ids |
| billableStatus | enum(not_billable, billable, invoiced) | Yes | "not_billable" | Billable status |
| laborStatus | enum(not_started, in_progress, completed) | Yes | "not_started" | Labor status |
| materialsStatus | enum(none_needed, pending, fulfilled) | Yes | "none_needed" | Materials status |
| customerSignoffStatus | enum(not_required, pending, signed, disputed) | Yes | "not_required" | Customer signoff status |
| workSummary | string | No | — | Work summary |
| recommendedFollowup | string | No | — | Recommended followup |
| priority | enum(low, medium, high, critical) | No | "medium" | Priority |
| estimatedLaborHours | number | No | — | Estimated labor hours |
| estimatedMaterialCost | number | No | — | Estimated material cost |
| checkInAt | string.date-time | No | — | Check in at |
| checkOutAt | string.date-time | No | — | Check out at |
| gpsCheckIn | object | No | — | Gps check in |
| gpsCheckOut | object | No | — | Gps check out |
| completionNotes | string | No | — | Completion notes |
| followUpRequired | boolean | Yes | false | Follow up required |
| isRevisit | boolean | Yes | false | Is revisit |
| requiredSkills | string[] | No | — | Required skills |
| workspaceId | string | No | — | ID of the associated workspace |
| visibilityMode | enum(global, workspace_local, shared) | Yes | "workspace_local" | Visibility mode |
Example
{
"ticketId": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"pmScheduleId": "550e8400-e29b-41d4-a716-446655440000",
"customerId": "550e8400-e29b-41d4-a716-446655440000",
"siteId": "550e8400-e29b-41d4-a716-446655440000",
"workType": "service_call",
"dispatchStatus": "unscheduled",
"billableStatus": "not_billable",
"laborStatus": "not_started",
"materialsStatus": "none_needed",
"customerSignoffStatus": "not_required",
"followUpRequired": false,
"isRevisit": false,
"visibilityMode": "global"
}