# Update Employee Family

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /empeo/api/v1/employees/family:
    post:
      summary: Update Employee Family
      deprecated: false
      description: >-
        All fields that have tag 'Required' and 'Nullable' is mean that field
        required only when adding data, If update data that field is nullable
      tags:
        - empeo/Core HR/Employee
      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: object
              properties:
                employeeRefId:
                  type: string
                  description: Unique identifier for referring to employees (Employee No.)
                companyName:
                  type: string
                  description: Employee company name
                relationShipId:
                  type: integer
                  description: Relationship ID (can view in Get mastertypes API)
                  nullable: true
                name:
                  type: string
                  description: >-
                    First names of the family members associated with the
                    employee
                  nullable: true
                surname:
                  type: string
                  description: >-
                    Last names of the family members associated with the
                    employee
                  nullable: true
                dateOfBirth:
                  type: string
                  description: 'Family date of birth (format : YYYY-MM-DD)'
                  nullable: true
                nationalityId:
                  type: integer
                  description: Nationality ID (can view in Get mastertypes API)
                  nullable: true
                isStudy:
                  type: boolean
                  description: Status of education (Required only if update children data)
                  nullable: true
                religionId:
                  type: integer
                  description: Religion ID (can view in Get mastertypes API)
                  nullable: true
                familyRefNo:
                  type: string
                  description: >-
                    Employee family reference number for update (can view from
                    Get Employee List)
                contact:
                  type: string
                  description: Employee family contact number
                  nullable: true
                titleId:
                  type: integer
                  description: >-
                    Title of the family member (can view in Get name prefixes
                    API)
                  nullable: true
                RaceId:
                  type: integer
                  description: Race ID (can view in Get mastertypes API)
                  nullable: true
              required:
                - employeeRefId
                - companyName
                - name
                - surname
                - relationShipId
                - isStudy
                - familyRefNo
                - contact
              x-apidog-orders:
                - employeeRefId
                - companyName
                - familyRefNo
                - relationShipId
                - titleId
                - name
                - surname
                - dateOfBirth
                - nationalityId
                - religionId
                - RaceId
                - contact
                - isStudy
            example:
              employeeRefId: '23003'
              companyName: empeo Dev Test
              familyRefNo: 7812
              relationShipId: 130010
              title: 2
              name: John
              surname: Doe
              dateOfBirth: '1990-01-01'
              nationalityId: 500001
              ReligionId: 200003
              IsStudy: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
              example:
                statusCode: 200
                message: OK
                data:
                  message: Update successfully
                  result: true
          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/Employee
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-3846640-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: []

```
