# Get Shift Details

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /empeo/api/v1/shifts:
    get:
      summary: Get Shift Details
      deprecated: false
      description: ''
      tags:
        - empeo/Core HR/Shifts
      parameters:
        - name: CompanyName
          in: query
          description: The name of the company (null for get all shifts in tenant)
          required: false
          example: empeo dev test
          schema:
            type: string
        - name: Code
          in: query
          description: Shift code
          required: false
          example: IVE
          schema:
            type: string
        - name: ShiftName
          in: query
          description: Shift name
          required: false
          example: สำนักงาน
          schema:
            type: string
        - name: TakeRow
          in: query
          description: Total number of record to be retrieved (Default 50)
          required: true
          example: 10
          schema:
            type: integer
        - name: SkipRow
          in: query
          description: Start index of the record to be skipped
          required: true
          example: 0
          schema:
            type: integer
        - name: Authorization
          in: header
          description: Authorization credential utilized in API requests
          required: false
          example: '{{token}}'
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: Api subscription key get from the OpenAPI integration setting page
          required: false
          example: '{{subscription_key}}'
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: Response status code
                  message:
                    type: string
                    description: Response message
                  totals:
                    type: integer
                    description: Total number of data returned
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        shiftName:
                          type: string
                          description: Shift name
                        shiftName_EN:
                          type: string
                          description: Shift name (In English)
                        code:
                          type: string
                          description: Shift code
                        colorCode:
                          type: string
                          description: Shift color code
                          nullable: true
                        description:
                          type: string
                          description: Shift Description
                        isAllSite:
                          type: boolean
                          description: >-
                            Indicates whether the shift can apply to all
                            companies
                        isNightShift:
                          type: boolean
                          description: >-
                            Indicates whether the shift takes place during the
                            night hours. (e.g. 10 PM to 6 AM)
                        isDoubleShift:
                          type: boolean
                          description: >-
                            Indicates whether the shift is allow employee to
                            work more than 1 shift per day
                        minuteFlexible:
                          type: integer
                          description: >-
                            Amount of time (in minutes) of flexibility allowed
                            for the start and end times of the work period
                        minuteOfLate:
                          type: integer
                          description: Amount of time (in minutes) before count as late
                        minuteOfAbsence:
                          type: integer
                          description: Amount of time (in minutes) before count as absence
                        allowance:
                          type: integer
                          description: Shift allowance
                        holidayAllowance:
                          type: boolean
                          description: Shift holiday allowance
                        shiftDetails:
                          type: array
                          items:
                            type: object
                            properties:
                              dayOfWeek:
                                type: integer
                                description: >-
                                  Specific day of week (starting at 1 as monday
                                  to 6 as saturday, for sunday will be 0)
                              weekOfMonth:
                                type: integer
                                description: Specific week of month for this shift
                              startTime:
                                type: string
                                description: The specific time when a work shift begins
                              endTime:
                                type: string
                                description: The specific time when a work shift ends
                              breakStartTime:
                                type: string
                                description: >-
                                  The specific time when an employee’s scheduled
                                  break begins during a work shift.
                              breakEndTime:
                                type: string
                                description: >-
                                  The specific time when an employee’s scheduled
                                  break ends and they are expected to resume
                                  work.
                              otStartTime:
                                type: string
                                description: The specific time when overtime begins
                              otEndTime:
                                type: string
                                description: The specific time when overtime ends
                            required:
                              - dayOfWeek
                              - weekOfMonth
                              - startTime
                              - endTime
                              - breakStartTime
                              - breakEndTime
                              - otStartTime
                              - otEndTime
                            x-apidog-orders:
                              - dayOfWeek
                              - weekOfMonth
                              - startTime
                              - endTime
                              - breakStartTime
                              - breakEndTime
                              - otStartTime
                              - otEndTime
                          description: Shift details
                      required:
                        - shiftName
                        - shiftName_EN
                        - code
                        - colorCode
                        - description
                        - isAllSite
                        - isNightShift
                        - isDoubleShift
                        - minuteFlexible
                        - minuteOfLate
                        - minuteOfAbsence
                        - allowance
                        - holidayAllowance
                        - shiftDetails
                      x-apidog-orders:
                        - shiftName
                        - shiftName_EN
                        - code
                        - colorCode
                        - description
                        - isAllSite
                        - isNightShift
                        - isDoubleShift
                        - minuteFlexible
                        - minuteOfLate
                        - minuteOfAbsence
                        - allowance
                        - holidayAllowance
                        - shiftDetails
                      description: List of shifts
                    description: Data object
                required:
                  - statusCode
                  - message
                  - totals
                  - data
                x-apidog-orders:
                  - statusCode
                  - message
                  - totals
                  - data
          headers: {}
          x-apidog-name: Success
      security:
        - bearerAuth: []
          x-apidog:
            schemeGroups:
              - id: uyL_cJmK7q60QJZRTi5ot
                schemeIds:
                  - bearerAuth
            required: true
            use:
              id: uyL_cJmK7q60QJZRTi5ot
            scopes:
              uyL_cJmK7q60QJZRTi5ot:
                bearerAuth: []
      x-apidog-folder: empeo/Core HR/Shifts
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-10063190-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: ใส่ JWT Token ในรูปแบบ Bearer {token}
    bearer:
      type: bearer
      scheme: bearer
servers:
  - url: https://api.gofive.co.th
    description: Production
security:
  - bearerAuth: []
    x-apidog:
      schemeGroups:
        - id: uyL_cJmK7q60QJZRTi5ot
          schemeIds:
            - bearerAuth
      required: true
      use:
        id: uyL_cJmK7q60QJZRTi5ot
      scopes:
        uyL_cJmK7q60QJZRTi5ot:
          bearerAuth: []

```
