Saltar al contenido

changeOrders

Módulo Finance · 6 operaciones

List change order rows

GET/change-orders

A change order. An unpriced change order cannot be stored at zero; its requester cannot price and approve it alone. Returns a cursor page of change order rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.

Create a change order

POST/change-orders

A change order. An unpriced change order cannot be stored at zero; its requester cannot price and approve it alone. Creates a change 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 change order

GET/change-orders/{id}

A change order. An unpriced change order cannot be stored at zero; its requester cannot price and approve it alone. Returns one change order with its `ETag`. A change order the caller may not see returns 404.

Update a change order

PATCH/change-orders/{id}

A change order. An unpriced change order cannot be stored at zero; its requester cannot price and approve it alone. 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.

Transition the change order state

POST/change-orders/{id}/transitions

Moves the change 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`.

Approve a change order

POST/change-orders/{id}/approve

Records an approval decision on the change order. Its requester cannot price and approve it alone, and an unpriced change order cannot be approved at zero. Spend authority and separation of duties are enforced in the approval RPC; a refusal returns 422 and names the rule. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.