---
title: "Aggregate scan stats for a whole group"
method: GET
path: "/api/v1/groups/{group}/stats"
tags: ["stats"]
---

# Aggregate scan stats for a whole group

`GET /api/v1/groups/{group}/stats`

## Request

- Base URL: `https://app.qrtap.kg`
- URL: `https://app.qrtap.kg/api/v1/groups/{group}/stats`
- Auth: HTTP bearer

Aggregates scans across every non-archived code with the given group, plus the number of codes in the group. Canonical groups: partner, equipment, event_menu, bag_insert, training.

## Path parameters

- `group` string, required

## Query parameters

- `from` string, date-time
- `to` string, date-time

## Response `200`

Aggregates across the group (empty aggregates when the group has no codes).

- GroupStats
  - `group` string, required
  - `codes` integer, required: Non-archived codes in the group.
  - `total` integer, required
  - `by_day` DayCount[], required
    - `day` string, required: YYYY-MM-DD.
    - `count` integer, required
  - `by_device` DeviceCount[], required
    - `device` string, required: Coarse device class: mobile | tablet | desktop | other | unknown.
    - `count` integer, required

## Other responses

- `400`: `invalid_group` — empty group segment.
- `401`: Missing, invalid or revoked API key.
- `429`: Limit exceeded — the request had no effect. `error` is `rate_limited` with `scope: "minute"` (a burst brake: wait `retry_after` seconds and continue) or `quota_exceeded` with `scope: "day"` (the workspace's daily quota, counted in UTC; it returns at `reset_at`, the next UTC midnight, and only a higher plan raises it before then).

---

[API](https://skmtc.dev/qrtap/apis/qrtap-rest-api.md) · [All operations](https://skmtc.dev/qrtap/apis/qrtap-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/qrtap/apis/qrtap-rest-api/revisions/8af17ac525bd?raw)
