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

# Daily stats

> This endpoint retrieves daily stats for a specific location and date.



## OpenAPI

````yaml https://app.teamcaredental.com/openapi-vendors.json get /locations/{location_id}/daily/stats
openapi: 3.1.0
info:
  title: TeamCare Vendor API
  version: 1.0.0
  description: Vendor APIs for integrating dental office data. HIPAA-compliant and opt-in.
servers:
  - url: https://app.teamcaredental.com/api/v1/vendors
security:
  - bearerAuth: []
paths:
  /locations/{location_id}/daily/stats:
    get:
      tags:
        - Daily
      summary: Daily stats
      description: This endpoint retrieves daily stats for a specific location and date.
      operationId: locations_resources_stats_daily_stats
      parameters:
        - name: location_id
          in: path
          required: true
          description: The ID of the location for which patients are to be retrieved.
          schema:
            type: string
        - name: date
          in: query
          required: false
          description: >-
            A parameter to specifiy the date to get data from, following the
            format **YYYY-MM-DD.**
          schema:
            type: string
            format: date
            example: '2022-05-05'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  tenant:
                    type: object
                    properties:
                      data:
                        type: object
                        properties:
                          id:
                            type: number
                          type:
                            type: string
                          attributes:
                            type: object
                            properties:
                              title:
                                type: string
                              third_party_id:
                                type: number
                              owner:
                                type: object
                                properties:
                                  data:
                                    type: object
                                    properties:
                                      id:
                                        type: number
                                      type:
                                        type: string
                                      attributes:
                                        type: object
                                        properties:
                                          name:
                                            type: string
                  goals:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          example: date
                        entityable_type:
                          type: string
                        entityable_id:
                          type: number
                        title:
                          type: string
                        role:
                          type: string
                        worked:
                          type: boolean
                        kpis:
                          type: object
                          properties:
                            data:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: number
                                  type:
                                    type: string
                                  attributes:
                                    type: object
                                    properties:
                                      goal_type:
                                        type: string
                                      goal_value:
                                        type: number
                                      actual_value:
                                        type: number
                                      variance_value:
                                        type: number
                                      variance_pct:
                                        type: number
                  pagy:
                    type: object
                    properties:
                      items:
                        type: number
                      count:
                        type: number
                      page:
                        type: number
                      next:
                        type: number
                      prev:
                        type: number
              example:
                tenant:
                  data:
                    id: 0
                    type: string
                    attributes:
                      title: string
                      third_party_id: 0
                      owner:
                        data:
                          id: 0
                          type: string
                          attributes:
                            name: string
                goals:
                  - date: date
                    entityable_type: string
                    entityable_id: 0
                    title: string
                    role: string
                    worked: false
                    kpis:
                      data:
                        - id: 0
                          type: string
                          attributes:
                            goal_type: string
                            goal_value: 0
                            actual_value: 0
                            variance_value: 0
                            variance_pct: 0
                pagy:
                  items: 0
                  count: 0
                  page: 0
                  next: 0
                  prev: 0
        '401':
          description: Missing, invalid or expired token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
              example:
                errors: not authorized
        '403':
          description: The credential may not access this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
              example:
                errors: access Denied
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
              example:
                errors: resource not found
        '422':
          description: The request could not be processed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
              example:
                errors: ...
        '429':
          description: >-
            Concurrency limit exceeded. The request was not executed; retry is
            safe.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
                  sync_type:
                    type: string
                    enum:
                      - initial
                      - incremental
                  max_concurrent_locations:
                    type: integer
                  active_location_ids:
                    type: array
                    items:
                      type: integer
                  retry_after_seconds:
                    type: integer
              example:
                errors: >-
                  Too many locations syncing concurrently. At most 5 locations
                  may have initial sync requests in flight at a time.
                sync_type: initial
                max_concurrent_locations: 5
                active_location_ids:
                  - 101
                  - 102
                  - 103
                  - 104
                  - 105
                retry_after_seconds: 1
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT returned by POST /auth/token. Valid for six hours.

````