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

# List top clubs by membership

> Ranks clubs by active membership through the Portal API.

See the [Gateway API entry](/api-reference/gateway/analytics/list-top-clubs-by-membership) for the full description.



## OpenAPI

````yaml /openapi/kintra-app.json get /tenant/{tenantId}/analytics/top-clubs
openapi: 3.0.0
info:
  description: >-
    Tenant portal API for the Kintra loyalty platform. Requests are
    authenticated with an Auth0 bearer token and address a tenant by id in the
    path.
  title: Kintra Portal API
  version: 1.0.0
servers:
  - description: Production environment
    url: https://api.kintra.io/api/v1
security: []
paths:
  /tenant/{tenantId}/analytics/top-clubs:
    get:
      tags:
        - Analytics
      summary: List top clubs by membership
      description: >-
        Ranks clubs by active membership through the Portal API.


        See the [Gateway API
        entry](/api-reference/gateway/analytics/list-top-clubs-by-membership)
        for the full description.
      operationId: GetTenantAnalyticsTopClubs
      parameters:
        - in: path
          name: tenantId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiResponse_ITenantTopClubsAnalyticsResponseDto_
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Tenant not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Internal server error
      security:
        - auth0_jwt: []
components:
  schemas:
    ApiResponse_ITenantTopClubsAnalyticsResponseDto_:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/ITenantTopClubsAnalyticsResponseDto'
        errors:
          items:
            properties:
              message:
                type: string
              path:
                type: string
            required:
              - path
              - message
            type: object
          type: array
        message:
          type: string
        success:
          type: boolean
      required:
        - success
      type: object
    ApiResponse_null_:
      additionalProperties: false
      properties:
        data:
          enum:
            - null
          nullable: true
          type: number
        errors:
          items:
            properties:
              message:
                type: string
              path:
                type: string
            required:
              - path
              - message
            type: object
          type: array
        message:
          type: string
        success:
          type: boolean
      required:
        - success
      type: object
    ITenantTopClubsAnalyticsResponseDto:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/ITenantTopClubAnalyticsItemDto'
          type: array
        tenant_id:
          type: string
        total_active_tenant_customers:
          format: double
          type: number
      required:
        - tenant_id
        - total_active_tenant_customers
        - items
      type: object
    ITenantTopClubAnalyticsItemDto:
      additionalProperties: false
      description: >-
        Top clubs by active tenant-customer fan links (admin + tenant
        analytics).
      properties:
        active_fans_count:
          format: double
          type: number
        club:
          $ref: '#/components/schemas/IClubResponse'
        share_of_tenant_customers_percent:
          format: double
          type: number
      required:
        - club
        - active_fans_count
        - share_of_tenant_customers_percent
      type: object
    IClubResponse:
      additionalProperties: false
      description: JSON response for a row in `core.clubs`.
      properties:
        country_id:
          nullable: true
          type: string
        icon_url:
          nullable: true
          type: string
        id:
          type: string
        name:
          type: string
        slug:
          type: string
        sport_id:
          nullable: true
          type: string
        status:
          anyOf:
            - $ref: '#/components/schemas/ClubStatus'
            - type: string
      required:
        - id
        - name
        - slug
        - sport_id
        - country_id
        - icon_url
        - status
      type: object
    ClubStatus:
      description: Lifecycle status for reference rows in `core.clubs`.
      enum:
        - active
        - inactive
      type: string
  securitySchemes:
    auth0_jwt:
      bearerFormat: JWT
      description: Auth0 access token
      scheme: bearer
      type: http

````