POST /public-api/publicapi.v1.WorkOrder/CreateWorkOrder
customerId is always required. Without a flow, provide a nonblank title
and locationDataFieldId identifying a populated location field on that customer.
Use Prepare Work Order to discover
populated locations visible through the actor’s current Customer View. A field
definition alone does not prove the customer has a usable location value.
Public creation independently checks the resolved field against the actor’s
current Customer View, before querying whether it has a populated value. This
applies to both an explicit locationDataFieldId and a flow’s preferred
location. Hidden fields are rejected, even if their IDs are known. Preparation
is discovery, not a lasting authorization grant; visibility is checked again
at creation.
Title is limited to 200 characters, description to 20,000, and supplied manual
tasks to 500 with bodies of 1 through 20,000 characters each.
The actor needs orders write access and customer write access. Creating through
a flow additionally requires that the actor may start that flow.
Creates a customer work order, optionally through a work order flow from ListWorkOrderFlows, whose title, description, location, tasks and materials it starts with. Explicit title, description and location override the flow's; tasks are appended. Planning the work order is a separate step. This operation is not idempotent.
RequestCreateWorkOrderRequest
ResponseCreateWorkOrderResponse
CreateWorkOrderRequest
Field
Type
Description
customer_id
string
location_data_field_id
string
ID from PrepareWorkOrder. May be omitted when the flow's preferred field is populated on this customer. An explicit value overrides it.
title
string
Required without a flow title; omission takes the flow's title, or else a reference number.
description
string
tasks
repeated CreateWorkOrderTaskInput
work_order_flow_id
optional string
A flow from ListWorkOrderFlows. The work order starts with its content; the API key actor must be allowed to start the flow.
CreateWorkOrderResponse
Field
Type
work_order
WorkOrder
Related Types
CreateWorkOrderTaskInput
Field
Type
body
string
WorkOrder
Field
Type
Description
id
string
customer_id
string
title
string
description
string
status
string
created_at
int64
updated_at
int64
customer_reference_number
string
customer_title
string
total_tasks
int32
completed_tasks
int32
source_flow_id
optional string
The flow the work order was created through, when there was one.
A work order flow is a way this workspace makes work orders, such as an
installation, with the title, tasks (including the questions the werkbon asks),
advanced tasks and materials every such work order starts with. Discover the
flows the actor may start with List Work Order Flows:
{
"customerId": "<customer-id>",
"workOrderFlowId": "<work-order-flow-id>"
}
The work order starts with the flow’s current content. Omitted title and empty
description take the flow’s; an explicit title, description, or location
overrides them, and supplied manual tasks append to the flow’s tasks.
locationDataFieldId may be omitted only when the flow’s preferred field is
visible, usable, and populated on this customer; use preparation to check this
customer’s available locations. Creating through a flow does not plan the work
order, even for flows that book or queue it in the app. The response’s
sourceFlowId names the flow.
Arbitrary workflow, advanced-task, configuration JSON, and order-relinking inputs
are not exposed. Flows are set up in the app, not through the API.
The response contains workOrder; use Get Work Order
to inspect its tasks.
This operation is not idempotent. Do not blindly retry after a timeout.