Skip to main content
GET
Count the company's orders

Authorizations

Authorization
string
header
required

Bearer token authentication. Accepts company tokens, partner tokens, public tokens, droplet installation tokens, and user_company tokens. The authenticated credential determines editor_type and editor_id on the resulting order-edit audit records — the payload never carries either field.

Query Parameters

filter[status]
enum<string>

Restrict to one order status. The sentinel all imposes no constraint and is equivalent to omitting the filter.

Available options:
all,
draft,
pending,
pending_review,
processing,
completed,
cancelled,
archived
filter[type]
enum<string>

Restrict to one order class.

Available options:
sample_order,
customer_order,
member_order,
enrollment_order,
autoship_order
filter[order_number]
string

Exact match on the human-facing order number.

filter[cart_source]
string

Restrict to orders whose originating cart carried this source value.

filter[cart_token]
string

Restrict to orders placed from the cart with this exact token. A token that matches no cart of the company returns no orders.

filter[customer_id]
integer

Restrict to one customer's orders, matched on either the owning member or a legacy customer id carried on order metadata.

filter[user_company_id]
integer

Restrict to orders a given rep holds volume credit on, addressed by legacy UserCompany id.

filter[subscription_id]
integer

Restrict to orders belonging to one subscription.

filter[country_isos]
string

Comma-separated ISO-2 country codes; matches the order's own country, not the shipping address.

filter[start_date]
string<date>

Inclusive lower bound on the effective sale date, as a calendar date resolved through filter[timezone].

filter[end_date]
string<date>

Inclusive upper bound on the effective sale date, as a calendar date resolved through filter[timezone].

filter[timezone]
string

IANA timezone used to resolve filter[start_date] and filter[end_date] to day boundaries, so a day means the caller's day. Defaults to UTC; Etc/Unknown is treated as absent. An unrecognised zone returns 422.

Response

The count, or null when it did not finish in time.

The number of orders matching the request's filters.

total_count
integer | null
required

Exact number of matching orders, or null when the count did not finish within the server's time limit.

Required range: x >= 0
calculated_at
string<date-time>
required

When this count was computed. A cached count keeps its original time.

status
integer
required

HTTP status code, repeated in the body (200 on success).

meta
object
required

Response metadata — request correlation fields.