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

# Get Membership Analytics Groups

> Get groups for membership analytics based on groupBy parameter.



## OpenAPI

````yaml get /analytics/dashboards/memberships/groups/{group_by}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /analytics/dashboards/memberships/groups/{group_by}:
    get:
      tags:
        - provider
        - analytics
        - analytics
      summary: Get Membership Analytics Groups
      description: Get groups for membership analytics based on groupBy parameter.
      operationId: >-
        get_membership_analytics_groups_analytics_dashboards_memberships_groups__group_by__get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: group_by
          in: path
          required: true
          schema:
            type: string
            title: Group By
        - name: location_ids
          in: query
          required: false
          schema:
            items:
              type: string
            type: array
            title: Location Ids
            default: []
        - name: membership_ids
          in: query
          required: false
          schema:
            items:
              type: string
            type: array
            title: Membership Ids
            default: []
        - name: member_statuses
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
            default: []
            title: Member Statuses
        - name: sold_by_provider_ids
          in: query
          required: false
          schema:
            items:
              type: string
            type: array
            title: Sold By Provider Ids
            default: []
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Page
        - name: per_page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Per Page
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Sort By
        - name: sort_direction
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                enum:
                  - asc
                  - desc
              - type: 'null'
            title: Sort Direction
        - name: location_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Location Id
        - name: patient_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Patient Name
        - name: created_date_start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created Date Start
        - name: created_date_end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Created Date End
        - name: start_date_start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Start Date Start
        - name: start_date_end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Start Date End
        - name: next_billing_date_start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Next Billing Date Start
        - name: next_billing_date_end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Next Billing Date End
        - name: timezone
          in: query
          required: false
          schema:
            type: string
            default: UTC
            title: Timezone
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_get_membership_analytics_groups_analytics_dashboards_memberships_groups__group_by__get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_get_membership_analytics_groups_analytics_dashboards_memberships_groups__group_by__get:
      properties:
        membership_ids:
          items:
            type: string
          type: array
          title: Membership Ids
          default: []
        member_statuses:
          items:
            $ref: '#/components/schemas/MemberStatus'
          type: array
          title: Member Statuses
          default: []
        location_ids:
          items:
            type: string
          type: array
          title: Location Ids
          default: []
        sold_by_provider_ids:
          items:
            type: string
          type: array
          title: Sold By Provider Ids
          default: []
      type: object
      title: >-
        Body_get_membership_analytics_groups_analytics_dashboards_memberships_groups__group_by__get
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MemberStatus:
      type: string
      enum:
        - ACTIVE
        - EXPIRED
        - CANCELLED
        - DELINQUENT
        - FROZEN
      title: MemberStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````