PendingReview → … transition — so
you can auto-approve the £9/mo SaaS subscription, force a second pair of eyes on anything over £500,
and always route a named supplier to a specific approver.
All requests below require the
x-dolfin-api-key and x-dolfin-organisation-id headers. See
Authentication.Where policies fit
Policies are evaluated insidePOST /bills/{id}/submit-review,
after the supplier is resolved. The winning policy’s action is the state the bill lands in:
| Action | Bill lands in | Use it for |
|---|---|---|
AutoApprove | Approved | Trusted, low-risk bills — skips review entirely, ready for payment. |
AlwaysReview | NeedsApproval | Bills that need a human — routed to the policy’s approvers (or any admin). |
AutoVoid | Voided | Hard stops — a blocked supplier, an unsupported currency. Terminal, non-recoverable. |
NeedsApproval — the safe default. Deleting every policy can never silently start auto-paying bills.
Concepts
| Field | What it is |
|---|---|
name | A human label shown on the bill it applies to ("High value bills"). |
priorityOrder | 0–1000, lower wins. Sorts the list and breaks ties between matching policies. |
active | false skips the policy at evaluation without deleting it — the soft off-switch. |
| Conditions | amountGte / amountLte (+ currency), supplierIds, supplierStanding. All optional; omitted means “don’t care”. |
action | AutoApprove, AlwaysReview, or AutoVoid. |
approverUserIds | For AlwaysReview: who to notify. Empty ⇒ no designated approver, any admin can action it in-app. |
Conditions
A bill matches a policy only if every set condition holds:amountGte/amountLte— inclusive bounds on the bill’stotalAmount. Set both for a closed range (amountGte: 0,amountLte: 300⇒ “£0–£300”). When either is set,currencyis required and scopes the policy to that currency — there’s no FX conversion, so a500 GBPpolicy simply won’t match a USD bill (add a separate USD policy for that).supplierIds— a list of supplier UUIDs. Empty ⇒ global (any supplier). Otherwise the policy is supplier-specific.supplierStanding—Any,New, orEstablished. A supplier isEstablishedonce any of their bills has been submitted for review before (even if it was rejected or is still pending);Newis a supplier you’ve never dealt with. The safe auto-approve combo readsamountLte+supplierStanding: Established.
How the winner is chosen
Exactly one policy wins — actions are never merged — so the outcome is always predictable:Supplier-specific beats global
If any policy that names this bill’s supplier matches, the winner comes from that set and global
policies are ignored.
AlwaysReview policy a lower priorityOrder than the broad AutoApprove one.
The decision is snapshotted onto the bill at submit time. Editing or deleting a policy never
retro-changes a bill that’s already in review — it keeps the policy name and reasoning it was evaluated
against.
Create a policy
POST /ap/approval-policies. This example auto-approves bills up to £300 from suppliers you’ve dealt with
before:
201 Created):
More examples
Force review on high-value bills, routed to the finance lead (lowerpriorityOrder, so it beats the
auto-approve rule above):
List, get, update, delete
GET /ap/approval-policies returns the policies sorted by priorityOrder. PUT replaces the policy in
place — send the full policy body, as with create. Prefer setting active: false over deleting when you
want to keep the rule around; deleting is safe either way, since bills already in review keep their
snapshot.
Seeing which policy applied
Once a bill has been submitted, its response carries the decision so you can show it in your UI:- Auto-approved —
state: "Approved"withapprovedBy: null(no human reviewed it) and the applied policy name and reasoning attached. - Routed for approval —
state: "NeedsApproval"with the resolved approver set the bill was routed to. - Auto-voided —
state: "Voided"withvoidedBy: nulland the reasoning as the void reason.
Voided bill is terminal — re-upload to start again. A Rejected bill (a human decision in Step 4 of
the AP quick start) can be reopened instead.
Next Steps
Quick Start - AP
The full bill lifecycle: import, review, submit, and approve.
Three-way Matching
Gate approval on purchase-order and delivery-note variances.