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

# Membership KPIs

> Return aggregate membership KPIs for the authenticated group(s) in a single request — no pagination. Yields membership count, unique members, new members, and totals per currency.

One call returns the aggregate figures — no paging.

**Date windows are half-open `[from, to)`.** Use `start_from`/`start_to` for the membership start date (and `end_from`/`end_to`, `created_from`/`created_to`).

`new_members` counts contacts whose first-ever membership (by start date) falls in the window.


## OpenAPI

````yaml /src/autogen/donation-membership-transaction-openapi3.0.yaml get /v1/memberships/kpi
openapi: 3.1.0
info:
  description: >-
    This OpenAPI 3.1 specification describes the public API of the Qomon
    platform. It is generated from the code and serves both as documentation for
    API consumers and as a contract for future development.
  title: Qomon API Reference
  version: 0.0.1
servers:
  - description: Production
    url: https://incoming.qomon.app
security:
  - bearerAuth: []
tags:
  - description: >-
      Create, read, update, and delete transaction bundles. A bundle is a single
      payment event grouping one or more transactions with optional donations
      and memberships.
    name: Transaction bundles
  - description: >-
      Read individual transactions (the payment legs of a bundle) with
      server-side filtering by date, amount, status, payment method and
      campaign, plus a contact's full transaction history.
    name: Transactions
  - description: >-
      List donations directly, filtered by donation date, contact, price or
      amount — without fetching whole bundles.
    name: Donations
  - description: >-
      List memberships directly, filtered by start/end/creation date, contact,
      price or amount.
    name: Memberships
  - description: >-
      Read-only configuration resources: transaction settings, statuses,
      donation and membership prices, and code campaigns.
    name: Settings and configuration
paths:
  /v1/memberships/kpi:
    get:
      tags:
        - Memberships
      summary: Membership KPIs
      description: >-
        Return aggregate membership KPIs for the authenticated group(s) in a
        single request — no pagination. Yields membership count, unique members,
        new members, and totals per currency.
      operationId: get-memberships-kpi
      parameters:
        - description: Only memberships starting on or after this date (inclusive).
          explode: false
          in: query
          name: start_from
          schema:
            description: Only memberships starting on or after this date (inclusive).
            format: date-time
            type: string
        - description: Only memberships starting strictly before this date (exclusive).
          explode: false
          in: query
          name: start_to
          schema:
            description: Only memberships starting strictly before this date (exclusive).
            format: date-time
            type: string
        - description: Only memberships ending on or after this date (inclusive).
          explode: false
          in: query
          name: end_from
          schema:
            description: Only memberships ending on or after this date (inclusive).
            format: date-time
            type: string
        - description: Only memberships ending strictly before this date (exclusive).
          explode: false
          in: query
          name: end_to
          schema:
            description: Only memberships ending strictly before this date (exclusive).
            format: date-time
            type: string
        - description: Only memberships created on or after this date (inclusive).
          explode: false
          in: query
          name: created_from
          schema:
            description: Only memberships created on or after this date (inclusive).
            format: date-time
            type: string
        - description: Only memberships created strictly before this date (exclusive).
          explode: false
          in: query
          name: created_to
          schema:
            description: Only memberships created strictly before this date (exclusive).
            format: date-time
            type: string
        - description: Minimum amount in cents (inclusive).
          explode: false
          in: query
          name: amount_min
          schema:
            description: Minimum amount in cents (inclusive).
            format: int64
            minimum: 0
            type: integer
        - description: Maximum amount in cents (inclusive).
          explode: false
          in: query
          name: amount_max
          schema:
            description: Maximum amount in cents (inclusive).
            format: int64
            minimum: 0
            type: integer
        - description: Filter by one or more contact IDs.
          explode: false
          in: query
          name: contact_id
          schema:
            description: Filter by one or more contact IDs.
            items:
              format: int64
              minimum: 0
              type: integer
            type:
              - array
              - 'null'
        - description: Filter by one or more membership price IDs.
          explode: false
          in: query
          name: membership_price_id
          schema:
            description: Filter by one or more membership price IDs.
            items:
              format: int64
              minimum: 0
              type: integer
            type:
              - array
              - 'null'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusEnvelopeMembershipsKpi'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
components:
  schemas:
    StatusEnvelopeMembershipsKpi:
      additionalProperties: true
      properties:
        data:
          $ref: '#/components/schemas/MembershipsKpi'
        status:
          description: Operation result.
          examples:
            - success
          type: string
      required:
        - status
        - data
      type: object
    ErrorModel:
      additionalProperties: true
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    MembershipsKpi:
      additionalProperties: true
      properties:
        membership_count:
          description: Total number of memberships matching the filter.
          format: int64
          type: integer
        new_members:
          description: >-
            Contacts whose first-ever membership (by start date) falls within
            the date window.
          format: int64
          type: integer
        totals_by_currency:
          description: Summed amount and count, per currency.
          items:
            $ref: '#/components/schemas/CurrencyTotal'
          type:
            - array
            - 'null'
        unique_members:
          description: Number of distinct contacts with a membership.
          format: int64
          type: integer
      required:
        - membership_count
        - unique_members
        - new_members
        - totals_by_currency
      type: object
    ErrorDetail:
      additionalProperties: true
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    CurrencyTotal:
      additionalProperties: true
      properties:
        count:
          description: Number of records in this currency.
          format: int64
          type: integer
        currency:
          description: Currency code (e.g. "eur", "usd"); empty when unset.
          type: string
        total_amount:
          description: Summed amount in cents.
          format: int64
          type: integer
      required:
        - currency
        - total_amount
        - count
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: opaque
      description: >-
        OAuth2 access token. Pass the token in the Authorization header as
        `Bearer <token>`. The token is looked up in Redis to resolve the caller
        identity.
      scheme: bearer
      type: http

````