> ## 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.

# Exportar la analítica de conversiones

> Exporta la analítica agregada del seguimiento de conversiones en formato CSV, XLS o XLSX, con filtros por código QR, categoría, usuario o intervalo de fechas.

## Parámetros de consulta

| Parámetro           | Tipo                  | Obligatorio | Descripción                                                                                                                                           |
| :------------------ | :-------------------- | :---------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`              | `string`              | No          | Secciones separadas por comas. Lo habitual: `count,trend,event_breakdown,site_breakdown,funnel,scan_overview,hybrid_funnel`.                          |
| `from`              | `string (YYYY-MM-DD)` | Sí          | Fecha de inicio, incluida.                                                                                                                            |
| `to`                | `string (YYYY-MM-DD)` | Sí          | Fecha de fin, incluida.                                                                                                                               |
| `file_format`       | `string`              | Sí          | Uno de: `csv`, `xls` o `xlsx`.                                                                                                                        |
| `sheet`             | `string`              | No          | Solo para CSV: clave de la hoja elegida. Ejemplos: `count`, `trend`, `event_breakdown`, `site_breakdown`, `funnel`, `hybrid_funnel`, `scan_overview`. |
| `all`               | `boolean`             | No          | Incluir todos los códigos QR del ámbito.                                                                                                              |
| `search`            | `string`              | No          | Valor de búsqueda que se usa con `all=true`.                                                                                                          |
| `category`          | `string`              | No          | Slugs de categoría separados por comas.                                                                                                               |
| `users`             | `string`              | No          | IDs de usuario separados por comas.                                                                                                                   |
| `conversion_events` | `string`              | No          | Claves de eventos de conversión separadas por comas.                                                                                                  |
| `funnel_steps`      | `string`              | No          | Claves de evento ordenadas y separadas por comas para calcular el embudo.                                                                             |

## Cuerpo de la petición

| Campo       | Tipo            | Obligatorio | Descripción                             |
| :---------- | :-------------- | :---------- | :-------------------------------------- |
| `filter_by` | `string`        | Sí          | Uno de: `qrid`, `id` o `tags`.          |
| `q`         | `array[string]` | Sí          | Valores que corresponden a `filter_by`. |

## Ejemplo

```bash theme={null}
curl -X POST "https://api.scanova.io/analytics/ct/export/?type=count,trend,event_breakdown,site_breakdown,funnel,scan_overview,hybrid_funnel&from=2026-03-03&to=2026-03-10&file_format=xlsx" \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filter_by": "qrid",
    "q": ["Q20a18d4af3e947a1"]
  }'
```


## OpenAPI

````yaml POST /analytics/ct/export/
openapi: 3.0.0
info:
  title: Scanova API - Analytics
  description: >-
    Analytics endpoints for retrieving QR code scan data, statistics, and
    exporting analytics reports. These endpoints provide comprehensive insights
    into QR code performance, user behavior, and geographic distribution.
  version: 1.0.0
servers:
  - url: https://api.scanova.io
    description: Scanova Management API Server
security:
  - apiKeyAuth: []
paths:
  /analytics/ct/export/:
    post:
      tags:
        - Analytics
      summary: Export Conversion Analytics
      description: Export aggregated conversion analytics in CSV/XLS/XLSX.
      parameters:
        - name: type
          in: query
          required: false
          schema:
            type: string
          description: Comma-separated analytics sections.
        - name: from
          in: query
          required: true
          schema:
            type: string
            format: date
        - name: to
          in: query
          required: true
          schema:
            type: string
            format: date
        - name: file_format
          in: query
          required: true
          schema:
            type: string
            enum:
              - csv
              - xls
              - xlsx
        - name: sheet
          in: query
          required: false
          schema:
            type: string
          description: CSV sheet key.
        - name: all
          in: query
          required: false
          schema:
            type: boolean
        - name: search
          in: query
          required: false
          schema:
            type: string
        - name: category
          in: query
          required: false
          schema:
            type: string
        - name: users
          in: query
          required: false
          schema:
            type: string
        - name: conversion_events
          in: query
          required: false
          schema:
            type: string
        - name: funnel_steps
          in: query
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - filter_by
                - q
              properties:
                filter_by:
                  type: string
                  enum:
                    - qrid
                    - id
                    - tags
                q:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: File generated successfully
          content:
            text/csv:
              schema:
                type: string
                format: binary
            application/vnd.ms-excel:
              schema:
                type: string
                format: binary
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: string
                format: binary
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Enter your API key directly in the Authorization
        header.

````