Saltar al contenido

approvalPolicies

Módulo Platform · 6 operaciones

List approval policy rows

GET/approval-policies

An approval policy with ordered steps. Returns a cursor page of approval policy rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.

Create an approval policy

POST/approval-policies

An approval policy with ordered steps. Creates an approval policy. 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 an approval policy

GET/approval-policies/{id}

An approval policy with ordered steps. Returns one approval policy with its `ETag`. A approval policy the caller may not see returns 404.

Update an approval policy

PATCH/approval-policies/{id}

An approval policy with ordered steps. 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 an approval policy

DELETE/approval-policies/{id}

An approval policy with ordered steps. Soft-deletes the approval policy: it moves to Trash and can be restored for its table's retention period.

Activate or retire an approval policy

POST/approval-policies/{id}/transitions

Moves a policy Draft to Active, Draft to Retired or Active to Retired with compare-and-set (app.transition_approval_policy). Activation needs a step (approval_policy_no_steps) and no other Active policy of the document type (approval_policy_active_exists). Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.