Work Orders
Create and manage maintenance work orders with full lifecycle tracking.
Create a work order
POST /work-orders
Auth: Bearer JWT (admin, operator)
curl -X POST https://api.haltless.io/api/v1/work-orders \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"machine_id": "MACHINE_UUID",
"title": "Replace spindle bearings",
"description": "Main spindle bearings showing excessive vibration",
"priority": "high",
"assigned_to": "USER_UUID"
}'
Priority levels: low, medium, high, critical
List work orders
GET /work-orders
Auth: Bearer JWT (any role)
| Parameter | Type | Description |
|---|---|---|
machine_id | uuid | Filter by machine |
status | string | open, in_progress, completed, cancelled |
page | int | Page number |
page_size | int | Items per page |
Get a work order
GET /work-orders/{work_order_id}
Update a work order
PATCH /work-orders/{work_order_id}
Auth: Bearer JWT (admin, operator)
{
"status": "in_progress"
}
Delete a work order
DELETE /work-orders/{work_order_id}
Auth: Bearer JWT (admin, operator)
Work order comments
List comments
GET /work-orders/{work_order_id}/comments
Add a comment
POST /work-orders/{work_order_id}/comments
{"body": "Bearings ordered from supplier. Expected delivery: April 8."}
Work order status flow
open → in_progress → completed
↓ ↓
cancelled (can be signed off)
| Status | Description |
|---|---|
open | Created, not yet started |
in_progress | Work has begun |
completed | Work finished (eligible for sign-off) |
cancelled | Work order cancelled |