Skip to main content
Get an approval rule

Authorizations

Authorization
string
header
required

Personal API key sent as a bearer token, together with X-Organization-Id. The key must have at least the access level the endpoint requires (read, write or admin).

Headers

X-Organization-Id
string

The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations.

Path Parameters

id
string<uuid>
required

Query Parameters

fields
string[]

Return only these fields; use dots for nested fields, such as approvers.user_id. id is always returned. Fields: id, name, subject, conditions, fallback, position, approvers, approver_teams, references, skipped_people, skipped_teams, created_at, updated_at, unassigned_invoices, skips.

include
enum<string>

skips: add skips, one entry per person and invoice the rule skipped, paged by skips_limit and skips_cursor.

Available options:
skips
skips_limit
integer
default:50
Required range: 1 <= x <= 1000
skips_cursor
string
Maximum string length: 4096

Response

The approval rule.

id
string<uuid>
required
name
string
required
subject
enum<string>
required

What the rule approves: invoice, or purchase_order for orders made in Watchdog before they open, and amendments that raise their commitment or change their supplier, buyer, currency or commitment basis. Fixed once the rule is created.

Available options:
invoice,
purchase_order
fallback
boolean
required

The fallback rule: who approves what no other rule of its subject gives approvers, at intake after the other rules, and when a waiting record loses its last approver. It has no conditions and matches every record, so a fallback for purchase orders makes every order made in Watchdog wait for approval. At most one per subject (WD-2930). Rules made as fallbacks before then may still have conditions and keep them.

position
integer
required

Where the rule stands in the organization's order, lowest first. Under the approval policy's single_rule, an invoice takes its approvers from the first rule that matches it, in that rule's steps. Otherwise every matching rule adds its approvers by step number, and someone several rules name takes the step of the first.

Required range: x >= 0
approvers
object[]
required
approver_teams
object[]
required

Teams that approve what the rule matches, by name.

references
object[]
required

Names of the companies, suppliers and recipients the conditions name.

skipped_people
object[]
required

People the rule names but did not add, once per person and reason, on invoices in Inbox or Needs approval, as of when each invoice arrived. Blocking reasons come first, then hand removals.

skipped_teams
object[]
required

Teams the rule names but did not add, on invoices in Inbox or Needs approval, as of when each invoice arrived, by name. Such an invoice gets the fallback rules' approvers, or none.

created_at
string<date-time>
required
updated_at
string<date-time>
required
conditions
any

A saved View filter, returned as stored for unrestricted callers; it may be null or no longer valid. A restricted caller receives null with filter_restricted=true when the definition contains unavailable references or cannot be safely read. To replace it, send a filter in the shape the View create and update requests accept.

unassigned_invoices
object

With include=skips: invoices in Inbox or Needs approval the rule skipped someone or a team on and that have no approvers, so nobody can approve them. Up to 100, by supplier and number; count gives the total.

skips
object

With include=skips: everyone the rule names but did not add as approver to an invoice it matches in Inbox or Needs approval, one entry per person and invoice, ordered by person, as of when the invoice arrived. Decided, held and deleted invoices are left out.