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

# Get analytics chart data

> Returns time-series data for a chart. `chart_code` selects the metric; pass query
parameters to constrain the time range and segmentation.

Public chart codes (25 total) — see `enum` for the full machine-readable list:

- **Revenue**: `proceeds` (net), `sales` (gross), `refunds`, `refund-rate`, `arpu`, `arppu`.
- **Recurring revenue**: `mrr`, `arr`, `mrr-movement`, `arr-movement` (new / expansion / contraction / churn).
- **Subscriptions**: `active-subscriptions`, `new-subscriptions`, `paid-subscriptions-movement`, `subscriptions-overview`, `subscription-cancellation`.
- **Trials**: `free-trials`, `active-trials`, `trials-movement`, `trial-cancellation`, `trial-to-paid`.
- **Acquisition / conversion**: `users-overview`, `user-to-trial`, `user-to-paid`.
- **Back-compat aliases** (factory maps to canonical executor): `user-to-trial-conversion` = `user-to-trial`, `subscription-cancellation-rate` = `subscription-cancellation`.

Codes deferred to v4 api 2.0 (currently return 404): `cohort-revenue`,
`cohort-active-subscriptions`, `experiment-new-users`, `experiment-users-to-trials`,
`experiment-users-to-paid`, `refund-keeper`, `events`.

Segmentation codes (pass via `segmentation`) and filter attribute codes
(pass via `filter[<attribute>][]`) are discoverable from
`GET /v4/analytics/charts/{chart_code}/meta`.




## OpenAPI

````yaml /api-reference/rest-api-v4.yaml get /analytics/charts/{chart_code}
openapi: 3.0.3
info:
  title: Qonversion REST API v4
  version: '4.0'
  description: >-
    Qonversion REST API v4 follows REST standards. It has predictable
    resource-oriented URLs, accepts JSON-encoded request bodies, returns
    JSON-encoded responses, and uses standard HTTP response codes,
    authentication, and verbs.
servers:
  - url: https://api.qonversion.io/v4
    description: Production
security:
  - secretAuth: []
tags:
  - name: Users
    description: Retrieve Qonversion users
  - name: User Properties
    description: Manage user-level attributes
  - name: Identities
    description: Link Qonversion users to your own auth IDs
  - name: Entitlements
    description: Entitlement definitions and user grants
  - name: Purchases
    description: A user's purchase history
  - name: Products
    description: Products configured in the Qonversion dashboard
  - name: Customers
    description: Aggregated customer records, properties, permissions, and metrics
  - name: Segments
    description: Dynamic and system segments of users
  - name: Experiments
    description: Paywall and offering A/B experiments
  - name: Screens
    description: No-code paywall screens — CRUD, publish, analytics
  - name: Analytics
    description: Charts, cards, cohorts, LTV, and insights
  - name: Exports
    description: Asynchronous data exports
  - name: Events
    description: Event catalog
  - name: Scheduled Reports
    description: Recurring reports delivered to external destinations
  - name: Integrations
    description: Third-party integrations configuration
  - name: Automations
    description: Event-driven automations
  - name: Project Settings
    description: Project-level configuration, secret, and store credentials
paths:
  /analytics/charts/{chart_code}:
    get:
      tags:
        - Analytics
      summary: Get analytics chart data
      description: >
        Returns time-series data for a chart. `chart_code` selects the metric;
        pass query

        parameters to constrain the time range and segmentation.


        Public chart codes (25 total) — see `enum` for the full machine-readable
        list:


        - **Revenue**: `proceeds` (net), `sales` (gross), `refunds`,
        `refund-rate`, `arpu`, `arppu`.

        - **Recurring revenue**: `mrr`, `arr`, `mrr-movement`, `arr-movement`
        (new / expansion / contraction / churn).

        - **Subscriptions**: `active-subscriptions`, `new-subscriptions`,
        `paid-subscriptions-movement`, `subscriptions-overview`,
        `subscription-cancellation`.

        - **Trials**: `free-trials`, `active-trials`, `trials-movement`,
        `trial-cancellation`, `trial-to-paid`.

        - **Acquisition / conversion**: `users-overview`, `user-to-trial`,
        `user-to-paid`.

        - **Back-compat aliases** (factory maps to canonical executor):
        `user-to-trial-conversion` = `user-to-trial`,
        `subscription-cancellation-rate` = `subscription-cancellation`.


        Codes deferred to v4 api 2.0 (currently return 404): `cohort-revenue`,

        `cohort-active-subscriptions`, `experiment-new-users`,
        `experiment-users-to-trials`,

        `experiment-users-to-paid`, `refund-keeper`, `events`.


        Segmentation codes (pass via `segmentation`) and filter attribute codes

        (pass via `filter[<attribute>][]`) are discoverable from

        `GET /v4/analytics/charts/{chart_code}/meta`.
      operationId: v4GetAnalyticsChart
      parameters:
        - name: chart_code
          in: path
          required: true
          description: >-
            Chart code. Only the codes listed in the endpoint description are
            exposed publicly; others return 404.
          schema:
            type: string
            enum:
              - proceeds
              - active-subscriptions
              - paid-subscriptions-movement
              - users-overview
              - free-trials
              - active-trials
              - trials-movement
              - user-to-trial
              - trial-to-paid
              - user-to-paid
              - sales
              - refunds
              - refund-rate
              - arppu
              - arpu
              - trial-cancellation
              - subscription-cancellation
              - subscriptions-overview
              - new-subscriptions
              - mrr
              - arr
              - mrr-movement
              - arr-movement
              - user-to-trial-conversion
              - subscription-cancellation-rate
            maxLength: 64
          example: proceeds
        - name: from
          in: query
          required: false
          description: >-
            Start of the time range (Unix timestamp, seconds). Default is 7 days
            before `to`.
          schema:
            type: integer
            format: int64
          example: 1776171456
        - name: to
          in: query
          required: false
          description: >-
            End of the time range (Unix timestamp, seconds). Default is the
            current time.
          schema:
            type: integer
            format: int64
          example: 1776776256
        - name: unit
          in: query
          required: false
          description: >-
            Time bucket size. `hour` requires a short range; `month` is used for
            long-range trends.
          schema:
            type: string
            enum:
              - hour
              - day
              - week
              - month
            default: day
        - name: environment
          in: query
          required: false
          description: 'Environment: `0` = sandbox, `1` = production.'
          schema:
            type: integer
            enum:
              - 0
              - 1
            default: 1
        - name: max_series
          in: query
          required: false
          description: >-
            Upper bound on the number of segmentation series returned. Clamped
            to 0..500 on the upstream.
          schema:
            type: integer
            minimum: 0
            maximum: 500
            default: 50
        - name: segmentation
          in: query
          required: false
          description: >
            Attribute to split the chart into segments (e.g. `country`,
            `target_platform`,

            `product_id`). Not all charts support every segmentation — see
            `*/meta`.
          schema:
            type: string
          example: target_platform
        - name: currency
          in: query
          required: false
          description: >-
            Three-letter ISO 4217 currency code for monetary charts. Defaults to
            `USD`. The list of supported codes is `GET
            /v4/analytics/currencies`.
          schema:
            type: string
            pattern: ^[A-Z]{3}$
            default: USD
        - name: filter[<attribute>][]
          in: query
          required: false
          description: >
            Attribute-scoped filter (repeat the parameter once per value). Each
            attribute

            is **AND**ed with every other attribute; values within the same
            attribute are

            **OR**ed.


            Examples:
              * `filter[country][]=US&filter[country][]=GB` — US **or** UK
              * `filter[country][]=US&filter[target_platform][]=iOS` — US **and** iOS
              * `filter[product_id][]=premium_monthly&filter[product_id][]=premium_yearly`

            Attribute codes are stable across projects; their **value lists are

            project-scoped** and discoverable from the chart's `*/meta` response

            (`filter_conditions[].attribute` / `filter_conditions[].values[]`).
            Common

            attribute codes:


            | Group | Attribute codes |

            |-------|-----------------|

            | Product / store | `target_platform`, `country`, `product_id`,
            `purchase_currency` |

            | Device | `locale`, `model`, `os_version`, `app_version`,
            `sdk_version`, `device_id` |

            | Customer / ID | `user_id`, `q_user_id` |

            | Attribution | `media_source_name`, `campaign_name`, `ad_set_name`,
            `ad_name` |

            | Experiment | `experiment_uid`, `experiment_group_uid` |

            | Screen (chart-specific) | `screen_uid` |


            Scalar attributes (`user_id`, `q_user_id`, `device_id`) accept a
            single value;

            list attributes accept many. Up to 50 distinct attributes and 100
            values per

            attribute are accepted; the rest are silently dropped.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
      responses:
        '200':
          description: Chart data.
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-cache
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4AnalyticsChart'
              example:
                object: analytics_chart
                url: /v4/analytics/charts/proceeds
                code: proceeds
                from: 1776171456
                to: 1776776256
                unit: day
                environment: 1
                currency: USD
                measure: usd
                totalType: sum
                seriesRelation: partsOfWhole
                maxSeries: 50
                series:
                  - label: After refunds
                    total: 380276.24
                    totalPrev: 326882.25
                    data:
                      - start_time: 1776171456
                        value: 6163.49
                      - start_time: 1776257856
                        value: 5821.11
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '403':
          description: Insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '404':
          description: Chart not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '502':
          description: Upstream service failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
        '504':
          description: Upstream timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4Error'
      security:
        - secretAuth: []
components:
  schemas:
    V4AnalyticsChart:
      type: object
      required:
        - object
        - url
        - code
        - from
        - to
        - unit
        - environment
        - measure
        - totalType
        - seriesRelation
        - maxSeries
        - series
      properties:
        object:
          type: string
          enum:
            - analytics_chart
        url:
          type: string
          description: Canonical URL for this chart query.
        code:
          type: string
          description: Chart code, echoed from the request.
        from:
          type: integer
          format: int64
        to:
          type: integer
          format: int64
        unit:
          type: string
          enum:
            - hour
            - day
            - week
            - month
        environment:
          type: integer
          enum:
            - 0
            - 1
        currency:
          type: string
          description: ISO 4217 currency code used for monetary values.
        measure:
          type: string
          enum:
            - usd
            - count
            - percent
          description: Physical unit of `series[].data[].value`.
        totalType:
          type: string
          enum:
            - sum
            - wavg
          description: How `series[].total` is computed.
        seriesRelation:
          type: string
          enum:
            - partsOfWhole
            - independent
          description: >
            * `partsOfWhole` — series add up to a meaningful total (e.g. revenue
            by country).

            * `independent` — series are not directly comparable in sum.
        maxSeries:
          type: integer
          description: Max number of series the server may emit.
        horizontalLabelType:
          type: string
          description: Hint for the UI on how to format X-axis labels.
        segmentation:
          type: string
          nullable: true
          description: Segmentation dimension used, if any.
        summarySeries:
          $ref: '#/components/schemas/V4AnalyticsSeries'
          nullable: true
        series:
          type: array
          items:
            $ref: '#/components/schemas/V4AnalyticsSeries'
    V4Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
          properties:
            type:
              type: string
              enum:
                - request
                - resource
                - logical
                - internal
            code:
              type: string
              description: |
                Machine-readable snake_case error code. Examples include
                `invalid_data`, `invalid_request`, `invalid_product_id`,
                `not_found`, `already_exists`, `offering_already_exists`,
                `product_not_in_project`, `cannot_set_main_directly`,
                `cannot_demote_main`, `cannot_patch_experiment_variant`,
                `cannot_delete_experiment_variant`, and
                `cannot_setmain_experiment_variant`. Resource-specific codes
                are documented on the corresponding reference page.
            message:
              type: string
              description: Human-readable description. May change; do not parse.
            details:
              type: array
              nullable: true
              description: Per-field validation errors, present on 400 validation failures.
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
    V4AnalyticsSeries:
      type: object
      required:
        - label
        - data
      properties:
        label:
          type: string
          description: Series label (e.g. `"After refunds"` or a segment value).
        total:
          type: number
          format: double
          nullable: true
          description: Total across `data` for the current range.
        totalPrev:
          type: number
          format: double
          nullable: true
          description: Total across the previous equal-length range (for comparisons).
        totalWeight:
          type: number
          format: double
          nullable: true
          description: Weight of `total` — used for weighted-average totals.
        totalPrevWeight:
          type: number
          format: double
          nullable: true
        totalIgnoreInFinal:
          type: boolean
          nullable: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/V4AnalyticsSeriesDataPoint'
    V4AnalyticsSeriesDataPoint:
      type: object
      required:
        - start_time
        - value
      properties:
        start_time:
          type: integer
          format: int64
          description: Bucket start (Unix seconds).
        value:
          type: number
          format: double
          description: Metric value in the chart's `measure` unit.
  securitySchemes:
    secretAuth:
      type: http
      scheme: bearer
      bearerFormat: sk_…
      description: >-
        Bearer authentication using the project **Secret Key** (prefixed with
        `sk_`, or `test_sk_` for sandbox). All v4 public endpoints require the
        Secret Key — see [Authentication](/reference/v4/authentication). Never
        expose the Secret Key in client-side code.

````