Read and Update Approval Workflows

Approval workflows — the rules that decide which journal entries need approving and who signs them off —
can now be read and updated through the API:

  • GET /approval-workflows — Lists every workflow in the organization, active and inactive, grouped by
    the kind of record they apply to and ordered by ascending priority within each group. Not paginated.
  • GET /approval-workflows/{approval_workflow_id} — Returns one workflow: the conditions that decide
    which entries it applies to, and the ordered layers of approvers that must sign off.
  • PUT /approval-workflows/{approval_workflow_id} — Replaces a workflow's definition. The whole
    definition is required. A workflow's type and whether it is active cannot be changed here. Send a
    condition's or layer's id back to keep it, or omit it to have a new one generated.

Conditions are carried in a condition_group with a logic operator, so combinations such as
A AND (B OR C) can be expressed as the feature becomes available. Today a workflow has a single group.

Updating a workflow does not affect entries that are already awaiting approval: an entry copies the
layers it needs when approval starts.

Applies to V4 only.