> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a work orders

> Create a work orders

### Request body

`CreateWorkOrderRequest`

<ParamField body="assigned_to" type="string,null" />

<ParamField body="bom_id" type="string,null" />

<ParamField body="notes" type="string,null" />

<ParamField body="priority" type="string,null">
  One of `low`, `normal`, `high`, `urgent`.
</ParamField>

<ParamField body="product_id" type="string" required />

<ParamField body="quantity_to_build" type="string" required>
  Decimal quantity as a string.
</ParamField>

<ParamField body="scheduled_end" type="string,null">
  RFC 3339 timestamp.
</ParamField>

<ParamField body="scheduled_start" type="string,null">
  RFC 3339 timestamp.
</ParamField>

<ParamField body="tasks" type="array,null" />

<ParamField body="work_center_id" type="string,null" />

### Responses

<ResponseField name="201" type="WorkOrderResponse" />

<ResponseField name="400" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/work-orders' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "assigned_to": null,
    "bom_id": null,
    "notes": null,
    "priority": null,
    "product_id": "string",
    "quantity_to_build": "string",
    "scheduled_end": null,
    "scheduled_start": null,
    "tasks": null,
    "work_center_id": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "bom_id": null,
    "created_at": "string",
    "id": "string",
    "notes": null,
    "priority": "string",
    "product_id": "string",
    "quantity_completed": "string",
    "quantity_to_build": "string",
    "status": "string",
    "work_order_number": "string"
  }
  ```
</ResponseExample>
