> ## 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.

# Shift template library + coverage/KPIs

> Shift template library + coverage/KPIs



## OpenAPI

````yaml /api-reference/openapi.json get /api/shifts
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/shifts:
    get:
      tags:
        - Shifts
      summary: Shift template library + coverage/KPIs
      description: Shift template library + coverage/KPIs
      operationId: getApiShifts
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          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)$
                        orgId:
                          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)$
                        code:
                          type: string
                          enum:
                            - G
                            - M
                            - E
                            - 'N'
                            - F
                        category:
                          type: string
                          enum:
                            - G
                            - M
                            - E
                            - 'N'
                            - F
                            - FL
                        sku:
                          anyOf:
                            - type: string
                            - type: 'null'
                        name:
                          type: string
                        type:
                          type: string
                          enum:
                            - fixed
                            - flexible
                            - rotational
                            - field
                            - custom
                        status:
                          type: string
                          enum:
                            - draft
                            - published
                        tags:
                          type: array
                          items:
                            type: string
                        allLocations:
                          type: boolean
                        locationIds:
                          type: array
                          items:
                            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)$
                        effectiveFrom:
                          anyOf:
                            - type: string
                            - type: 'null'
                        startTime:
                          type: string
                        endTime:
                          type: string
                        workingHours:
                          type: number
                        unpaidBreakMinutes:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        breakWindowStart:
                          anyOf:
                            - type: string
                            - type: 'null'
                        breakWindowEnd:
                          anyOf:
                            - type: string
                            - type: 'null'
                        gracePeriodMinutes:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        halfDayCutoffHours:
                          type: number
                        weeklyOff:
                          type: array
                          items:
                            type: string
                        autoCheckoutAfter:
                          anyOf:
                            - type: string
                            - type: 'null'
                        otEligibleAfterMinutes:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        otCapPerDayMinutes:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        otMultiplierWeekday:
                          type: number
                          exclusiveMinimum: 0
                          maximum: 10
                        otMultiplierHolidayOff:
                          type: number
                          exclusiveMinimum: 0
                          maximum: 10
                        otApprovalThresholdMinutes:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        workingDays:
                          anyOf:
                            - type: object
                              properties:
                                mon:
                                  type: boolean
                                tue:
                                  type: boolean
                                wed:
                                  type: boolean
                                thu:
                                  type: boolean
                                fri:
                                  type: boolean
                                sat:
                                  type: boolean
                                sun:
                                  type: boolean
                                secondSatOff:
                                  type: boolean
                                fourthSatOff:
                                  type: boolean
                                restrictedHolidays:
                                  type: boolean
                              required:
                                - mon
                                - tue
                                - wed
                                - thu
                                - fri
                                - sat
                                - sun
                                - secondSatOff
                                - fourthSatOff
                                - restrictedHolidays
                            - type: 'null'
                        punchSources:
                          anyOf:
                            - type: object
                              properties:
                                biometricOffice:
                                  type: object
                                  properties:
                                    enabled:
                                      type: boolean
                                    hint:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - enabled
                                    - hint
                                mobileGpsSelfie:
                                  type: object
                                  properties:
                                    enabled:
                                      type: boolean
                                    hint:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - enabled
                                    - hint
                                mobileOtpFallback:
                                  type: object
                                  properties:
                                    enabled:
                                      type: boolean
                                    hint:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - enabled
                                    - hint
                                webWfh:
                                  type: object
                                  properties:
                                    enabled:
                                      type: boolean
                                    hint:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - enabled
                                    - hint
                                qrKiosk:
                                  type: object
                                  properties:
                                    enabled:
                                      type: boolean
                                    hint:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - enabled
                                    - hint
                                managerMarked:
                                  type: object
                                  properties:
                                    enabled:
                                      type: boolean
                                    hint:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                  required:
                                    - enabled
                                    - hint
                              required:
                                - biometricOffice
                                - mobileGpsSelfie
                                - mobileOtpFallback
                                - webWfh
                                - qrKiosk
                                - managerMarked
                            - type: 'null'
                        lateDeduction:
                          anyOf:
                            - type: object
                              properties:
                                mode:
                                  type: string
                                  enum:
                                    - none
                                    - afterNLates
                                afterCount:
                                  anyOf:
                                    - type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                    - type: 'null'
                                fraction:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                              required:
                                - mode
                                - afterCount
                                - fraction
                            - type: 'null'
                        notifications:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                enum:
                                  - fiveMinBefore
                                  - lateBy10
                                  - missedPunchOut
                                  - otTriggered
                              label:
                                type: string
                              channelTarget:
                                type: string
                            required:
                              - key
                              - label
                              - channelTarget
                        assignedCount:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                      required:
                        - id
                        - orgId
                        - code
                        - category
                        - sku
                        - name
                        - type
                        - status
                        - tags
                        - allLocations
                        - locationIds
                        - effectiveFrom
                        - startTime
                        - endTime
                        - workingHours
                        - unpaidBreakMinutes
                        - breakWindowStart
                        - breakWindowEnd
                        - gracePeriodMinutes
                        - halfDayCutoffHours
                        - weeklyOff
                        - autoCheckoutAfter
                        - otEligibleAfterMinutes
                        - otCapPerDayMinutes
                        - otMultiplierWeekday
                        - otMultiplierHolidayOff
                        - otApprovalThresholdMinutes
                        - workingDays
                        - punchSources
                        - lateDeduction
                        - notifications
                        - assignedCount
                  total:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  kpis:
                    type: object
                    properties:
                      total:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      published:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      draft:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      employeesCovered:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      employeesUnassigned:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      avgWorkingHours:
                        type: number
                    required:
                      - total
                      - published
                      - draft
                      - employeesCovered
                      - employeesUnassigned
                      - avgWorkingHours
                  shiftLoadByCategory:
                    type: array
                    items:
                      type: object
                      properties:
                        category:
                          type: string
                          enum:
                            - G
                            - M
                            - E
                            - 'N'
                            - F
                            - FL
                        count:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                      required:
                        - category
                        - count
                  coverageByLocation:
                    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'
                        locationName:
                          type: string
                        total:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        byCategory:
                          type: array
                          items:
                            type: object
                            properties:
                              category:
                                type: string
                                enum:
                                  - G
                                  - M
                                  - E
                                  - 'N'
                                  - F
                                  - FL
                              count:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                            required:
                              - category
                              - count
                      required:
                        - locationId
                        - locationName
                        - total
                        - byCategory
                required:
                  - items
                  - total
                  - kpis
                  - shiftLoadByCategory
                  - coverageByLocation
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.

````