> ## 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.

# Complete a task

> Complete a task

### Path parameters

<ParamField path="task_id" type="string" required>
  Work order task ID
</ParamField>

### Request body

`CompleteWorkOrderTaskRequest`

<ParamField body="actual_hours" type="string,null">
  Decimal actual hours as a string.
</ParamField>

### Responses

<ResponseField name="200" type="WorkOrderTaskResponse" />

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

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/work-orders/tasks/{task_id}/complete' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "actual_hours": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "actual_hours": null,
    "estimated_hours": null,
    "id": "string",
    "notes": null,
    "sequence": 1,
    "status": "string",
    "task_name": "string",
    "work_order_id": "string"
  }
  ```
</ResponseExample>
