Skip to main content
Start compliance checks

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.

Idempotency-Key
string

Optional protection for safely retrying a request after a timeout or lost response. Choose a unique value (for example, a UUID) for each action and reuse it with the same input when retrying. Omit it for a normal request.

Required string length: 1 - 200
Pattern: ^[\x21-\x7e]+$

Body

application/json
scope
object
required

agreements: agreement_ids, or every agreement filter matches (the whole collection, not a page), minus excluded_agreement_ids; at most 1,000. topics: the invoices behind some topics of one agreement, include_uncategorized adding its alerts without a topic; a pair is handled as a whole, so its alerts in other topics change too (other_topic_alert_count). retry: the failed or cancelled items of an agreement check, with mode again.

mode
enum<string>
default:outstanding

outstanding: only pairs (invoice–agreement or invoice–purchase order) without a completed check. again: completed pairs too, replacing their alerts; on an invoices scope it also checks each invoice for duplicates again, replacing its duplicate alerts.

Available options:
outstanding,
again
invoices
object

Which of the scope’s invoices to take: all (minus exclusions), a sample of ten, or a hand-picked set.

issued_from
string<date>

Only invoices issued on or after this date.

issued_through
string<date>

Only invoices issued on or before this date.

company_ids
string<uuid>[]

Only these workspace companies: their invoices under agreements covering them, as for a member with access to just those companies. Omit for every company the caller can access. An unknown or inaccessible company is 404.

Required array length: 1 - 1000 elements
preview
boolean
default:false

true: return what the command would do and its fingerprint, changing nothing.

fingerprint
string

The fingerprint of a preview. When sent, the command runs only if the selection still resolves to exactly what was previewed; omit it to act on the current state.

Required string length: 64

Response

With preview: true, the preview (CheckSelectionPreview). Otherwise a repeated Idempotency-Key: the original result, with Location naming its first workflow run.

options
object
required

What each check mode would run in this scope, whichever mode is selected.

fingerprint
string
required
sample_invoice_ids
string<uuid>[] | null
required
agreements
object[]
required
invoice_count
integer
required
check_count
integer
required
purchase_order_check_count
integer
required

Invoice–purchase order checks the selection runs, beside the agreement checks.

duplicate_check_count
integer
required

Invoices the selection checks for duplicates again: with mode again on an invoices scope, each of its invoices.

exceeds_limit
boolean
required
maximum_checks
integer
required
maximum_runs
integer
required
exclusions
object[]
required

Invoice–agreement pairs in scope that the selected mode leaves out, by reason.

other_topic_alert_count
integer
required

Replaced alerts that belong to topics outside a topic scope.