Skip to main content
Count agreements by status

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.

Query Parameters

fields
string[]

Return only these fields. Fields: draft, active, archived.

view_ids
string[]
ids
string<uuid>[]
renewal_action_kinds
enum<string>[]

The next renewal action. cancel_by: renews unless cancelled by the deadline; renew_by: ends unless renewed by it; automatic_notice: no expiration date, ends with the notice period, so no deadline; missing_details: no deadline can be computed; none: no renewal left.

Available options:
cancel_by,
renew_by,
automatic_notice,
missing_details,
none
renewal_deadline_from
string
Pattern: ^\d{4}-\d{2}-\d{2}$
renewal_deadline_through
string
Pattern: ^\d{4}-\d{2}-\d{2}$
upcoming_through
string

A renewal deadline or expiration date from today (organization's timezone) through this date: what must be cancelled, renewed or will end soon.

Pattern: ^\d{4}-\d{2}-\d{2}$

Agreement title or a supplier name.

Required string length: 1 - 200
statuses
enum<string>[]

draft: being set up; active: invoices are checked against it; archived: no longer checked. Says nothing about whether the term is in force: use valid_on for that.

Available options:
draft,
active,
archived
supplier_ids
string<uuid>[]
recipient_ids
string<uuid>[]

Includes agreements for any recipient.

company_ids
string<uuid>[]

Agreements that cover any of these companies. A shared agreement appears once, with its alert numbers and counts for those companies' invoices only.

Required array length: 1 - 1000 elements
tag_ids
string<uuid>[]
owner_user_ids
string[]

Case-sensitive.

Required string length: 1 - 200
Pattern: ^[A-Za-z0-9_-]+$
has_owner
boolean

false: agreements with no owner; true: agreements with an owner. Removing a member unassigns their agreements. Combined with owner_user_ids, false matches nothing.

auto_check_new_invoices
boolean

true: agreements whose new matching invoices are checked automatically; false: those checked only when someone runs a check.

has_alert_verdicts
enum<string>[]

At least one alert with any of these verdicts; with has_alert_credited, on the same alert.

Available options:
pending,
accepted,
dismissed,
skipped
has_alert_credited
boolean

At least one alert (not) credited.

review_status
enum<string>

to_review: at least one live alert still to review (pending). reviewed: live alerts, every one of them confirmed, a false alarm or unsure. Agreements without live alerts match neither.

Available options:
to_review,
reviewed
effective_from
string

Excludes agreements without one.

Pattern: ^\d{4}-\d{2}-\d{2}$
effective_through
string
Pattern: ^\d{4}-\d{2}-\d{2}$
expiration_from
string

Excludes agreements without one.

Pattern: ^\d{4}-\d{2}-\d{2}$
expiration_through
string
Pattern: ^\d{4}-\d{2}-\d{2}$
valid_on
string

In force on this date: effective on or before it and expiring on or after it. A missing date counts as open-ended.

Pattern: ^\d{4}-\d{2}-\d{2}$
join_operator
enum<string>

or combines only supplier_ids and tag_ids.

Available options:
and,
or
not
enum<string>[]

List filters to invert.

Available options:
statuses,
supplier_ids,
recipient_ids,
tag_ids,
owner_user_ids,
renewal_action_kinds

Response

Agreements per status.

draft
integer
required
Required range: x >= 0
active
integer
required
Required range: x >= 0
archived
integer
required
Required range: x >= 0