workOrders
Módulo Work · 6 operaciones
List work order rows
GET/work-orders
A work order issued against a record, open to bids. Returns a cursor page of work order rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.
Create a work order
POST/work-orders
A work order issued against a record, open to bids. Creates a work order. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.
Get a work order
GET/work-orders/{id}
A work order issued against a record, open to bids. Returns one work order with its `ETag`. A work order the caller may not see returns 404.
Update a work order
PATCH/work-orders/{id}
A work order issued against a record, open to bids. Updates the fields sent; omitted fields are unchanged. Requires `If-Match` with the current `ETag`: a stale tag returns 412 and a missing tag returns 428.
Delete a work order
DELETE/work-orders/{id}
A work order issued against a record, open to bids. Soft-deletes the work order: it moves to Trash and can be restored for its table's retention period.
Transition the work order state
POST/work-orders/{id}/transitions
Moves the work order lifecycle to another state through its transition RPC, which writes the transition ledger. Uses compare-and-set on `expected_state`; a disallowed transition returns a 422 refusal. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.