> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanova.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate an analytics report

> POST /analytics/report/

Queues an asynchronous job that generates a scan-data and/or analytics report spanning a set of QR Codes, a tag, or a folder.

<Note>
  Requires a Management API key with `MANAGEMENT_API` (or `MANAGEMENT_API_SANDBOX`) quota — see the [Management API overview](/api-reference/management-api/overview) — plus the account's own `EXPORT_ANALYTICS_REPORT` quota and `ANALYTICS_CAN_EXPORT_REPORT` permission.
</Note>

<ParamField body="filter_type" type="string" required>
  What `filter_data` identifies: `qrcode`, `tag`, or `folder`.
</ParamField>

<ParamField body="filter_data" type="string" required>
  A JSON-encoded string identifying the target(s) — e.g. a JSON array of `qrid`s when `filter_type` is `qrcode`.
</ParamField>

<ParamField body="start_date" type="string" required>
  Start date (`YYYY-MM-DD`).
</ParamField>

<ParamField body="end_date" type="string" required>
  End date (`YYYY-MM-DD`).
</ParamField>

<ParamField body="report_type" type="string" default="both">
  `scan_data`, `analytics`, or `both`.
</ParamField>

<ParamField body="analytics_format" type="string" default="csv">
  File format for the analytics portion: `csv`, `xls`, `xlsx`, `png`, `jpeg`, or `pdf`.
</ParamField>

<ParamField body="scan_format" type="string" default="csv">
  File format for the scan-data portion: same options as `analytics_format`.
</ParamField>

<ParamField body="advance_filter" type="object">
  Optional additional JSON filter payload, layered on top of `filter_type`/`filter_data`.
</ParamField>

<ParamField body="exclude_bot_scan" type="boolean" default="false">
  Excludes scans identified as bot traffic from the report.
</ParamField>

<ParamField body="is_saved" type="boolean" default="false">
  Whether to keep this report as a reusable saved preset — see [Update a saved analytics report](/api-reference/management-api/analytics/report-update).
</ParamField>

<ParamField body="saved_name" type="string">
  A name for the saved preset, required if `is_saved` is `true`. Must be unique per account — a duplicate returns `400`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.scanova.io/analytics/report/' \
    --header 'Authorization: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "filter_type": "qrcode",
      "filter_data": "[\"Q07afe81aa0034c01\"]",
      "start_date": "2026-08-01",
      "end_date": "2026-08-31",
      "report_type": "both",
      "analytics_format": "xlsx",
      "scan_format": "csv"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": 59,
    "filter_type": "qrcode",
    "filter_data": "[\"Q07afe81aa0034c01\"]",
    "start_date": "2026-08-01",
    "end_date": "2026-08-31",
    "report_type": "both",
    "analytics_format": "xlsx",
    "scan_format": "csv",
    "status": "new",
    "report_file": null,
    "completed_on": null,
    "is_saved": false,
    "saved_name": null,
    "created": "2026-09-08T10:20:00Z",
    "requested_by_name": "Docs"
  }
  ```
</ResponseExample>

The call returns `201` immediately once the job is queued, with `status: "new"` — the report itself is generated in the background and the account is emailed on completion. Poll [List analytics reports](/api-reference/management-api/analytics/report-list) for `status` and `report_file`.

## Related

* [List analytics reports](/api-reference/management-api/analytics/report-list) — poll job status.
* [Update a saved analytics report](/api-reference/management-api/analytics/report-update) — rename or manage a saved preset.
* [Management API overview](/api-reference/management-api/overview) — the auth scheme and quota architecture this endpoint is part of.


## OpenAPI

````yaml api-reference/openapi/management-api.json POST /analytics/report/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    api.scanova.io (QR codes, folders, tags, leads, forms, analytics, plans,
    shared users & roles), plus the token-creation and usage-stats endpoints
    used to authenticate against it. Every path and request/response shape below
    was verified live against a real API key and the actual running backend
    (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://api.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /analytics/report/:
    post:
      summary: Generate an analytics report
      description: >-
        Queues an async job that generates a scan-data and/or analytics report
        for the given QR codes, tags, or folders. Returns immediately — poll
        [List analytics
        reports](/api-reference/management-api/analytics/report-list) for
        `status`.
      operationId: createAnalyticsReport
      requestBody:
        content:
          application/json:
            example:
              filter_type: qrcode
              filter_data: '["Q07afe81aa0034c01"]'
              start_date: '2026-08-01'
              end_date: '2026-08-31'
              report_type: both
              analytics_format: xlsx
              scan_format: csv
      responses:
        '201':
          description: Report job queued.
          content:
            application/json:
              example:
                id: 59
                filter_type: qrcode
                filter_data: '["Q07afe81aa0034c01"]'
                start_date: '2026-08-01'
                end_date: '2026-08-31'
                report_type: both
                analytics_format: xlsx
                scan_format: csv
                status: new
                report_file: null
                completed_on: null
                is_saved: false
                saved_name: null
                created: '2026-09-08T10:20:00Z'
                requested_by_name: Docs
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. api.scanova.io) — the same key sent to the
        regular API host will not authenticate.

````