> ## 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 Provider Performance Grouped

> Get appointment data with optional grouping.

- group_by=none: Returns flat list of individual appointments with patient info
- group_by=provider/location/service/date/week/month: Returns grouped data with
  aggregated metrics and expandable appointment details



## OpenAPI

````yaml get /analytics/dashboards/provider-performance/grouped
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/provider-performance/grouped:
    get:
      tags:
        - provider
        - analytics
        - analytics
      summary: Get Provider Performance Grouped
      description: >-
        Get appointment data with optional grouping.


        - group_by=none: Returns flat list of individual appointments with
        patient info

        - group_by=provider/location/service/date/week/month: Returns grouped
        data with
          aggregated metrics and expandable appointment details
      operationId: >-
        get_provider_performance_grouped_analytics_dashboards_provider_performance_grouped_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: timezone
          in: query
          required: true
          schema:
            type: string
            description: Timezone for date grouping (e.g., 'America/New_York', 'UTC')
            title: Timezone
          description: Timezone for date grouping (e.g., 'America/New_York', 'UTC')
        - name: group_by
          in: query
          required: false
          schema:
            enum:
              - provider
              - location
              - service
              - date
              - week
              - month
              - none
            type: string
            default: none
            title: Group By
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Start Date
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: End Date
        - name: location_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Location Ids
        - name: provider_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Provider Ids
        - name: service_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Service Ids
        - name: statuses
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/EventStatus'
              - type: 'null'
            title: Statuses
        - name: sort_by
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - name
                  - patientName
                  - serviceCount
                  - totalValue
                  - avgValue
                  - isOnline
                  - isCancelled
                  - isNoShow
                  - isNewPatient
                  - uniquePatients
                  - appointmentDate
                  - cancellationReason
                  - cancellationDate
                type: string
              - type: 'null'
            description: Field to sort by
            title: Sort By
          description: Field to sort by
        - name: sort_direction
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            description: Sort direction
            default: desc
            title: Sort Direction
          description: Sort direction
        - name: patient_type
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - all
                  - new
                  - existing
                type: string
              - type: 'null'
            description: >-
              Filter by patient type: all, new (first appointment in range), or
              existing
            title: Patient Type
          description: >-
            Filter by patient type: all, new (first appointment in range), or
            existing
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PerformanceGroupedResponse'
                  - $ref: '#/components/schemas/PerformanceFlatResponse'
                title: >-
                  Response Get Provider Performance Grouped Analytics Dashboards
                  Provider Performance Grouped Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EventStatus:
      type: string
      enum:
        - PENDING
        - RESERVED
        - CONFIRMED
        - CANCELLED
        - COMPLETED
        - OVERRIDABLE
        - NO_SHOW
      title: EventStatus
    PerformanceGroupedResponse:
      properties:
        groups:
          items:
            $ref: '#/components/schemas/PerformanceGroup'
          type: array
          title: Groups
        grandTotals:
          $ref: '#/components/schemas/GrandTotals'
        totalCount:
          type: integer
          title: Totalcount
      type: object
      required:
        - groups
        - grandTotals
        - totalCount
      title: PerformanceGroupedResponse
      description: Response from the grouped endpoint.
    PerformanceFlatResponse:
      properties:
        rows:
          items:
            $ref: '#/components/schemas/AppointmentRow'
          type: array
          title: Rows
        grandTotals:
          $ref: '#/components/schemas/GrandTotals'
        totalCount:
          type: integer
          title: Totalcount
      type: object
      required:
        - rows
        - grandTotals
        - totalCount
      title: PerformanceFlatResponse
      description: Response when group_by=none (flat list of appointments).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PerformanceGroup:
      properties:
        key:
          type: string
          title: Key
        label:
          type: string
          title: Label
        count:
          type: integer
          title: Count
        summary:
          $ref: '#/components/schemas/GroupedSummaryRow'
        rows:
          items:
            $ref: '#/components/schemas/AppointmentRow'
          type: array
          title: Rows
      type: object
      required:
        - key
        - label
        - count
        - summary
        - rows
      title: PerformanceGroup
      description: A single group with summary and expandable appointment rows.
    GrandTotals:
      properties:
        appointmentCount:
          type: integer
          title: Appointmentcount
          default: 0
        serviceCount:
          type: integer
          title: Servicecount
          default: 0
        totalValue:
          type: integer
          title: Totalvalue
          default: 0
        avgValue:
          type: integer
          title: Avgvalue
          default: 0
        onlinePct:
          type: number
          title: Onlinepct
          default: 0
        cancelledPct:
          type: number
          title: Cancelledpct
          default: 0
        noShowPct:
          type: number
          title: Noshowpct
          default: 0
        newPatientsCount:
          type: integer
          title: Newpatientscount
          default: 0
        uniquePatientsCount:
          type: integer
          title: Uniquepatientscount
          default: 0
      type: object
      title: GrandTotals
      description: Grand totals across all data.
    AppointmentRow:
      properties:
        eventId:
          type: string
          title: Eventid
        patientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Patientid
        patientFirstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Patientfirstname
        patientLastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Patientlastname
        serviceCount:
          type: integer
          title: Servicecount
        totalValue:
          type: integer
          title: Totalvalue
        avgValue:
          type: integer
          title: Avgvalue
        isOnline:
          type: boolean
          title: Isonline
        isCancelled:
          type: boolean
          title: Iscancelled
        isNoShow:
          type: boolean
          title: Isnoshow
        isNewPatient:
          type: boolean
          title: Isnewpatient
        cancellationReason:
          anyOf:
            - type: string
            - type: 'null'
          title: Cancellationreason
        cancellationDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Cancellationdate
        appointmentDate:
          type: string
          title: Appointmentdate
        appointmentStart:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Appointmentstart
        appointmentEnd:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Appointmentend
        services:
          items:
            type: string
          type: array
          title: Services
      type: object
      required:
        - eventId
        - patientId
        - patientFirstName
        - patientLastName
        - serviceCount
        - totalValue
        - avgValue
        - isOnline
        - isCancelled
        - isNoShow
        - isNewPatient
        - cancellationReason
        - cancellationDate
        - appointmentDate
        - appointmentStart
        - appointmentEnd
        - services
      title: AppointmentRow
      description: Individual appointment row.
    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
    GroupedSummaryRow:
      properties:
        groupId:
          anyOf:
            - type: string
            - type: 'null'
          title: Groupid
        groupName:
          anyOf:
            - type: string
            - type: 'null'
          title: Groupname
        appointmentCount:
          type: integer
          title: Appointmentcount
        serviceCount:
          type: integer
          title: Servicecount
        totalValue:
          type: integer
          title: Totalvalue
        avgValue:
          type: integer
          title: Avgvalue
        onlinePct:
          type: number
          title: Onlinepct
        cancelledPct:
          type: number
          title: Cancelledpct
        noShowPct:
          type: number
          title: Noshowpct
        newPatientsCount:
          type: integer
          title: Newpatientscount
        uniquePatientsCount:
          type: integer
          title: Uniquepatientscount
      type: object
      required:
        - groupId
        - groupName
        - appointmentCount
        - serviceCount
        - totalValue
        - avgValue
        - onlinePct
        - cancelledPct
        - noShowPct
        - newPatientsCount
        - uniquePatientsCount
      title: GroupedSummaryRow
      description: Aggregated summary row for a group.

````