# Update Employee Shifts

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /empeo/api/v1/employees/shifts:
    post:
      summary: Update Employee Shifts
      deprecated: false
      description: ''
      tags:
        - empeo/Core HR/Shifts
      parameters:
        - name: Content-Type
          in: header
          description: 'Accepted value: application/json'
          required: true
          example: application/json
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: Api subscription key get from the OpenAPI integration setting page
          required: true
          example: WPe123a9RKbcfLQNSztr45
          schema:
            type: string
        - name: Authorization
          in: header
          description: Authorization credential utilized in API requests
          required: true
          example: bearer {token}
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  employeeRefId:
                    type: string
                    description: Employee no
                  shiftCode:
                    type: string
                    description: Shift code that want to assign to employee
                  DateFrom:
                    type: string
                    description: Date when an employee's shift is scheduled to begin
                  DateTo:
                    type: string
                    description: >-
                      Date when an employee's shift is scheduled to end
                      (Optional)
                  CompanyName:
                    type: string
                    description: Employee company name
                required:
                  - employeeRefId
                  - shiftCode
                  - DateFrom
                  - CompanyName
                x-apidog-orders:
                  - employeeRefId
                  - CompanyName
                  - shiftCode
                  - DateFrom
                  - DateTo
            example:
              - employeeRefId: I0006
                companyName: Accendio Solutions Ltd.
                shiftCode: IVE
                DateFrom: '2024-09-02T12:00:00.000+07:00'
                DateTo: '2024-09-13T12:00:00.000+07:00'
              - employeeRefId: I0003
                companyName: Accendio Solutions Ltd.
                shiftCode: IVE
                DateFrom: '2024-09-15T12:00:00.000+07:00'
              - employeeRefId: I0006
                companyName: Accendio Solutions Ltd.
                shiftCode: S1
                DateFrom: '2024-09-14T12:00:00.000+07:00'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: Response status code
                  message:
                    type: string
                    description: Response message
                required:
                  - statusCode
                  - message
                x-apidog-orders:
                  - statusCode
                  - message
              example:
                statusCode: 200
                message: บันทึกสำเร็จ
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                  message:
                    type: string
                required:
                  - statusCode
                  - message
                x-apidog-orders:
                  - statusCode
                  - message
              example:
                statusCode: 400
                message: No shift '' in this company.
          headers: {}
          x-apidog-name: Bad Request
      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-10068932-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: []

```
