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

# Admin dashboard: live KPIs, punch-source split, 14-day

> Admin dashboard: live KPIs, punch-source split, 14-day trend, KYC, alerts, headcount



## OpenAPI

````yaml /api-reference/openapi.json get /api/dashboard
openapi: 3.1.0
info:
  title: ontime API
  description: APIs for ontime.v2
  version: 1.0.0
servers:
  - url: https://app.ontime.hosai.app
    description: Production
security:
  - apiKey: []
paths:
  /api/dashboard:
    get:
      tags:
        - Dashboard
      summary: 'Admin dashboard: live KPIs, punch-source split, 14-day'
      description: >-
        Admin dashboard: live KPIs, punch-source split, 14-day trend, KYC,
        alerts, headcount
      operationId: getApiDashboard
      parameters:
        - in: query
          name: date
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  date:
                    type: string
                  kpis:
                    type: object
                    properties:
                      expected:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      punchedIn:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      onTime:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      late:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      yetToPunch:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      noShow:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      onLeave:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      otHoursToday:
                        type: number
                    required:
                      - expected
                      - punchedIn
                      - onTime
                      - late
                      - yetToPunch
                      - noShow
                      - onLeave
                      - otHoursToday
                  byLocation:
                    type: array
                    items:
                      type: object
                      properties:
                        locationId:
                          anyOf:
                            - type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            - type: 'null'
                        name:
                          type: string
                        present:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        expected:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                      required:
                        - locationId
                        - name
                        - present
                        - expected
                  sources:
                    type: array
                    items:
                      type: object
                      properties:
                        source:
                          type: string
                          enum:
                            - MobileGPS
                            - SelfieGPS
                            - Biometric
                            - Web
                        count:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                      required:
                        - source
                        - count
                  kyc:
                    type: object
                    properties:
                      incompleteCount:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      totalActive:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      rows:
                        type: array
                        items:
                          type: object
                          properties:
                            employeeId:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            name:
                              type: string
                            code:
                              type: string
                            missing:
                              type: array
                              items:
                                type: string
                          required:
                            - employeeId
                            - name
                            - code
                            - missing
                    required:
                      - incompleteCount
                      - totalActive
                      - rows
                  trend:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                        present:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        late:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                      required:
                        - date
                        - present
                        - late
                  alerts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        kind:
                          type: string
                          enum:
                            - regAging
                            - deviceOffline
                            - payrollDeadline
                            - kycIncomplete
                            - newHire
                        tone:
                          type: string
                          enum:
                            - neutral
                            - accent
                            - ok
                            - warn
                            - bad
                            - info
                        title:
                          type: string
                        detail:
                          type: string
                        count:
                          anyOf:
                            - type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            - type: 'null'
                        to:
                          anyOf:
                            - type: string
                            - type: 'null'
                      required:
                        - id
                        - kind
                        - tone
                        - title
                        - detail
                        - count
                        - to
                  headcount:
                    type: object
                    properties:
                      total:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      active:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      onboarding:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      exited:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                    required:
                      - total
                      - active
                      - onboarding
                      - exited
                required:
                  - date
                  - kpis
                  - byLocation
                  - sources
                  - kyc
                  - trend
                  - alerts
                  - headcount
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: ont_ API key
      description: >-
        Issue keys in Settings → API. Send them as `Authorization: Bearer ont_…`
        (an `X-Api-Key: ont_…` header is also accepted). Session-cookie routes
        are used by the OnTime web apps and are shown for completeness.

````