> ## 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 card data

> Returns the current value of a scalar dashboard card. Cards bundle several
related metrics (e.g. `realtime` returns today's trials, subscriptions,
in-app purchases and tracked revenue as a four-row table).

Valid public card codes:
  * `realtime` — today-so-far vs. yesterday counters
    (`trials_count`, `subscriptions_count`, `inapp_count`, `tracked_revenue`).

Additional codes are internal-only and return 404 when requested publicly.




## OpenAPI

````yaml /api-reference/rest-api-v4.yaml get /analytics/cards/{card_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/cards/{card_code}:
    get:
      tags:
        - Analytics
      summary: Get analytics card data
      description: >
        Returns the current value of a scalar dashboard card. Cards bundle
        several

        related metrics (e.g. `realtime` returns today's trials, subscriptions,

        in-app purchases and tracked revenue as a four-row table).


        Valid public card codes:
          * `realtime` — today-so-far vs. yesterday counters
            (`trials_count`, `subscriptions_count`, `inapp_count`, `tracked_revenue`).

        Additional codes are internal-only and return 404 when requested
        publicly.
      operationId: v4GetAnalyticsCard
      parameters:
        - name: card_code
          in: path
          required: true
          description: >-
            Card code. Only codes listed in the endpoint description are exposed
            publicly.
          schema:
            type: string
            enum:
              - realtime
            maxLength: 64
          example: realtime
        - name: from
          in: query
          required: false
          description: >-
            Start of the time range (Unix timestamp, seconds). Ignored by cards
            that report fixed windows (e.g. `realtime`).
          schema:
            type: integer
            format: int64
        - name: to
          in: query
          required: false
          description: >-
            End of the time range (Unix timestamp, seconds). Ignored by cards
            that report fixed windows.
          schema:
            type: integer
            format: int64
        - name: unit
          in: query
          required: false
          schema:
            type: string
            enum:
              - hour
              - day
              - week
              - month
        - 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
          schema:
            type: integer
            minimum: 0
            maximum: 500
        - name: segmentation
          in: query
          required: false
          schema:
            type: string
        - name: currency
          in: query
          required: false
          description: >-
            Three-letter ISO 4217 currency code. Affects monetary values like
            `tracked_revenue`.
          schema:
            type: string
            pattern: ^[A-Z]{3}$
            default: USD
        - name: filter[<attribute>][]
          in: query
          required: false
          description: Same schema as the charts endpoint.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
      responses:
        '200':
          description: Card data. `realtime` returns an array of one row per sub-metric.
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-cache
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4AnalyticsCard'
              example:
                - code: trials_count
                  value: 12
                  valuePrev: 7
                - code: subscriptions_count
                  value: 4
                  valuePrev: 3
                - code: inapp_count
                  value: 0
                  valuePrev: 1
                - code: tracked_revenue
                  value: 43.8
                  valuePrev: 21.99
        '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: Card 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:
    V4AnalyticsCard:
      type: array
      description: >
        Array of per-metric rows. Unlike chart/cohort endpoints, the card
        payload is

        an array rather than an `{object, url, ...}` envelope.
      items:
        $ref: '#/components/schemas/V4AnalyticsCardRow'
    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
    V4AnalyticsCardRow:
      type: object
      required:
        - code
        - value
      properties:
        code:
          type: string
          description: >-
            Sub-metric code (e.g. `trials_count`, `subscriptions_count`,
            `inapp_count`, `tracked_revenue`).
        value:
          type: number
          description: >-
            Value for the current window (integer for count metrics, decimal for
            revenue).
        valuePrev:
          type: number
          description: Value for the previous comparison window.
  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.

````