Skip to main content
Get the AP flow statistics

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; use dots for nested fields, such as headline.untouched_until_approval. Fields: computed_at, timezone, organization_currency, period, from, through, previous_from, previous_through, bucket_days, headline, funnel, top_first_touch_stage, stages, trend.

period
enum<string>
default:30d

The last 7 or 30 days, 13 weeks or 52 weeks, ending the day before the figures were computed (yesterday before they ever were), in the organization’s timezone. Trend buckets are days, days, weeks and four-week blocks.

Available options:
7d,
30d,
13w,
52w
company_ids
string<uuid>[]

Only the invoices of these workspace companies. intake.stopped stays the whole workspace’s: a stopped document never became an invoice, so it has no company. Omit for every company the caller can access. An unknown or inaccessible company is 404.

Required array length: 1 - 1000 elements

Response

How the invoices moved through the AP flow in the period.

computed_at
string<date-time> | null
required

When the figures were rebuilt (every night); null until the organization has an invoice in them.

timezone
string
required
organization_currency
string
required
period
enum<string>
required
Available options:
7d,
30d,
13w,
52w
from
string
required

The period’s first day, in the organization’s timezone.

Pattern: ^\d{4}-\d{2}-\d{2}$
through
string
required

The period’s last day: the day before the figures were computed, or yesterday before they ever were.

Pattern: ^\d{4}-\d{2}-\d{2}$
previous_from
string
required
Pattern: ^\d{4}-\d{2}-\d{2}$
previous_through
string
required

The day before from.

Pattern: ^\d{4}-\d{2}-\d{2}$
bucket_days
integer
required

Days per trend bucket: 1, 7 or 28.

headline
object
required
funnel
object[]
required

The eight stages in flow order.

top_first_touch_stage
enum<string> | null
required

The stage before approval where the most decided invoices got their first touch, the earliest on a tie; null when no stage before approval touched one. Approval is left out: a person decides every invoice until the approval policy decides some.

Available options:
intake,
reading,
match,
checks,
coding,
validation,
null
stages
object
required
trend
object[]
required

Per bucket of bucket_days, oldest first, empty buckets included: invoices received in it, and the flow’s figures over the invoices decided in it.