---
title: "Order status counts"
method: GET
path: "/v1/orders/status-counts"
tags: ["Suppliers"]
---

# Order status counts

`GET /v1/orders/status-counts`

## Request

- Base URL: `https://api.officina.it`
- URL: `https://api.officina.it/v1/orders/status-counts`
- Auth: HTTP bearer

tab counters for the "Arrivi Merce" list. Counts respect the date
range and the free-text search (supplier narrowing is not applied to the
counts, web parity). The applied range is echoed in date_filter.

## Query parameters

- `from` string
- `preset` 'rel30' | 'rel90' | 'rel365' | 'year' | 'Q1' | 'Q2' | 'Q3' | 'Q4' | 'month' | 'custom' | 'all'
- `q` string
- `to` string

## Response `200`

success

- OrderStatusCounts: OrderStatusCounts backs the "Arrivi Merce" status tabs. Counts are scoped to the applied date range (echoed back in date_filter) and the free-text search, mirroring the web list's per-status tab counters.
  - `object` string, required: always "order_status_counts"
  - `pending` integer, required
  - `delivery` integer, required
  - `received` integer, required
  - `date_filter` DateFilter, required: The effective date range the server applied to a date-scoped list request, echoed on the list envelope so clients can render the active filter without re-deriving it. A request that sends no `from`/`to`/`preset` gets the default window, the last 12 months (`rel365`); nothing is carried over between requests. Relative presets are resolved here to concrete dates and roll forward over time.
    - `object` 'date_filter', required
    - `preset` 'rel30' | 'rel90' | 'rel365' | 'year' | 'Q1' | 'Q2' | 'Q3' | 'Q4' | 'month' | 'custom' | 'all', required: Effective selection label. Relative (`rel30`/`rel90`/`rel365`) and absolute (`year`/`Q1`-`Q4`/`month`/`custom`) carry `from`/`to`; `all` omits them.
    - `from` string, date: Inclusive lower bound (YYYY-MM-DD). Omitted when `preset` is `all`.
    - `to` string, date: Inclusive upper bound (YYYY-MM-DD). Omitted when `preset` is `all`.

## Other responses

- `401`: Missing, malformed, expired, or wrong-audience bearer token.
- `402`: The company has no active subscription, or its plan does not include API access. API access is included in the Business and Illimitato plans.
- `403`: The authenticated user lacks the required permission.
- `500`: Unhandled server error. Detail is logged, not exposed.

---

[API](https://skmtc.dev/officina/apis/officina-it-api.md) · [All operations](https://skmtc.dev/officina/apis/officina-it-api/llms.txt) · [OpenAPI document](https://skmtc.dev/officina/apis/officina-it-api/revisions/7da3fccfe551?raw)
