Skip to main content
Count purchase orders without totals

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 counts.draft. Fields: total_count, counts, awaiting_approval_count, with_invoices_count.

Order number, the other system's number (source.number) or title.

Required string length: 1 - 200
source_system
string

Only orders linked to this other system (source.system).

Required string length: 1 - 50
source_ids
string[]

Only orders with these IDs in their other system (source.id).

Required string length: 1 - 200
statuses
enum<string>[]
Available options:
draft,
open,
closed,
cancelled
awaiting_approval
boolean

true lists only orders waiting for approval, false only the others.

supplier_ids
string<uuid>[]
company_ids
string<uuid>[]

Only orders these workspace companies placed.

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

Recipient IDs: the legal entities that placed the orders.

owner_user_ids
string[]
Required string length: 1 - 200
Pattern: ^[A-Za-z0-9_-]+$
assigned
enum<string>

me: orders the caller owns, and orders whose pending approval request asks the caller to approve, by name or through a team they are in.

Available options:
me
agreement_ids
string[]
archived
boolean

true lists only archived orders; by default they are left out.

has_invoices
boolean

true lists only orders with an accepted invoice (billing.linked_invoices above 0), false only those without.

Response

Purchase order counts.

total_count
integer
required
Required range: x >= 0
counts
object
required

The counted orders per status.

awaiting_approval_count
integer
required

Of the counted orders, those waiting for approval, whatever their status.

Required range: x >= 0
with_invoices_count
integer
required

Of the counted orders, those with an accepted invoice, as has_invoices=true.

Required range: x >= 0