openapi: 3.0.1
info:
  title: 'prod-ImproverApiProxy 2022-06-30 19:04:07'
  description: Terraform managed resource
  version: 1
servers:
  - url: 'https://api.hrm-4human.com'
paths:
  /token:
    post:
      summary: Generate access token for API.
      tags:
        - Authentication
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - grant_type
                - client_id
                - client_secret
              properties:
                grant_type:
                  type: string
                  enum:
                    - client_credentials
                client_id:
                  type: string
                  pattern: \\S
                client_secret:
                  type: string
                  pattern: \\S
              additionalProperties: false
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - access_token
                  - token_type
                  - expires_in
                properties:
                  access_token:
                    type: string
                  token_type:
                    type: string
                  expires_in:
                    type: integer
              example:
                access_token: >-
                  eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
                token_type: bearer
                expires_in: 7200
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
  /orgstructure/units:
    post:
      summary: Create organization unit.
      tags:
        - Departments/Organization structure - units
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - unitTypeId
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                parentId:
                  type: integer
                  nullable: true
                unitId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 40
                  pattern: (^$|^\S$|^\S.*\S$)
                managerId:
                  nullable: true
                  type:
                    - integer
                selectedCompanyNumber:
                  nullable: true
                  type: string
                  pattern: (^$|^\S$|^\S.*\S$)
                customFields:
                  type: array
                  items:
                    type: object
                    required:
                      - fieldId
                      - valueId
                    properties:
                      fieldId:
                        type: string
                        format: uuid
                      valueId:
                        type: string
                        format: uuid
                unitTypeId:
                  type: string
                  format: uuid
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - INACTIVE
              additionalProperties: false
            example:
              name: 4Human
              unitId: unit005
              managerId: 1
              parentId: 1
              customFields:
                - fieldId: b9ee8cbc-cda5-11e9-8233-080027122a07
                  valueId: 1e8c0383-bd78-11eb-b065-0242ac150002
              unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
              status: ACTIVE
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  unitId:
                    type: string
                  company:
                    type: boolean
                  ancestors:
                    type: array
                    items:
                      type: integer
                  descendants:
                    type: array
                    items:
                      type: integer
                  leaderId:
                    type: integer
                    nullable: true
                  managerId:
                    type: integer
                    nullable: true
                  managerIdExt:
                    type: string
                    nullable: true
                  leader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                    required:
                      - id
                      - displayName
                      - picture
                  ancestorLeaderId:
                    type: integer
                  ancestorLeader:
                    type: object
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                    required:
                      - id
                      - displayName
                      - picture
                  hasCompany:
                    type: boolean
                  fteSum:
                    type: string
                  employeeCount:
                    type: integer
                  companyId:
                    type: integer
                    nullable: true
                  companyName:
                    type: string
                    nullable: true
                  organizationNumber:
                    type: string
                    nullable: true
                  companyCountry:
                    type: string
                    nullable: true
                  companyLogoUrl:
                    type: string
                    nullable: true
                  ancestorCompany:
                    type: object
                    nullable: true
                    properties:
                      companyCountry:
                        type: string
                        nullable: true
                      organizationNumber:
                        type: string
                        nullable: true
                      companyLogoUrl:
                        type: string
                        nullable: true
                  locations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        companyNumber:
                          type: string
                          nullable: true
                        name:
                          type: string
                          nullable: true
                        visitAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        postAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        externalId:
                          type: string
                          minLength: 1
                          maxLength: 40
                  selectedCompanyNumber:
                    type: string
                    nullable: true
                  readyForPaymentMessage:
                    type: string
                    nullable: true
                  status:
                    type: string
                  companyLocation:
                    type: object
                    nullable: true
                    properties:
                      companyNumber:
                        type: string
                        nullable: true
                      id:
                        type: integer
                      name:
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      postAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      externalId:
                        type: string
                        nullable: true
                  evolutionId:
                    type: integer
                    nullable: true
                  parentId:
                    type: integer
                    nullable: true
                  customFields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldId:
                          type: string
                          format: uuid
                        valueId:
                          type: string
                          nullable: true
                          format: uuid
                        fieldTemplateId:
                          type: string
                          nullable: true
                          format: uuid
                        field:
                          type: string
                        value:
                          type: string
                          nullable: true
                        fieldTemplateName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalId:
                          type: string
                          maxLength: 40
                        valueExternalId:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalId:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalName:
                          type: string
                          maxLength: 40
                        valueExternalName:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldCreatedAt:
                          type: string
                        fieldUpdatedAt:
                          type: string
                          nullable: true
                        valueCreatedAt:
                          type: string
                        valueUpdatedAt:
                          type: string
                        createdAt:
                          type: string
                          nullable: true
                        updatedAt:
                          type: string
                          nullable: true
                        hasCustomFields:
                          type: boolean
                  unitTypeId:
                    type: string
                    format: uuid
              example:
                id: 4
                name: Main Unit
                unitId: unit001
                company: true
                ancestors: []
                descendants:
                  - 5
                leaderId: 1
                leader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                ancestorLeaderId: 1
                ancestorLeader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                hasCompany: true
                fteSum: '0'
                employeeCount: 0
                companyId: 4
                companyName: Main Unit
                organizationNumber: '982247500'
                managerId: 1
                managerIdExt: '007'
                companyCountry: NOR
                companyLogoUrl: 'https://www.avatar.com/pic.png'
                ancestorCompany: null
                locations:
                  - id: 11
                    companyNumber: '007'
                    name: Big company
                    visitAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    postAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    externalId: '001'
                selectedCompanyNumber: '007'
                readyForPaymentMessage: Message
                status: ACTIVE
                companyLocation: null
                evolutionId: null
                parentId: 1
                customFields:
                  - fieldId: c799e3d9-e3b8-11eb-a317-0242ac12001f
                    valueId: 5adfe243-e3ba-11eb-a317-0242ac12001f
                    fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                    field: Country of origin
                    value: Norway
                    fieldTemplateName: Country
                    fieldExternalId: CountryField
                    valueExternalId: NOR
                    fieldTemplateExternalId: country
                    fieldExternalName: Country
                    valueExternalName: NOR
                    fieldTemplateExternalName: country_name
                    fieldCreatedAt: '2022-01-14T09:50:39+00:00'
                    fieldUpdatedAt: '2022-01-14T09:50:39+00:00'
                    valueCreatedAt: '2022-01-14T09:51:58+00:00'
                    valueUpdatedAt: '2022-01-14T09:51:58+00:00'
                    createdAt: '2022-01-14T10:00:28+00:00'
                    updatedAt: '2022-01-14T10:00:28+00:00'
                    hasCustomFields: true
                unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/orgstructure/units/{organizationUnitId}':
    get:
      summary: Get Organization Unit details by organizationUnitId.
      tags:
        - Departments/Organization structure - units
      parameters:
        - name: organizationUnitId
          in: path
          required: true
          schema:
            type: string
        - name: external
          description: Param determines if id of unit is external (unitId) or internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
        - name: withSoftDeleted
          description: Param determines if deleted unit should be fetched
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  unitId:
                    type: string
                  company:
                    type: boolean
                  ancestors:
                    type: array
                    items:
                      type: integer
                  descendants:
                    type: array
                    items:
                      type: integer
                  leaderId:
                    type: integer
                    nullable: true
                  managerId:
                    type: integer
                    nullable: true
                  managerIdExt:
                    type: string
                    nullable: true
                  leader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                    required:
                      - id
                      - displayName
                      - picture
                  ancestorLeaderId:
                    type: integer
                  ancestorLeader:
                    type: object
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                    required:
                      - id
                      - displayName
                      - picture
                  hasCompany:
                    type: boolean
                  fteSum:
                    type: string
                  employeeCount:
                    type: integer
                  companyId:
                    type: integer
                    nullable: true
                  companyName:
                    type: string
                    nullable: true
                  organizationNumber:
                    type: string
                    nullable: true
                  companyCountry:
                    type: string
                    nullable: true
                  companyLogoUrl:
                    type: string
                    nullable: true
                  ancestorCompany:
                    type: object
                    nullable: true
                    properties:
                      companyCountry:
                        type: string
                        nullable: true
                      organizationNumber:
                        type: string
                        nullable: true
                      companyLogoUrl:
                        type: string
                        nullable: true
                  locations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        companyNumber:
                          type: string
                          nullable: true
                        name:
                          type: string
                          nullable: true
                        visitAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        postAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        externalId:
                          type: string
                          minLength: 1
                          maxLength: 40
                  selectedCompanyNumber:
                    type: string
                    nullable: true
                  readyForPaymentMessage:
                    type: string
                    nullable: true
                  status:
                    type: string
                  companyLocation:
                    type: object
                    nullable: true
                    properties:
                      companyNumber:
                        type: string
                        nullable: true
                      id:
                        type: integer
                      name:
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      postAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      externalId:
                        type: string
                        nullable: true
                  evolutionId:
                    type: integer
                    nullable: true
                  parentId:
                    type: integer
                    nullable: true
                  customFields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldId:
                          type: string
                          format: uuid
                        valueId:
                          type: string
                          nullable: true
                          format: uuid
                        fieldTemplateId:
                          type: string
                          nullable: true
                          format: uuid
                        field:
                          type: string
                        value:
                          type: string
                          nullable: true
                        fieldTemplateName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalId:
                          type: string
                          maxLength: 40
                        valueExternalId:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalId:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalName:
                          type: string
                          maxLength: 40
                        valueExternalName:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldCreatedAt:
                          type: string
                        fieldUpdatedAt:
                          type: string
                          nullable: true
                        valueCreatedAt:
                          type: string
                        valueUpdatedAt:
                          type: string
                        createdAt:
                          type: string
                          nullable: true
                        updatedAt:
                          type: string
                          nullable: true
                        hasCustomFields:
                          type: boolean
                  unitTypeId:
                    type: string
                    format: uuid
              example:
                id: 4
                name: Main Unit
                unitId: unit001
                company: true
                ancestors: []
                descendants:
                  - 5
                leaderId: 1
                leader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                ancestorLeaderId: 1
                ancestorLeader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                hasCompany: true
                fteSum: '0'
                employeeCount: 0
                companyId: 4
                companyName: Main Unit
                organizationNumber: '982247500'
                managerId: 1
                managerIdExt: '007'
                companyCountry: NOR
                companyLogoUrl: 'https://www.avatar.com/pic.png'
                ancestorCompany: null
                locations:
                  - id: 11
                    companyNumber: '007'
                    name: Big company
                    visitAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    postAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    externalId: '001'
                selectedCompanyNumber: '007'
                readyForPaymentMessage: Message
                status: ACTIVE
                companyLocation: null
                evolutionId: null
                parentId: 1
                customFields:
                  - fieldId: c799e3d9-e3b8-11eb-a317-0242ac12001f
                    valueId: 5adfe243-e3ba-11eb-a317-0242ac12001f
                    fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                    field: Country of origin
                    value: Norway
                    fieldTemplateName: Country
                    fieldExternalId: CountryField
                    valueExternalId: NOR
                    fieldTemplateExternalId: country
                    fieldExternalName: Country
                    valueExternalName: NOR
                    fieldTemplateExternalName: country_name
                    fieldCreatedAt: '2022-01-14T09:50:39+00:00'
                    fieldUpdatedAt: '2022-01-14T09:50:39+00:00'
                    valueCreatedAt: '2022-01-14T09:51:58+00:00'
                    valueUpdatedAt: '2022-01-14T09:51:58+00:00'
                    createdAt: '2022-01-14T10:00:28+00:00'
                    updatedAt: '2022-01-14T10:00:28+00:00'
                    hasCustomFields: true
                unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit Organization Unit with given organizationUnitId.
      tags:
        - Departments/Organization structure - units
      parameters:
        - name: organizationUnitId
          in: path
          required: true
          schema:
            type: string
        - name: external
          description: Param determines if id of unit is external (unitId) or internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      requestBody:
        content:
          application/json:
            schema:
              required:
                - name
                - unitId
                - unitTypeId
              type: object
              properties:
                name:
                  maxLength: 255
                  minLength: 1
                  pattern: (^$|^\S$|^\S.*\S$)
                  type: string
                parentId:
                  type: integer
                  nullable: true
                unitId:
                  maxLength: 40
                  minLength: 1
                  pattern: (^$|^\S$|^\S.*\S$)
                  type: string
                managerId:
                  type: integer
                  nullable: true
                customFields:
                  type: array
                  items:
                    type: object
                    required:
                      - fieldId
                      - valueId
                    properties:
                      fieldId:
                        type: string
                        format: uuid
                      valueId:
                        type: string
                        format: uuid
                unitTypeId:
                  type: string
                  format: uuid
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - INACTIVE
            example:
              name: Main Unit
              unitId: unit002
              managerId: 1
              parentId: 1
              customFields:
                - fieldId: b9ee8cbc-cda5-11e9-8233-080027122a07
                  valueId: 1e8c0383-bd78-11eb-b065-0242ac150002
              unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
              status: ACTIVE
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  unitId:
                    type: string
                  company:
                    type: boolean
                  ancestors:
                    type: array
                    items:
                      type: integer
                  descendants:
                    type: array
                    items:
                      type: integer
                  leaderId:
                    type: integer
                    nullable: true
                  managerId:
                    type: integer
                    nullable: true
                  managerIdExt:
                    type: string
                    nullable: true
                  leader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                    required:
                      - id
                      - displayName
                      - picture
                  ancestorLeaderId:
                    type: integer
                  ancestorLeader:
                    type: object
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                    required:
                      - id
                      - displayName
                      - picture
                  hasCompany:
                    type: boolean
                  fteSum:
                    type: string
                  employeeCount:
                    type: integer
                  companyId:
                    type: integer
                    nullable: true
                  companyName:
                    type: string
                    nullable: true
                  organizationNumber:
                    type: string
                    nullable: true
                  companyCountry:
                    type: string
                    nullable: true
                  companyLogoUrl:
                    type: string
                    nullable: true
                  ancestorCompany:
                    type: object
                    nullable: true
                    properties:
                      companyCountry:
                        type: string
                        nullable: true
                      organizationNumber:
                        type: string
                        nullable: true
                      companyLogoUrl:
                        type: string
                        nullable: true
                  locations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        companyNumber:
                          type: string
                          nullable: true
                        name:
                          type: string
                          nullable: true
                        visitAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        postAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        externalId:
                          type: string
                          minLength: 1
                          maxLength: 40
                  selectedCompanyNumber:
                    type: string
                    nullable: true
                  readyForPaymentMessage:
                    type: string
                    nullable: true
                  status:
                    type: string
                  companyLocation:
                    type: object
                    nullable: true
                    properties:
                      companyNumber:
                        type: string
                        nullable: true
                      id:
                        type: integer
                      name:
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      postAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      externalId:
                        type: string
                        nullable: true
                  evolutionId:
                    type: integer
                    nullable: true
                  parentId:
                    type: integer
                    nullable: true
                  customFields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldId:
                          type: string
                          format: uuid
                        valueId:
                          type: string
                          nullable: true
                          format: uuid
                        fieldTemplateId:
                          type: string
                          nullable: true
                          format: uuid
                        field:
                          type: string
                        value:
                          type: string
                          nullable: true
                        fieldTemplateName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalId:
                          type: string
                          maxLength: 40
                        valueExternalId:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalId:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalName:
                          type: string
                          maxLength: 40
                        valueExternalName:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldCreatedAt:
                          type: string
                        fieldUpdatedAt:
                          type: string
                          nullable: true
                        valueCreatedAt:
                          type: string
                        valueUpdatedAt:
                          type: string
                        createdAt:
                          type: string
                          nullable: true
                        updatedAt:
                          type: string
                          nullable: true
                        hasCustomFields:
                          type: boolean
                  unitTypeId:
                    type: string
                    format: uuid
              example:
                id: 4
                name: Main Unit
                unitId: unit001
                company: true
                ancestors: []
                descendants:
                  - 5
                leaderId: 1
                leader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                ancestorLeaderId: 1
                ancestorLeader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                hasCompany: true
                fteSum: '0'
                employeeCount: 0
                companyId: 4
                companyName: Main Unit
                organizationNumber: '982247500'
                managerId: 1
                managerIdExt: '007'
                companyCountry: NOR
                companyLogoUrl: 'https://www.avatar.com/pic.png'
                ancestorCompany: null
                locations:
                  - id: 11
                    companyNumber: '007'
                    name: Big company
                    visitAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    postAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    externalId: '001'
                selectedCompanyNumber: '007'
                readyForPaymentMessage: Message
                status: ACTIVE
                companyLocation: null
                evolutionId: null
                parentId: 1
                customFields:
                  - fieldId: c799e3d9-e3b8-11eb-a317-0242ac12001f
                    valueId: 5adfe243-e3ba-11eb-a317-0242ac12001f
                    fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                    field: Country of origin
                    value: Norway
                    fieldTemplateName: Country
                    fieldExternalId: CountryField
                    valueExternalId: NOR
                    fieldTemplateExternalId: country
                    fieldExternalName: Country
                    valueExternalName: NOR
                    fieldTemplateExternalName: country_name
                    fieldCreatedAt: '2022-01-14T09:50:39+00:00'
                    fieldUpdatedAt: '2022-01-14T09:50:39+00:00'
                    valueCreatedAt: '2022-01-14T09:51:58+00:00'
                    valueUpdatedAt: '2022-01-14T09:51:58+00:00'
                    createdAt: '2022-01-14T10:00:28+00:00'
                    updatedAt: '2022-01-14T10:00:28+00:00'
                    hasCustomFields: true
                unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of Organization Unit with given organizationUnitId.
      tags:
        - Departments/Organization structure - units
      parameters:
        - name: organizationUnitId
          in: path
          schema:
            type: string
          required: true
        - name: external
          description: Param determines if id of unit is external (unitId) or internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - unitId
                - name
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                unitId:
                  type: string
                  minLength: 1
                  maxLength: 40
                  pattern: (^$|^\S$|^\S.*\S$)
                managerId:
                  type: integer
                  nullable: true
                parentId:
                  type: integer
                  nullable: true
                selectedCompanyNumber:
                  type: string
                  nullable: true
                  pattern: (^$|^\S$|^\S.*\S$)
                customFields:
                  type: array
                  items:
                    type: object
                    properties:
                      fieldId:
                        type: string
                        format: uuid
                      valueId:
                        type: string
                        format: uuid
                        nullable: true
                    additionalProperties: false
                unitTypeId:
                  type: string
                  format: uuid
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - INACTIVE
              additionalProperties: false
            example:
              name: 4Human Hrm
              unitId: D0001
              managerId: 1
              parentId: 1
              selectedCompanyNumber: '007'
              customFields:
                - fieldId: c799e3d9-e3b8-11eb-a317-0242ac12001f
                  valueId: 5adfe243-e3ba-11eb-a317-0242ac12001f
                - fieldId: ae94511b-a391-11ec-b67d-02012b4602c5
                  valueId: null
              unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
              status: ACTIVE
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  unitId:
                    type: string
                  company:
                    type: boolean
                  ancestors:
                    type: array
                    items:
                      type: integer
                  descendants:
                    type: array
                    items:
                      type: integer
                  leaderId:
                    type: integer
                    nullable: true
                  managerId:
                    type: integer
                    nullable: true
                  managerIdExt:
                    type: string
                    nullable: true
                  leader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                    required:
                      - id
                      - displayName
                      - picture
                  ancestorLeaderId:
                    type: integer
                  ancestorLeader:
                    type: object
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                    required:
                      - id
                      - displayName
                      - picture
                  hasCompany:
                    type: boolean
                  fteSum:
                    type: string
                  employeeCount:
                    type: integer
                  companyId:
                    type: integer
                    nullable: true
                  companyName:
                    type: string
                    nullable: true
                  organizationNumber:
                    type: string
                    nullable: true
                  companyCountry:
                    type: string
                    nullable: true
                  companyLogoUrl:
                    type: string
                    nullable: true
                  ancestorCompany:
                    type: object
                    nullable: true
                    properties:
                      companyCountry:
                        type: string
                        nullable: true
                      organizationNumber:
                        type: string
                        nullable: true
                      companyLogoUrl:
                        type: string
                        nullable: true
                  locations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        companyNumber:
                          type: string
                          nullable: true
                        name:
                          type: string
                          nullable: true
                        visitAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        postAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        externalId:
                          type: string
                          minLength: 1
                          maxLength: 40
                  selectedCompanyNumber:
                    type: string
                    nullable: true
                  readyForPaymentMessage:
                    type: string
                    nullable: true
                  status:
                    type: string
                  companyLocation:
                    type: object
                    nullable: true
                    properties:
                      companyNumber:
                        type: string
                        nullable: true
                      id:
                        type: integer
                      name:
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      postAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      externalId:
                        type: string
                        nullable: true
                  evolutionId:
                    type: integer
                    nullable: true
                  parentId:
                    type: integer
                    nullable: true
                  customFields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldId:
                          type: string
                          format: uuid
                        valueId:
                          type: string
                          nullable: true
                          format: uuid
                        fieldTemplateId:
                          type: string
                          nullable: true
                          format: uuid
                        field:
                          type: string
                        value:
                          type: string
                          nullable: true
                        fieldTemplateName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalId:
                          type: string
                          maxLength: 40
                        valueExternalId:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalId:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalName:
                          type: string
                          maxLength: 40
                        valueExternalName:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldCreatedAt:
                          type: string
                        fieldUpdatedAt:
                          type: string
                          nullable: true
                        valueCreatedAt:
                          type: string
                        valueUpdatedAt:
                          type: string
                        createdAt:
                          type: string
                          nullable: true
                        updatedAt:
                          type: string
                          nullable: true
                        hasCustomFields:
                          type: boolean
                  unitTypeId:
                    type: string
                    format: uuid
              example:
                id: 4
                name: Main Unit
                unitId: unit001
                company: true
                ancestors: []
                descendants:
                  - 5
                leaderId: 1
                leader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                ancestorLeaderId: 1
                ancestorLeader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                hasCompany: true
                fteSum: '0'
                employeeCount: 0
                companyId: 4
                companyName: Main Unit
                organizationNumber: '982247500'
                managerId: 1
                managerIdExt: '007'
                companyCountry: NOR
                companyLogoUrl: 'https://www.avatar.com/pic.png'
                ancestorCompany: null
                locations:
                  - id: 11
                    companyNumber: '007'
                    name: Big company
                    visitAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    postAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    externalId: '001'
                selectedCompanyNumber: '007'
                readyForPaymentMessage: Message
                status: ACTIVE
                companyLocation: null
                evolutionId: null
                parentId: 1
                customFields:
                  - fieldId: c799e3d9-e3b8-11eb-a317-0242ac12001f
                    valueId: 5adfe243-e3ba-11eb-a317-0242ac12001f
                    fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                    field: Country of origin
                    value: Norway
                    fieldTemplateName: Country
                    fieldExternalId: CountryField
                    valueExternalId: NOR
                    fieldTemplateExternalId: country
                    fieldExternalName: Country
                    valueExternalName: NOR
                    fieldTemplateExternalName: country_name
                    fieldCreatedAt: '2022-01-14T09:50:39+00:00'
                    fieldUpdatedAt: '2022-01-14T09:50:39+00:00'
                    valueCreatedAt: '2022-01-14T09:51:58+00:00'
                    valueUpdatedAt: '2022-01-14T09:51:58+00:00'
                    createdAt: '2022-01-14T10:00:28+00:00'
                    updatedAt: '2022-01-14T10:00:28+00:00'
                    hasCustomFields: true
                unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /orgstructure/units/changes:
    get:
      summary: Get changed organization units.
      tags:
        - Departments/Organization structure - units
      parameters:
        - name: external
          description: >-
            Param determines if returned id of unit is external (unitId) or
            internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
        - name: from
          in: query
          required: true
          schema:
            type: integer
            format: timestamp
        - name: to
          in: query
          required: true
          schema:
            type: integer
            format: timestamp
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      type: integer
                  - type: array
                    items:
                      type: string
              examples:
                external = false:
                  value:
                    - 4
                    - 8
                    - 12
                external = true:
                  value:
                    - unit004
                    - unit008
                    - unit012
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /orgstructure/companies:
    post:
      summary: Create organization unit company.
      tags:
        - Departments/Organization structure - companies
      requestBody:
        content:
          application/json:
            schema:
              required:
                - managerId
                - organizationNumber
                - companyCountry
                - unitTypeId
              type: object
              properties:
                name:
                  description: >-
                    For NOR country passing name is not allowed as its fetched
                    from Brreg
                  type: string
                  nullable: true
                  maxLength: 255
                  minLength: 1
                  pattern: (^$|^\S$|^\S.*\S$)
                parentId:
                  type: integer
                  nullable: true
                unitId:
                  type: string
                  nullable: true
                  maxLength: 40
                  minLength: 1
                  pattern: (^$|^\S$|^\S.*\S$)
                managerId:
                  type: integer
                organizationNumber:
                  maxLength: 255
                  minLength: 1
                  pattern: (^$|^\S$|^\S.*\S$)
                  type: string
                companyCountry:
                  maxLength: 3
                  minLength: 3
                  type: string
                companyLogoUrl:
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                  type: string
                  nullable: true
                selectedCompanyNumber:
                  maxLength: 255
                  minLength: 1
                  pattern: (^$|^\S$|^\S.*\S$)
                  type: string
                  nullable: true
                visitAddress:
                  type: object
                  properties:
                    address:
                      maxLength: 255
                      minLength: 1
                      pattern: (^$|^\S$|^\S.*\S$)
                      type: string
                      nullable: true
                    zipCode:
                      maxLength: 255
                      minLength: 1
                      pattern: (^$|^\S$|^\S.*\S$)
                      type: string
                      nullable: true
                    city:
                      maxLength: 255
                      minLength: 1
                      pattern: (^$|^\S$|^\S.*\S$)
                      type: string
                      nullable: true
                    municipality:
                      maxLength: 255
                      minLength: 1
                      pattern: (^$|^\S$|^\S.*\S$)
                      type: string
                      nullable: true
                postAddress:
                  description: >-
                    For NOR country postAddress is not allowed as is fetched
                    from Brreg and should be null.
                  nullable: true
                  type: object
                  properties:
                    address:
                      maxLength: 255
                      minLength: 1
                      pattern: (^$|^\S$|^\S.*\S$)
                      type: string
                      nullable: true
                    zipCode:
                      maxLength: 255
                      minLength: 1
                      pattern: (^$|^\S$|^\S.*\S$)
                      type: string
                      nullable: true
                    city:
                      maxLength: 255
                      minLength: 1
                      pattern: (^$|^\S$|^\S.*\S$)
                      type: string
                      nullable: true
                    municipality:
                      maxLength: 255
                      minLength: 1
                      pattern: (^$|^\S$|^\S.*\S$)
                      type: string
                      nullable: true
                locations:
                  description: >-
                    For NOR country locations is not allowed as they are fetched
                    from Brreg and should be null.
                  type: array
                  nullable: true
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        nullable: true
                      companyNumber:
                        maxLength: 255
                        minLength: 1
                        pattern: (^$|^\S$|^\S.*\S$)
                        type: string
                        nullable: true
                      name:
                        maxLength: 255
                        minLength: 1
                        pattern: (^$|^\S$|^\S.*\S$)
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        properties:
                          address:
                            maxLength: 255
                            minLength: 1
                            pattern: (^$|^\S$|^\S.*\S$)
                            type: string
                            nullable: true
                          zipCode:
                            maxLength: 255
                            minLength: 1
                            pattern: (^$|^\S$|^\S.*\S$)
                            type: string
                            nullable: true
                          city:
                            maxLength: 255
                            minLength: 1
                            pattern: (^$|^\S$|^\S.*\S$)
                            type: string
                            nullable: true
                          municipality:
                            maxLength: 255
                            minLength: 1
                            pattern: (^$|^\S$|^\S.*\S$)
                            type: string
                            nullable: true
                      postAddress:
                        type: object
                        properties:
                          address:
                            maxLength: 255
                            minLength: 1
                            pattern: (^$|^\S$|^\S.*\S$)
                            type: string
                            nullable: true
                          zipCode:
                            maxLength: 255
                            minLength: 1
                            pattern: (^$|^\S$|^\S.*\S$)
                            type: string
                            nullable: true
                          city:
                            maxLength: 255
                            minLength: 1
                            pattern: (^$|^\S$|^\S.*\S$)
                            type: string
                            nullable: true
                          municipality:
                            maxLength: 255
                            minLength: 1
                            pattern: (^$|^\S$|^\S.*\S$)
                            type: string
                            nullable: true
                salarySystemCompanyId:
                  maxLength: 30
                  minLength: 1
                  pattern: (^$|^\S$|^\S.*\S$)
                  type: string
                  nullable: true
                unitTypeId:
                  type: string
                  format: uuid
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - INACTIVE
            example:
              name: New company X
              parentId: 1
              unitId: '3498392489'
              managerId: 2
              organizationNumber: Org1
              companyCountry: POL
              selectedCompanyNumber: Org1
              visitAddress:
                address: Street
                zipCode: 35-021
                city: Rzeszow
                municipality: Rzeszow
              postAddress:
                address: Street
                zipCode: '1221'
                city: Rzeszow
                municipality: Rzeszow
              locations:
                - id: 1
                  companyNumber: '007'
                  name: Big company
                  visitAddress:
                    address: Street
                    zipCode: '1221'
                    city: Rzeszow
                    municipality: Rzeszow
                  postAddress:
                    address: Street
                    zipCode: '1221'
                    city: Rzeszow
                    municipality: Rzeszow
              salarySystemCompanyId: X-1337
              unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
              status: ACTIVE
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  unitId:
                    type: string
                  company:
                    type: boolean
                  lastLocationsUpdate:
                    type: string
                    nullable: true
                  managerId:
                    type: integer
                    nullable: true
                  managerIdExt:
                    type: string
                    nullable: true
                  parentId:
                    type: integer
                    nullable: true
                  leaderId:
                    type: integer
                    nullable: true
                  leader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                  ancestorLeaderId:
                    type: integer
                    nullable: true
                  ancestorLeader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                  ancestorCompany:
                    type: object
                    nullable: true
                    properties:
                      companyCountry:
                        type: string
                        nullable: true
                      organizationNumber:
                        type: string
                        nullable: true
                      companyLogoUrl:
                        type: string
                        nullable: true
                  ancestors:
                    type: array
                    items:
                      type: integer
                  descendants:
                    type: array
                    items:
                      type: integer
                  hasCompany:
                    type: boolean
                  fteSum:
                    type: string
                  employeeCount:
                    type: integer
                  companyId:
                    type: integer
                    nullable: true
                  companyName:
                    type: string
                    nullable: true
                  organizationNumber:
                    type: string
                    nullable: true
                  companyCountry:
                    type: string
                    nullable: true
                  companyLogoUrl:
                    type: string
                    nullable: true
                  externalSource:
                    type: boolean
                  locations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        companyNumber:
                          type: string
                          nullable: true
                        name:
                          type: string
                          nullable: true
                        visitAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        postAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        externalId:
                          type: string
                          minLength: 1
                          maxLength: 40
                          nullable: true
                  removedLocations:
                    type: array
                    items:
                      type: object
                      properties:
                        companyNumber:
                          type: string
                        id:
                          type: integer
                        name:
                          type: string
                        status:
                          type: string
                          enum:
                            - removed
                  selectedCompanyNumber:
                    type: string
                    nullable: true
                  status:
                    type: string
                  companyLocation:
                    type: object
                    nullable: true
                    properties:
                      companyNumber:
                        type: string
                        nullable: true
                      id:
                        type: integer
                      name:
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      postAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      externalId:
                        type: string
                        nullable: true
                  evolutionId:
                    type: integer
                    nullable: true
                  visitAddress:
                    type: object
                    nullable: true
                    properties:
                      address:
                        type: string
                        nullable: true
                      zipCode:
                        type: string
                        nullable: true
                      city:
                        type: string
                        nullable: true
                      municipality:
                        type: string
                        nullable: true
                  postAddress:
                    type: object
                    nullable: true
                    properties:
                      address:
                        type: string
                        nullable: true
                      zipCode:
                        type: string
                        nullable: true
                      city:
                        type: string
                        nullable: true
                      municipality:
                        type: string
                        nullable: true
                  salarySystemCompanyId:
                    type: string
                    nullable: true
                    maxLength: 30
                  readyForPaymentMessage:
                    type: string
                    nullable: true
                  customFields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldId:
                          type: string
                          format: uuid
                        valueId:
                          type: string
                          nullable: true
                          format: uuid
                        fieldTemplateId:
                          type: string
                          nullable: true
                          format: uuid
                        field:
                          type: string
                        value:
                          type: string
                          nullable: true
                        fieldTemplateName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalId:
                          type: string
                          maxLength: 40
                        valueExternalId:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalId:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalName:
                          type: string
                          maxLength: 40
                        valueExternalName:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldCreatedAt:
                          type: string
                        fieldUpdatedAt:
                          type: string
                          nullable: true
                        valueCreatedAt:
                          type: string
                        valueUpdatedAt:
                          type: string
                        createdAt:
                          type: string
                          nullable: true
                        updatedAt:
                          type: string
                          nullable: true
                        hasCustomFields:
                          type: boolean
                  unitTypeId:
                    type: string
                    format: uuid
              example:
                id: 4
                name: Main Unit
                unitId: unit001
                company: true
                ancestors: []
                descendants:
                  - 5
                leaderId: 1
                leader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                ancestorLeaderId: 1
                ancestorLeader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                hasCompany: true
                fteSum: '0'
                employeeCount: 0
                companyId: 4
                companyName: Main Unit
                organizationNumber: '982247500'
                managerId: 1
                managerIdExt: '007'
                companyCountry: NOR
                companyLogoUrl: 'https://www.avatar.com/pic.png'
                ancestorCompany: null
                locations:
                  - id: 1
                    companyNumber: '007'
                    name: Big company
                    visitAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    postAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    externalId: '0001'
                selectedCompanyNumber: null
                status: ACTIVE
                companyLocation: null
                evolutionId: null
                visitAddress:
                  address: Hvalåsveien 12
                  zipCode: '3230'
                  city: SANDEFJORD
                  municipality: SANDEFJORD
                postAddress:
                  address: null
                  zipCode: null
                  city: null
                  municipality: null
                externalSource: true
                salarySystemCompanyId: '123456'
                readyForPaymentMessage: Message
                lastLocationsUpdate: null
                removedLocations: []
                parentId: 1
                customFields:
                  - fieldId: c799e3d9-e3b8-11eb-a317-0242ac12001f
                    valueId: 5adfe243-e3ba-11eb-a317-0242ac12001f
                    fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                    field: Country of origin
                    value: Norway
                    fieldTemplateName: Country
                    fieldExternalId: CountryField
                    valueExternalId: NOR
                    fieldTemplateExternalId: country
                    fieldExternalName: Country
                    valueExternalName: NOR
                    fieldTemplateExternalName: country_name
                    fieldCreatedAt: '2022-01-14T09:50:39+00:00'
                    fieldUpdatedAt: '2022-01-14T09:50:39+00:00'
                    valueCreatedAt: '2022-01-14T09:51:58+00:00'
                    valueUpdatedAt: '2022-01-14T09:51:58+00:00'
                    createdAt: '2022-01-14T10:00:28+00:00'
                    updatedAt: '2022-01-14T10:00:28+00:00'
                    hasCustomFields: true
                unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /orgstructure/companies/custom-fields/templates:
    get:
      summary: Get organization custom fields templates list.
      tags:
        - Departments/Organization structure - custom fields - templates
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        companyId:
                          type: integer
                        companyName:
                          type: string
                        organizationNumber:
                          type: string
                        salarySystemCompanyId:
                          type: string
                          nullable: true
                          maxLength: 30
                        templateId:
                          type: string
                          nullable: true
                          format: uuid
                        templateName:
                          type: string
              example:
                items:
                  - companyId: 2
                    organizationNumber: '1'
                    companyName: 4Human HRM
                    salarySystemCompanyId: null
                    templateId: 9355ae32-ae3d-11eb-807e-0242ac120007
                    templateName: Template
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Assign custom field template to company.
      tags:
        - Departments/Organization structure - custom fields - templates
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - companyId
                - templateId
              properties:
                companyId:
                  type: integer
                templateId:
                  type: string
                  format: uuid
            example:
              companyId: 1
              templateId: 9355ae32-ae3d-11eb-807e-0242ac120007
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        companyId:
                          type: integer
                        companyName:
                          type: string
                        organizationNumber:
                          type: string
                        salarySystemCompanyId:
                          type: string
                          nullable: true
                          maxLength: 30
                        templateId:
                          type: string
                          nullable: true
                          format: uuid
                        templateName:
                          type: string
              example:
                items:
                  - companyId: 2
                    organizationNumber: '1'
                    companyName: 4Human HRM
                    salarySystemCompanyId: null
                    templateId: 9355ae32-ae3d-11eb-807e-0242ac120007
                    templateName: Template
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/orgstructure/companies/{companyId}':
    get:
      summary: Get company with given companyId.
      tags:
        - Departments/Organization structure - companies
      parameters:
        - name: companyId
          in: path
          required: true
          schema:
            type: string
        - name: external
          description: Param determines if id of unit is external (unitId) or internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
        - name: withSoftDeleted
          description: Param determines if deleted company should be fetched
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  unitId:
                    type: string
                  company:
                    type: boolean
                  lastLocationsUpdate:
                    type: string
                    nullable: true
                  managerId:
                    type: integer
                    nullable: true
                  managerIdExt:
                    type: string
                    nullable: true
                  parentId:
                    type: integer
                    nullable: true
                  leaderId:
                    type: integer
                    nullable: true
                  leader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                  ancestorLeaderId:
                    type: integer
                    nullable: true
                  ancestorLeader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                  ancestorCompany:
                    type: object
                    nullable: true
                    properties:
                      companyCountry:
                        type: string
                        nullable: true
                      organizationNumber:
                        type: string
                        nullable: true
                      companyLogoUrl:
                        type: string
                        nullable: true
                  ancestors:
                    type: array
                    items:
                      type: integer
                  descendants:
                    type: array
                    items:
                      type: integer
                  hasCompany:
                    type: boolean
                  fteSum:
                    type: string
                  employeeCount:
                    type: integer
                  companyId:
                    type: integer
                    nullable: true
                  companyName:
                    type: string
                    nullable: true
                  organizationNumber:
                    type: string
                    nullable: true
                  companyCountry:
                    type: string
                    nullable: true
                  companyLogoUrl:
                    type: string
                    nullable: true
                  externalSource:
                    type: boolean
                  locations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        companyNumber:
                          type: string
                          nullable: true
                        name:
                          type: string
                          nullable: true
                        visitAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        postAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        externalId:
                          type: string
                          minLength: 1
                          maxLength: 40
                          nullable: true
                  removedLocations:
                    type: array
                    items:
                      type: object
                      properties:
                        companyNumber:
                          type: string
                        id:
                          type: integer
                        name:
                          type: string
                        status:
                          type: string
                          enum:
                            - removed
                  selectedCompanyNumber:
                    type: string
                    nullable: true
                  status:
                    type: string
                  companyLocation:
                    type: object
                    nullable: true
                    properties:
                      companyNumber:
                        type: string
                        nullable: true
                      id:
                        type: integer
                      name:
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      postAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      externalId:
                        type: string
                        nullable: true
                  evolutionId:
                    type: integer
                    nullable: true
                  visitAddress:
                    type: object
                    nullable: true
                    properties:
                      address:
                        type: string
                        nullable: true
                      zipCode:
                        type: string
                        nullable: true
                      city:
                        type: string
                        nullable: true
                      municipality:
                        type: string
                        nullable: true
                  postAddress:
                    type: object
                    nullable: true
                    properties:
                      address:
                        type: string
                        nullable: true
                      zipCode:
                        type: string
                        nullable: true
                      city:
                        type: string
                        nullable: true
                      municipality:
                        type: string
                        nullable: true
                  salarySystemCompanyId:
                    type: string
                    nullable: true
                    maxLength: 30
                  readyForPaymentMessage:
                    type: string
                    nullable: true
                  customFields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldId:
                          type: string
                          format: uuid
                        valueId:
                          type: string
                          nullable: true
                          format: uuid
                        fieldTemplateId:
                          type: string
                          nullable: true
                          format: uuid
                        field:
                          type: string
                        value:
                          type: string
                          nullable: true
                        fieldTemplateName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalId:
                          type: string
                          maxLength: 40
                        valueExternalId:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalId:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalName:
                          type: string
                          maxLength: 40
                        valueExternalName:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldCreatedAt:
                          type: string
                        fieldUpdatedAt:
                          type: string
                          nullable: true
                        valueCreatedAt:
                          type: string
                        valueUpdatedAt:
                          type: string
                        createdAt:
                          type: string
                          nullable: true
                        updatedAt:
                          type: string
                          nullable: true
                        hasCustomFields:
                          type: boolean
                  unitTypeId:
                    type: string
                    format: uuid
              example:
                id: 4
                name: Main Unit
                unitId: unit001
                company: true
                ancestors: []
                descendants:
                  - 5
                leaderId: 1
                leader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                ancestorLeaderId: 1
                ancestorLeader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                hasCompany: true
                fteSum: '0'
                employeeCount: 0
                companyId: 4
                companyName: Main Unit
                organizationNumber: '982247500'
                managerId: 1
                managerIdExt: '007'
                companyCountry: NOR
                companyLogoUrl: 'https://www.avatar.com/pic.png'
                ancestorCompany: null
                locations:
                  - id: 1
                    companyNumber: '007'
                    name: Big company
                    visitAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    postAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    externalId: '0001'
                selectedCompanyNumber: null
                status: ACTIVE
                companyLocation: null
                evolutionId: null
                visitAddress:
                  address: Hvalåsveien 12
                  zipCode: '3230'
                  city: SANDEFJORD
                  municipality: SANDEFJORD
                postAddress:
                  address: null
                  zipCode: null
                  city: null
                  municipality: null
                externalSource: true
                salarySystemCompanyId: '123456'
                readyForPaymentMessage: Message
                lastLocationsUpdate: null
                removedLocations: []
                parentId: 1
                customFields:
                  - fieldId: c799e3d9-e3b8-11eb-a317-0242ac12001f
                    valueId: 5adfe243-e3ba-11eb-a317-0242ac12001f
                    fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                    field: Country of origin
                    value: Norway
                    fieldTemplateName: Country
                    fieldExternalId: CountryField
                    valueExternalId: NOR
                    fieldTemplateExternalId: country
                    fieldExternalName: Country
                    valueExternalName: NOR
                    fieldTemplateExternalName: country_name
                    fieldCreatedAt: '2022-01-14T09:50:39+00:00'
                    fieldUpdatedAt: '2022-01-14T09:50:39+00:00'
                    valueCreatedAt: '2022-01-14T09:51:58+00:00'
                    valueUpdatedAt: '2022-01-14T09:51:58+00:00'
                    createdAt: '2022-01-14T10:00:28+00:00'
                    updatedAt: '2022-01-14T10:00:28+00:00'
                    hasCustomFields: true
                unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit Company with given companyId.
      tags:
        - Departments/Organization structure - companies
      parameters:
        - name: companyId
          in: path
          required: true
          schema:
            type: string
        - name: external
          description: Param determines if id of unit is external (unitId) or internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - unitId
                - managerId
                - organizationNumber
                - unitTypeId
              properties:
                name:
                  description: >-
                    For NOR country passing name is not allowed as its fetched
                    from Brreg
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                unitId:
                  type: string
                  minLength: 1
                  maxLength: 40
                  pattern: (^$|^\S$|^\S.*\S$)
                parentId:
                  type: integer
                  nullable: true
                managerId:
                  type: integer
                organizationNumber:
                  type: string
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                companyLogoUrl:
                  type: string
                  nullable: true
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                selectedCompanyNumber:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                visitAddress:
                  description: >-
                    For NOR country visitAddress is not allowed as is fetched
                    from Brreg and should be null.
                  nullable: true
                  type: object
                  properties:
                    address:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    zipCode:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    city:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    municipality:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                postAddress:
                  description: >-
                    For NOR country passing pody is not allowed as they are
                    fetched from Brreg.
                  type: object
                  nullable: true
                  properties:
                    address:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    zipCode:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    city:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    municipality:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                locations:
                  description: >-
                    For NOR country passing locations is not allowed as they are
                    fetched from Brreg.
                  type: array
                  nullable: true
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        nullable: true
                      companyNumber:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 255
                        pattern: (^$|^\S$|^\S.*\S$)
                      name:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 255
                        pattern: (^$|^\S$|^\S.*\S$)
                      visitAddress:
                        type: object
                        properties:
                          address:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          zipCode:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          city:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          municipality:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                      postAddress:
                        type: object
                        properties:
                          address:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          zipCode:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          city:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          municipality:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                salarySystemCompanyId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 30
                  pattern: (^$|^\S$|^\S.*\S$)
                readyForPaymentMessage:
                  type: string
                  nullable: true
                  maxLength: 1000
                  pattern: (^$|^\S$|^\S.*\S$)
                customFields:
                  type: array
                  items:
                    type: object
                    required:
                      - fieldId
                      - valueId
                    properties:
                      fieldId:
                        type: string
                        format: uuid
                      valueId:
                        type: string
                        format: uuid
                    additionalProperties: false
                unitTypeId:
                  type: string
                  format: uuid
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - INACTIVE
              additionalProperties: false
            example:
              name: Main Unit
              unitId: unit001
              parentId: 1
              managerId: 1
              organizationNumber: '982247500'
              companyLogoUrl: 'https://www.avatar.com/pic.png'
              locations:
                - id: null
                  companyNumber: '007'
                  name: Big company
                  visitAddress:
                    address: Street
                    zipCode: 35-021
                    city: Rzeszow
                    municipality: Rzeszow
                  postAddress:
                    address: Street
                    zipCode: '1221'
                    city: Rzeszow
                    municipality: Rzeszow
              salarySystemCompanyId: ABC123-X
              readyForPaymentMessage: Message
              customFields:
                - fieldId: b9ee8cbc-cda5-11e9-8233-080027122a07
                  valueId: 1e8c0383-bd78-11eb-b065-0242ac150002
              unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
              status: ACTIVE
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  unitId:
                    type: string
                  company:
                    type: boolean
                  lastLocationsUpdate:
                    type: string
                    nullable: true
                  managerId:
                    type: integer
                    nullable: true
                  managerIdExt:
                    type: string
                    nullable: true
                  parentId:
                    type: integer
                    nullable: true
                  leaderId:
                    type: integer
                    nullable: true
                  leader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                  ancestorLeaderId:
                    type: integer
                    nullable: true
                  ancestorLeader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                  ancestorCompany:
                    type: object
                    nullable: true
                    properties:
                      companyCountry:
                        type: string
                        nullable: true
                      organizationNumber:
                        type: string
                        nullable: true
                      companyLogoUrl:
                        type: string
                        nullable: true
                  ancestors:
                    type: array
                    items:
                      type: integer
                  descendants:
                    type: array
                    items:
                      type: integer
                  hasCompany:
                    type: boolean
                  fteSum:
                    type: string
                  employeeCount:
                    type: integer
                  companyId:
                    type: integer
                    nullable: true
                  companyName:
                    type: string
                    nullable: true
                  organizationNumber:
                    type: string
                    nullable: true
                  companyCountry:
                    type: string
                    nullable: true
                  companyLogoUrl:
                    type: string
                    nullable: true
                  externalSource:
                    type: boolean
                  locations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        companyNumber:
                          type: string
                          nullable: true
                        name:
                          type: string
                          nullable: true
                        visitAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        postAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        externalId:
                          type: string
                          minLength: 1
                          maxLength: 40
                          nullable: true
                  removedLocations:
                    type: array
                    items:
                      type: object
                      properties:
                        companyNumber:
                          type: string
                        id:
                          type: integer
                        name:
                          type: string
                        status:
                          type: string
                          enum:
                            - removed
                  selectedCompanyNumber:
                    type: string
                    nullable: true
                  status:
                    type: string
                  companyLocation:
                    type: object
                    nullable: true
                    properties:
                      companyNumber:
                        type: string
                        nullable: true
                      id:
                        type: integer
                      name:
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      postAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      externalId:
                        type: string
                        nullable: true
                  evolutionId:
                    type: integer
                    nullable: true
                  visitAddress:
                    type: object
                    nullable: true
                    properties:
                      address:
                        type: string
                        nullable: true
                      zipCode:
                        type: string
                        nullable: true
                      city:
                        type: string
                        nullable: true
                      municipality:
                        type: string
                        nullable: true
                  postAddress:
                    type: object
                    nullable: true
                    properties:
                      address:
                        type: string
                        nullable: true
                      zipCode:
                        type: string
                        nullable: true
                      city:
                        type: string
                        nullable: true
                      municipality:
                        type: string
                        nullable: true
                  salarySystemCompanyId:
                    type: string
                    nullable: true
                    maxLength: 30
                  readyForPaymentMessage:
                    type: string
                    nullable: true
                  customFields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldId:
                          type: string
                          format: uuid
                        valueId:
                          type: string
                          nullable: true
                          format: uuid
                        fieldTemplateId:
                          type: string
                          nullable: true
                          format: uuid
                        field:
                          type: string
                        value:
                          type: string
                          nullable: true
                        fieldTemplateName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalId:
                          type: string
                          maxLength: 40
                        valueExternalId:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalId:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalName:
                          type: string
                          maxLength: 40
                        valueExternalName:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldCreatedAt:
                          type: string
                        fieldUpdatedAt:
                          type: string
                          nullable: true
                        valueCreatedAt:
                          type: string
                        valueUpdatedAt:
                          type: string
                        createdAt:
                          type: string
                          nullable: true
                        updatedAt:
                          type: string
                          nullable: true
                        hasCustomFields:
                          type: boolean
                  unitTypeId:
                    type: string
                    format: uuid
              example:
                id: 4
                name: Main Unit
                unitId: unit001
                company: true
                ancestors: []
                descendants:
                  - 5
                leaderId: 1
                leader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                ancestorLeaderId: 1
                ancestorLeader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                hasCompany: true
                fteSum: '0'
                employeeCount: 0
                companyId: 4
                companyName: Main Unit
                organizationNumber: '982247500'
                managerId: 1
                managerIdExt: '007'
                companyCountry: NOR
                companyLogoUrl: 'https://www.avatar.com/pic.png'
                ancestorCompany: null
                locations:
                  - id: 1
                    companyNumber: '007'
                    name: Big company
                    visitAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    postAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    externalId: '0001'
                selectedCompanyNumber: null
                status: ACTIVE
                companyLocation: null
                evolutionId: null
                visitAddress:
                  address: Hvalåsveien 12
                  zipCode: '3230'
                  city: SANDEFJORD
                  municipality: SANDEFJORD
                postAddress:
                  address: null
                  zipCode: null
                  city: null
                  municipality: null
                externalSource: true
                salarySystemCompanyId: '123456'
                readyForPaymentMessage: Message
                lastLocationsUpdate: null
                removedLocations: []
                parentId: 1
                customFields:
                  - fieldId: c799e3d9-e3b8-11eb-a317-0242ac12001f
                    valueId: 5adfe243-e3ba-11eb-a317-0242ac12001f
                    fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                    field: Country of origin
                    value: Norway
                    fieldTemplateName: Country
                    fieldExternalId: CountryField
                    valueExternalId: NOR
                    fieldTemplateExternalId: country
                    fieldExternalName: Country
                    valueExternalName: NOR
                    fieldTemplateExternalName: country_name
                    fieldCreatedAt: '2022-01-14T09:50:39+00:00'
                    fieldUpdatedAt: '2022-01-14T09:50:39+00:00'
                    valueCreatedAt: '2022-01-14T09:51:58+00:00'
                    valueUpdatedAt: '2022-01-14T09:51:58+00:00'
                    createdAt: '2022-01-14T10:00:28+00:00'
                    updatedAt: '2022-01-14T10:00:28+00:00'
                    hasCustomFields: true
                unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of Company with given companyId.
      tags:
        - Departments/Organization structure - companies
      parameters:
        - name: companyId
          in: path
          required: true
          schema:
            type: string
        - name: external
          description: Param determines if id of unit is external (unitId) or internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: >-
                    For NOR country passing name is not allowed as its fetched
                    from Brreg
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                unitId:
                  type: string
                  minLength: 1
                  maxLength: 40
                  pattern: (^$|^\S$|^\S.*\S$)
                parentId:
                  type: integer
                  nullable: true
                managerId:
                  type: integer
                organizationNumber:
                  type: string
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                companyLogoUrl:
                  type: string
                  nullable: true
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                selectedCompanyNumber:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                visitAddress:
                  description: >-
                    For NOR country visitAddress is not allowed as is fetched
                    from Brreg and should be null.
                  type: object
                  nullable: true
                  properties:
                    address:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    zipCode:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    city:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    municipality:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                postAddress:
                  description: >-
                    For NOR country passing postAddress is not allowed as is
                    fetched from Brreg.
                  type: object
                  nullable: true
                  properties:
                    address:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    zipCode:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    city:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    municipality:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                locations:
                  description: >-
                    For NOR country passing locations is not allowed as they are
                    fetched from Brreg.
                  type: array
                  nullable: true
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        nullable: true
                      companyNumber:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 255
                        pattern: (^$|^\S$|^\S.*\S$)
                      name:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 255
                        pattern: (^$|^\S$|^\S.*\S$)
                      visitAddress:
                        type: object
                        properties:
                          address:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          zipCode:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          city:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          municipality:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                      postAddress:
                        type: object
                        properties:
                          address:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          zipCode:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          city:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                          municipality:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 255
                            pattern: (^$|^\S$|^\S.*\S$)
                salarySystemCompanyId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 30
                  pattern: (^$|^\S$|^\S.*\S$)
                readyForPaymentMessage:
                  type: string
                  nullable: true
                  maxLength: 1000
                  pattern: (^$|^\S$|^\S.*\S$)
                customFields:
                  type: array
                  items:
                    type: object
                    required:
                      - fieldId
                      - valueId
                    properties:
                      fieldId:
                        type: string
                        format: uuid
                      valueId:
                        type: string
                        format: uuid
                        nullable: true
                    additionalProperties: false
                unitTypeId:
                  type: string
                  format: uuid
                status:
                  type: string
                  enum:
                    - ACTIVE
                    - INACTIVE
              additionalProperties: false
            example:
              name: Main Unit
              unitId: unit001
              parentId: 1
              managerId: 1
              organizationNumber: '982247500'
              companyLogoUrl: 'https://www.avatar.com/pic.png'
              locations:
                - id: null
                  companyNumber: '007'
                  name: Big company
                  visitAddress:
                    address: Street
                    zipCode: 35-322
                    city: Rzeszow
                    municipality: Rzeszow
                  postAddress:
                    address: Street
                    zipCode: '1221'
                    city: Rzeszow
                    municipality: Rzeszow
              salarySystemCompanyId: ABC123-X
              readyForPaymentMessage: Message
              customFields:
                - fieldId: b9ee8cbc-cda5-11e9-8233-080027122a07
                  valueId: 1e8c0383-bd78-11eb-b065-0242ac150002
                - fieldId: ae94511b-a391-11ec-b67d-02012b4602c5
                  valueId: null
              unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
              status: ACTIVE
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  unitId:
                    type: string
                  company:
                    type: boolean
                  lastLocationsUpdate:
                    type: string
                    nullable: true
                  managerId:
                    type: integer
                    nullable: true
                  managerIdExt:
                    type: string
                    nullable: true
                  parentId:
                    type: integer
                    nullable: true
                  leaderId:
                    type: integer
                    nullable: true
                  leader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                  ancestorLeaderId:
                    type: integer
                    nullable: true
                  ancestorLeader:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      picture:
                        type: string
                  ancestorCompany:
                    type: object
                    nullable: true
                    properties:
                      companyCountry:
                        type: string
                        nullable: true
                      organizationNumber:
                        type: string
                        nullable: true
                      companyLogoUrl:
                        type: string
                        nullable: true
                  ancestors:
                    type: array
                    items:
                      type: integer
                  descendants:
                    type: array
                    items:
                      type: integer
                  hasCompany:
                    type: boolean
                  fteSum:
                    type: string
                  employeeCount:
                    type: integer
                  companyId:
                    type: integer
                    nullable: true
                  companyName:
                    type: string
                    nullable: true
                  organizationNumber:
                    type: string
                    nullable: true
                  companyCountry:
                    type: string
                    nullable: true
                  companyLogoUrl:
                    type: string
                    nullable: true
                  externalSource:
                    type: boolean
                  locations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        companyNumber:
                          type: string
                          nullable: true
                        name:
                          type: string
                          nullable: true
                        visitAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        postAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        externalId:
                          type: string
                          minLength: 1
                          maxLength: 40
                          nullable: true
                  removedLocations:
                    type: array
                    items:
                      type: object
                      properties:
                        companyNumber:
                          type: string
                        id:
                          type: integer
                        name:
                          type: string
                        status:
                          type: string
                          enum:
                            - removed
                  selectedCompanyNumber:
                    type: string
                    nullable: true
                  status:
                    type: string
                  companyLocation:
                    type: object
                    nullable: true
                    properties:
                      companyNumber:
                        type: string
                        nullable: true
                      id:
                        type: integer
                      name:
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      postAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      externalId:
                        type: string
                        nullable: true
                  evolutionId:
                    type: integer
                    nullable: true
                  visitAddress:
                    type: object
                    nullable: true
                    properties:
                      address:
                        type: string
                        nullable: true
                      zipCode:
                        type: string
                        nullable: true
                      city:
                        type: string
                        nullable: true
                      municipality:
                        type: string
                        nullable: true
                  postAddress:
                    type: object
                    nullable: true
                    properties:
                      address:
                        type: string
                        nullable: true
                      zipCode:
                        type: string
                        nullable: true
                      city:
                        type: string
                        nullable: true
                      municipality:
                        type: string
                        nullable: true
                  salarySystemCompanyId:
                    type: string
                    nullable: true
                    maxLength: 30
                  readyForPaymentMessage:
                    type: string
                    nullable: true
                  customFields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldId:
                          type: string
                          format: uuid
                        valueId:
                          type: string
                          nullable: true
                          format: uuid
                        fieldTemplateId:
                          type: string
                          nullable: true
                          format: uuid
                        field:
                          type: string
                        value:
                          type: string
                          nullable: true
                        fieldTemplateName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalId:
                          type: string
                          maxLength: 40
                        valueExternalId:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalId:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalName:
                          type: string
                          maxLength: 40
                        valueExternalName:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldCreatedAt:
                          type: string
                        fieldUpdatedAt:
                          type: string
                          nullable: true
                        valueCreatedAt:
                          type: string
                        valueUpdatedAt:
                          type: string
                        createdAt:
                          type: string
                          nullable: true
                        updatedAt:
                          type: string
                          nullable: true
                        hasCustomFields:
                          type: boolean
                  unitTypeId:
                    type: string
                    format: uuid
              example:
                id: 4
                name: Main Unit
                unitId: unit001
                company: true
                ancestors: []
                descendants:
                  - 5
                leaderId: 1
                leader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                ancestorLeaderId: 1
                ancestorLeader:
                  id: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                  displayName: John Doe
                  picture: >-
                    https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                hasCompany: true
                fteSum: '0'
                employeeCount: 0
                companyId: 4
                companyName: Main Unit
                organizationNumber: '982247500'
                managerId: 1
                managerIdExt: '007'
                companyCountry: NOR
                companyLogoUrl: 'https://www.avatar.com/pic.png'
                ancestorCompany: null
                locations:
                  - id: 1
                    companyNumber: '007'
                    name: Big company
                    visitAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    postAddress:
                      address: Street
                      zipCode: '1221'
                      city: Oslo
                      municipality: Oslo
                    externalId: '0001'
                selectedCompanyNumber: null
                status: ACTIVE
                companyLocation: null
                evolutionId: null
                visitAddress:
                  address: Hvalåsveien 12
                  zipCode: '3230'
                  city: SANDEFJORD
                  municipality: SANDEFJORD
                postAddress:
                  address: null
                  zipCode: null
                  city: null
                  municipality: null
                externalSource: true
                salarySystemCompanyId: '123456'
                readyForPaymentMessage: Message
                lastLocationsUpdate: null
                removedLocations: []
                parentId: 1
                customFields:
                  - fieldId: c799e3d9-e3b8-11eb-a317-0242ac12001f
                    valueId: 5adfe243-e3ba-11eb-a317-0242ac12001f
                    fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                    field: Country of origin
                    value: Norway
                    fieldTemplateName: Country
                    fieldExternalId: CountryField
                    valueExternalId: NOR
                    fieldTemplateExternalId: country
                    fieldExternalName: Country
                    valueExternalName: NOR
                    fieldTemplateExternalName: country_name
                    fieldCreatedAt: '2022-01-14T09:50:39+00:00'
                    fieldUpdatedAt: '2022-01-14T09:50:39+00:00'
                    valueCreatedAt: '2022-01-14T09:51:58+00:00'
                    valueUpdatedAt: '2022-01-14T09:51:58+00:00'
                    createdAt: '2022-01-14T10:00:28+00:00'
                    updatedAt: '2022-01-14T10:00:28+00:00'
                    hasCustomFields: true
                unitTypeId: 682dda63-9113-4198-9e5b-fcf22e5c6812
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/orgstructure/companies/{companyId}/locations':
    get:
      summary: Get all companies locations.
      tags:
        - Departments/Organization structure - companies
      parameters:
        - name: companyId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        companyNumber:
                          type: string
                        name:
                          type: string
                        visitAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        postAddress:
                          type: object
                          nullable: true
                          properties:
                            address:
                              type: string
                              nullable: true
                            zipCode:
                              type: string
                              nullable: true
                            city:
                              type: string
                              nullable: true
                            municipality:
                              type: string
                              nullable: true
                        externalId:
                          type: string
                      selectedCompanyNumber:
                        type: string
                        nullable: true
              example:
                items:
                  - id: 1
                    companyNumber: '12212'
                    name: Example company location
                    visitAddress:
                      address: Street 10
                      zipCode: 11-111
                      city: Oslo
                      municipality: Oslo
                    postAddress:
                      address: Street 11
                      zipCode: 10-100
                      city: Oslo
                      municipality: Oslo
                    externalId: externalId1
                selectedCompanyNumber: '12212'
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/orgstructure/companies/{companyId}/update-locations':
    patch:
      summary: Update location from Brreg.
      tags:
        - Departments/Organization structure - companies
      parameters:
        - name: companyId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema: {}
            example: {}
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        companyNumber:
                          type: string
                        id:
                          type: integer
                        name:
                          type: string
                        status:
                          type: string
                          enum:
                            - new
                            - updated
                            - removed
                  total:
                    type: integer
                  companyUpdated:
                    type: boolean
              example:
                items:
                  - companyNumber: '990392994'
                    id: 3
                    name: 4HUMAN IT AS AVD OSLO
                    status: new
                  - companyNumber: '980704440'
                    id: 2
                    name: 4HUMAN IT AS AVD TØNSBERG
                    status: updated
                total: 2
                companyUpdated: true
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /orgstructure/companies/changes:
    get:
      summary: Get changed companies.
      tags:
        - Departments/Organization structure - companies
      parameters:
        - name: external
          description: >-
            Param determines if returned id of unit is external (unitId) or
            internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
        - name: from
          in: query
          required: true
          schema:
            type: integer
            format: timestamp
        - name: to
          in: query
          required: true
          schema:
            type: integer
            format: timestamp
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      type: integer
                  - type: array
                    items:
                      type: string
              examples:
                external = false:
                  value:
                    - 4
                    - 8
                    - 12
                external = true:
                  value:
                    - company004
                    - company008
                    - company012
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /orgstructure:
    get:
      summary: Get organization structure.
      tags:
        - Departments/Organization structure - orgstructure
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        unitId:
                          type: string
                        level:
                          type: integer
                        company:
                          type: boolean
                        leaderId:
                          type: integer
                        parentId:
                          type: integer
                          nullable: true
                        manager:
                          type: object
                          properties:
                            id:
                              type: integer
                              nullable: true
                            orgUnitName:
                              type: string
                            inherited:
                              type: boolean
                        location:
                          type: object
                          properties:
                            id:
                              type: integer
                              nullable: true
                            orgUnitName:
                              type: string
                              nullable: true
                            inherited:
                              type: boolean
                            externalId:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                        hasCompany:
                          type: boolean
                        companyId:
                          type: integer
                          nullable: true
                        companyName:
                          type: string
                          nullable: true
                        companyCountry:
                          type: string
                          nullable: true
                        ancestors:
                          type: array
                          items:
                            type: integer
                        descendants:
                          type: array
                          items:
                            type: integer
                        children:
                          type: array
                          items:
                            type: object
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        salarySystemCompanyId:
                          type: string
                          nullable: true
                          maxLength: 30
                  total:
                    type: integer
              example:
                items:
                  - id: 2
                    name: 4Human Hrm
                    level: 1
                    unitId: '1'
                    company: true
                    leaderId: 1
                    parentId: 1
                    manager:
                      id: 1
                      orgUnitName: 4Human Hrm
                      inherited: false
                    hasCompany: true
                    companyId: 2
                    companyName: 4Human Hrm
                    companyCountry: ATA
                    ancestors: []
                    descendants: []
                    children: []
                    location:
                      id: null
                      orgUnitName: 4Human Hrm
                      inherited: false
                      externalId: '001'
                    status: ACTIVE
                    salarySystemCompanyId: null
                  - id: 4
                    name: Main Unit
                    level: 1
                    unitId: '1402'
                    company: true
                    leaderId: 1
                    parentId: 2
                    manager:
                      id: 1
                      orgUnitName: Main Unit
                      inherited: false
                    hasCompany: true
                    companyId: 4
                    companyName: Main Unit
                    companyCountry: NOR
                    ancestors: []
                    descendants:
                      - 5
                    children:
                      - id: 5
                        name: 4human Hrm unit 001
                        level: 2
                        unitId: '4'
                        company: false
                        leaderId: null
                        parentId: 2
                        manager:
                          id: 1
                          orgUnitName: Main Unit
                          inherited: true
                        hasCompany: true
                        companyId: 4
                        companyName: 4human Hrm
                        companyCountry: NOR
                        ancestors:
                          - 4
                        descendants: []
                        children: []
                        location:
                          id: null
                          orgUnitName: Main Unit
                          inherited: true
                        status: ACTIVE
                        salarySystemCompanyId: null
                    location:
                      id: null
                      orgUnitName: Main Unit
                      inherited: false
                      externalId: '002'
                    status: ACTIVE
                    salarySystemCompanyId: null
                  - id: 3
                    name: Main Unit
                    level: 1
                    unitId: unit001
                    company: false
                    leaderId: 1
                    manager:
                      id: 1
                      orgUnitName: Main Unit
                      inherited: false
                    hasCompany: false
                    companyId: null
                    companyName: null
                    companyCountry: null
                    ancestors: []
                    descendants: []
                    children: []
                    location:
                      id: null
                      orgUnitName: Main Unit
                      inherited: false
                    status: ACTIVE
                    salarySystemCompanyId: null
                total: 4
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /orgstructure/locations:
    get:
      summary: Return all companies locations list.
      tags:
        - Departments/Organization structure - orgstructure
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        number:
                          type: string
                        name:
                          type: string
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        externalId:
                          type: string
                          nullable: true
                        companyName:
                          type: string
                        companyCountry:
                          type: string
                        companyId:
                          type: string
                  limit:
                    type: integer
                  page:
                    type: integer
                  pages:
                    type: integer
                  total:
                    type: integer
              example:
                items:
                  - id: '5'
                    number: '984045255'
                    name: 4HUMAN TQM AS
                    status: ACTIVE
                    externalId: externalId1
                    companyName: 4HUMAN TQM AS
                    companyCountry: NOR
                    companyId: '984036736'
                total: 1
                limit: 10
                page: 1
                pages: 1
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /orgstructure/unit-types:
    get:
      summary: Get unit types list.
      tags:
        - Departments/Organization structure - unit types
      parameters:
        - name: limit
          in: query
          required: false
        - name: page
          in: query
          required: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        typeId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - active
                            - draft
                            - archived
                  total:
                    type: integer
                  limit:
                    type: integer
                  page:
                    type: integer
                  pages:
                    type: integer
              example:
                items:
                  - id: 682dda63-9113-4198-9e5b-fcf22e5c6812
                    name: Region
                    typeId: REGION
                    externalId: region_external_id
                    description: >-
                      Typically when a large corporate is split into
                      geographical units like North/South etc.
                    status: active
                  - id: 506edc6b-ecaa-4d83-962d-ea148b622bc9
                    name: District
                    typeId: DISTRICT
                    externalId: district_external_id
                    description: >-
                      Typically when large corporates/companies are divided into
                      districts below a Region
                    status: draft
                total: 2
                limit: 50
                page: 1
                pages: 1
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create unit type.
      tags:
        - Departments/Organization structure - unit types
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - typeId
                - externalId
                - description
                - status
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                  pattern: (^$|^\S$|^\S.*\S$)
                typeId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 30
                  pattern: (^$|^\S$|^\S.*\S$)
                externalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 50
                  pattern: (^$|^\S$|^\S.*\S$)
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                status:
                  type: string
                  enum:
                    - active
                    - draft
                    - archived
              additionalProperties: false
            example:
              name: Region
              typeId: REGION
              externalId: region_external_id
              description: >-
                Typically when a large corporate is split into geographical
                units like North/South etc.
              status: active
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  typeId:
                    type: string
                    nullable: true
                  externalId:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - draft
                      - archived
              example:
                id: 682dda63-9113-4198-9e5b-fcf22e5c6812
                name: Region
                typeId: REGION
                externalId: region_external_id
                description: >-
                  Typically when a large corporate is split into geographical
                  units like North/South etc.
                status: active
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/orgstructure/unit-types/{unitTypeId}':
    get:
      summary: Get unit type with given id.
      tags:
        - Departments/Organization structure - unit types
      parameters:
        - name: unitTypeId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  typeId:
                    type: string
                    nullable: true
                  externalId:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - draft
                      - archived
              example:
                id: 682dda63-9113-4198-9e5b-fcf22e5c6812
                name: Region
                typeId: REGION
                externalId: region_external_id
                description: >-
                  Typically when a large corporate is split into geographical
                  units like North/South etc.
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit unit type.
      tags:
        - Departments/Organization structure - unit types
      parameters:
        - name: unitTypeId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - typeId
                - externalId
                - description
                - status
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                  pattern: (^$|^\S$|^\S.*\S$)
                typeId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 30
                  pattern: (^$|^\S$|^\S.*\S$)
                externalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 50
                  pattern: (^$|^\S$|^\S.*\S$)
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                status:
                  type: string
                  enum:
                    - active
                    - draft
                    - archived
              additionalProperties: false
            example:
              name: Region
              typeId: REGION
              externalId: region_external_id
              description: >-
                Typically when a large corporate is split into geographical
                units like North/South etc.
              status: active
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  typeId:
                    type: string
                    nullable: true
                  externalId:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - draft
                      - archived
              example:
                id: 682dda63-9113-4198-9e5b-fcf22e5c6812
                name: Region
                typeId: REGION
                externalId: region_external_id
                description: >-
                  Typically when a large corporate is split into geographical
                  units like North/South etc.
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field in unit type.
      tags:
        - Departments/Organization structure - unit types
      parameters:
        - name: unitTypeId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                  pattern: (^$|^\S$|^\S.*\S$)
                typeId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 30
                  pattern: (^$|^\S$|^\S.*\S$)
                externalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 50
                  pattern: (^$|^\S$|^\S.*\S$)
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                status:
                  type: string
                  enum:
                    - active
                    - draft
                    - archived
              additionalProperties: false
            example:
              name: Region
              typeId: REGION
              externalId: region_external_id
              description: >-
                Typically when a large corporate is split into geographical
                units like North/South etc.
              status: active
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  typeId:
                    type: string
                    nullable: true
                  externalId:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - draft
                      - archived
              example:
                id: 682dda63-9113-4198-9e5b-fcf22e5c6812
                name: Region
                typeId: REGION
                externalId: region_external_id
                description: >-
                  Typically when a large corporate is split into geographical
                  units like North/South etc.
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/hr-roles:
    get:
      summary: Get personnel HR roles list.
      tags:
        - Employee configuration - personnel
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        accessGroup:
                          type: array
                          items:
                            type: string
                        accessLevel:
                          required:
                            - id
                            - levels
                          type: object
                          properties:
                            id:
                              type: string
                            levels:
                              type: array
                              nullable: true
                              items:
                                type: string
                        internal:
                          type: boolean
                        evolutionRoleCodes:
                          type: array
                          items:
                            type: string
                        externalMappings:
                          type: array
                          items:
                            type: object
                            properties:
                              externalId:
                                type: string
                                nullable: true
                              systemName:
                                type: string
                        mappingEnabled:
                          type: boolean
              example:
                items:
                  - id: ebdfebf5-159d-11e9-860c-02d4207bc2aa
                    title: Test 4
                    accessGroup:
                      - dd63031d-ce96-11e7-ad6c-06063970b924
                      - e2fc426c-ce96-11e7-ad6c-06063970b924
                    accessLevel:
                      id: NO_MANAGEMENT
                      levels: null
                    internal: false
                    evolutionRoleCodes:
                      - mobi
                    externalMappings:
                      - externalId: mobi
                        systemName: v4
                    mappingEnabled: true
                  - id: f5caf8ef-159d-11e9-860c-02d4207bc2aa
                    title: Test 1
                    accessGroup:
                      - dd63031d-ce96-11e7-ad6c-06063970b924
                      - e2fc426c-ce96-11e7-ad6c-06063970b924
                    accessLevel:
                      id: NO_MANAGEMENT
                      levels: null
                    internal: false
                    evolutionRoleCodes:
                      - mobi
                    externalMappings:
                      - externalId: mobi
                        systemName: v4
                    mappingEnabled: false
                  - id: f96f647c-15a7-11e9-860c-02d4207bc2aa
                    title: Copy of Test 1
                    accessGroup:
                      - dd63031d-ce96-11e7-ad6c-06063970b924
                      - e2fc426c-ce96-11e7-ad6c-06063970b924
                    accessLevel:
                      id: NO_MANAGEMENT
                      levels: null
                    internal: false
                    evolutionRoleCodes:
                      - mobi
                    externalMappings:
                      - externalId: mobi
                        systemName: v4
                    mappingEnabled: true
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/dictionary:
    get:
      summary: >-
        Get dictionaries for workRelationType, workingHoursArrangement,
        workStatus, salaryType.
      tags:
        - Employee configuration - personnel
      parameters:
        schema:
          type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  workRelationType:
                    type: object
                    properties:
                      object:
                        type: array
                        items:
                          title: Items
                          type: string
                  workStatus:
                    type: array
                    items:
                      title: Items
                      type: string
                  salaryType:
                    type: array
                    items:
                      title: Items
                      type: string
              example:
                workRelationType:
                  NOR:
                    - WORK_RELATION_NOR_ORDINARY
                    - WORK_RELATION_NOR_CONTRACTOR
                    - WORK_RELATION_NOR_MARITIME
                    - WORK_RELATION_NOR_WITHOUT_EMPLOYMENT_RELATIONSHIP
                    - >-
                      WORK_RELATION_NOR_EXCEPTIONS_ORDINARY_AND_MARITIME_WORK_RELATION
                workStatus:
                  - WORK_STATUS_ACTIVE
                  - WORK_STATUS_RESIGNED
                  - WORK_STATUS_SICK_WITHOUT_PAYMENT
                  - WORK_STATUS_SICK
                  - WORK_STATUS_LEAVE
                  - WORK_STATUS_LEAVE_WITHOUT_PAYMENT
                  - WORK_STATUS_TEMPORARILY_LAID_OFF
                  - WORK_STATUS_TEMPORARILY_ACTIVE
                salaryType:
                  - piecework_remuneration
                  - fixed_salary
                  - fees
                  - commission_percentage
                  - hourly_wage
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/dictionary/occupational-codes:
    get:
      summary: Get Occupational by country and query params.
      tags:
        - Employee configuration - personnel
      parameters:
        - name: country
          schema:
            type: string
            required: true
          description: 'country - code of the country with occupational code, e.g. ''NOR'''
        - name: query
          schema:
            type: string
            required: true
          description: >-
            query - phrase to search occupational code by the title, e.g.
            'KORIN'
          in: query
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                default: []
                items:
                  title: Items
                  type: object
                  required:
                    - code
                    - name
                  properties:
                    code:
                      type: string
                    name:
                      type: string
              example:
                - code: '2553108'
                  name: KORINSPISIENT
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/employment-types:
    get:
      summary: Returns existing employment types flat list.
      tags:
        - Employee configuration - personnel
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      required:
                        - id
                        - title
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
              example:
                items:
                  - id: 6d703007-63a2-480e-8878-a299b96f6bd0
                    title: PERMANENT
                  - id: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                    title: NONEMPLOYEE
                  - id: 9b8651c5-7292-4f5d-aaac-9819dbb2a7b5
                    title: FIXED
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/jobs:
    get:
      summary: Get paginated job list.
      tags:
        - Employee configuration - jobs
      parameters:
        - name: limit
          in: query
          required: false
        - name: page
          in: query
          required: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        title:
                          type: string
                        number:
                          type: string
                        description:
                          type: string
                          nullable: true
                        createdAt:
                          type: string
                  page:
                    type: integer
                  pages:
                    type: integer
                  limit:
                    type: integer
                  total:
                    type: integer
              example:
                items:
                  - id: 16
                    title: Adam brand new Job 66
                    number: Adam brand new job number 66
                    description: Desc 1
                    status: active
                    createdAt: '2018-02-06T12:03:54+01:00'
                    occupationalCodes:
                      - country: NOR
                        code: 0112117 SERSJANTMAJOR
                  - id: 17
                    title: Adam brand new Job 55555
                    number: Adam brand new job number 555
                    description: Desc 2
                    status: active
                    createdAt: '2018-02-06T15:10:33+01:00'
                    occupationalCodes:
                      - country: NOR
                        code: 0112102 LØYTNANT
                  - id: 15
                    title: Adam brand new Job 55
                    number: Adam brand new job number 55
                    description: Desc 3
                    status: inactive
                    createdAt: '2018-02-06T11:56:44+01:00'
                    occupationalCodes: []
                page: 1
                pages: 1
                total: 3
                limit: 10
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create personnel job.
      tags:
        - Employee configuration - jobs
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - title
                - number
                - acl
              properties:
                title:
                  type: string
                  minLength: 1
                  maxLength: 40
                  pattern: (^$|^\S$|^\S.*\S$)
                number:
                  type: string
                  minLength: 1
                  maxLength: 40
                  pattern: (^$|^\S$|^\S.*\S$)
                description:
                  type: string
                  nullable: true
                  maxLength: 1000
                  pattern: '(^$|^\S$|^\S[\s\S]*\S$)'
                categoryId:
                  type: string
                  format: uuid
                  nullable: true
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                occupationalCodes:
                  type: array
                  items:
                    type: object
                    required:
                      - country
                      - code
                    properties:
                      country:
                        type: string
                        minLength: 1
                        maxLength: 3
                      code:
                        type: string
                        minLength: 1
                        maxLength: 64
                        description: Use only code number the without name
                acl:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                      - subjectType
                      - subjectId
                      - setting
                    properties:
                      subjectType:
                        type: string
                      subjectId:
                        type: string
                      setting:
                        type: string
                        enum:
                          - allow
                          - deny
            example:
              title: Job title
              number: Unique job number which is string
              description: Job Description
              categoryId: c4ecf795-8a87-4c35-927d-368c8cc9adec
              status: active
              occupationalCodes:
                - country: NOR
                  code: '0112102'
              acl:
                - subjectType: org_unit
                  subjectId: '8'
                  setting: allow
                - subjectType: org_unit
                  subjectId: '4'
                  setting: allow
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - title
                  - number
                  - description
                  - occupationalCodes
                  - acl
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  number:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                  createdAt:
                    type: string
                  occupationalCodes:
                    type: array
                    items:
                      type: object
                      required:
                        - country
                        - code
                      properties:
                        country:
                          type: string
                        code:
                          type: string
                  acl:
                    type: array
                    minItems: 1
                    items:
                      type: object
                      required:
                        - subjectType
                        - subjectId
                        - setting
                      properties:
                        subjectType:
                          type: string
                        subjectId:
                          type: string
                        setting:
                          type: string
                          enum:
                            - allow
                            - deny
              example:
                id: 1
                title: Investigator
                number: '007'
                description: null
                status: active
                createdAt: '1970-01-01T01:00:00+00:00'
                occupationalCodes:
                  - country: NOR
                    code: '0112117'
                acl:
                  - subjectType: org_unit
                    subjectId: '8'
                    setting: allow
                  - subjectType: org_unit
                    subjectId: '4'
                    setting: allow
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/jobs/{jobId}':
    get:
      summary: Get job details.
      tags:
        - Employee configuration - jobs
      parameters:
        - name: jobId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - title
                  - number
                  - description
                  - occupationalCodes
                  - acl
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  number:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                  createdAt:
                    type: string
                  occupationalCodes:
                    type: array
                    items:
                      type: object
                      required:
                        - country
                        - code
                      properties:
                        country:
                          type: string
                        code:
                          type: string
                  acl:
                    type: array
                    minItems: 1
                    items:
                      type: object
                      required:
                        - subjectType
                        - subjectId
                        - setting
                      properties:
                        subjectType:
                          type: string
                        subjectId:
                          type: string
                        setting:
                          type: string
                          enum:
                            - allow
                            - deny
              example:
                id: 1
                title: Investigator
                number: '007'
                description: null
                status: active
                createdAt: '1970-01-01T01:00:00+00:00'
                occupationalCodes:
                  - country: NOR
                    code: '0112117'
                acl:
                  - subjectType: org_unit
                    subjectId: '8'
                    setting: allow
                  - subjectType: org_unit
                    subjectId: '4'
                    setting: allow
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit job details.
      tags:
        - Employee configuration - jobs
      parameters:
        - name: jobId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - title
                - number
                - acl
              properties:
                title:
                  type: string
                  minLength: 1
                  maxLength: 40
                  pattern: (^$|^\S$|^\S.*\S$)
                number:
                  type: string
                  minLength: 1
                  maxLength: 40
                  pattern: (^$|^\S$|^\S.*\S$)
                description:
                  type: string
                  nullable: true
                  maxLength: 1000
                  pattern: '(^$|^\S$|^\S[\s\S]*\S$)'
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                categoryId:
                  type: string
                  format: uuid
                occupationalCodes:
                  type: array
                  items:
                    type: object
                    required:
                      - country
                      - code
                    properties:
                      country:
                        type: string
                        minLength: 1
                        maxLength: 3
                      code:
                        type: string
                        minLength: 1
                        maxLength: 64
                        description: Use only code number the without name
                acl:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                      - subjectType
                      - subjectId
                      - setting
                    properties:
                      subjectType:
                        type: string
                      subjectId:
                        type: string
                      setting:
                        type: string
                        enum:
                          - allow
                          - deny
              additionalProperties: false
            example:
              title: Job title
              number: Unique job number which is string
              description: Job Description
              status: active
              categoryId: c4ecf795-8a87-4c35-927d-368c8cc9adec
              occupationalCodes:
                - country: NOR
                  code: '0112102'
              acl:
                - subjectType: org_unit
                  subjectId: '8'
                  setting: allow
                - subjectType: org_unit
                  subjectId: '4'
                  setting: allow
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - title
                  - number
                  - description
                  - occupationalCodes
                  - acl
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  number:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                  createdAt:
                    type: string
                  occupationalCodes:
                    type: array
                    items:
                      type: object
                      required:
                        - country
                        - code
                      properties:
                        country:
                          type: string
                        code:
                          type: string
                  acl:
                    type: array
                    minItems: 1
                    items:
                      type: object
                      required:
                        - subjectType
                        - subjectId
                        - setting
                      properties:
                        subjectType:
                          type: string
                        subjectId:
                          type: string
                        setting:
                          type: string
                          enum:
                            - allow
                            - deny
              example:
                id: 1
                title: Investigator
                number: '007'
                description: null
                status: active
                createdAt: '1970-01-01T01:00:00+00:00'
                occupationalCodes:
                  - country: NOR
                    code: '0112117'
                acl:
                  - subjectType: org_unit
                    subjectId: '8'
                    setting: allow
                  - subjectType: org_unit
                    subjectId: '4'
                    setting: allow
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit field in job details.
      tags:
        - Employee configuration - jobs
      parameters:
        - name: jobId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  minLength: 1
                  maxLength: 40
                  pattern: (^$|^\S$|^\S.*\S$)
                number:
                  type: string
                  minLength: 1
                  maxLength: 40
                  pattern: (^$|^\S$|^\S.*\S$)
                description:
                  type: string
                  nullable: true
                  maxLength: 1000
                  pattern: '(^$|^\S$|^\S[\s\S]*\S$)'
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                categoryId:
                  type: string
                  format: uuid
                occupationalCodes:
                  type: array
                  items:
                    type: object
                    required:
                      - country
                      - code
                    properties:
                      country:
                        type: string
                      code:
                        type: string
                acl:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                      - subjectType
                      - subjectId
                      - setting
                    properties:
                      subjectType:
                        type: string
                      subjectId:
                        type: string
                      setting:
                        type: string
                        enum:
                          - allow
                          - deny
              additionalProperties: false
            example:
              title: Job title
              number: Unique job number which is string
              description: Job Description
              status: active
              categoryId: c4ecf795-8a87-4c35-927d-368c8cc9adec
              occupationalCodes:
                - country: NOR
                  code: '0112102'
              acl:
                - subjectType: org_unit
                  subjectId: '8'
                  setting: allow
                - subjectType: org_unit
                  subjectId: '4'
                  setting: allow
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - title
                  - number
                  - description
                  - occupationalCodes
                  - acl
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  number:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                  createdAt:
                    type: string
                  occupationalCodes:
                    type: array
                    items:
                      type: object
                      required:
                        - country
                        - code
                      properties:
                        country:
                          type: string
                        code:
                          type: string
                  acl:
                    type: array
                    minItems: 1
                    items:
                      type: object
                      required:
                        - subjectType
                        - subjectId
                        - setting
                      properties:
                        subjectType:
                          type: string
                        subjectId:
                          type: string
                        setting:
                          type: string
                          enum:
                            - allow
                            - deny
              example:
                id: 1
                title: Investigator
                number: '007'
                description: null
                status: active
                createdAt: '1970-01-01T01:00:00+00:00'
                occupationalCodes:
                  - country: NOR
                    code: '0112117'
                acl:
                  - subjectType: org_unit
                    subjectId: '8'
                    setting: allow
                  - subjectType: org_unit
                    subjectId: '4'
                    setting: allow
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/job-categories:
    get:
      summary: Get paginated job category list.
      tags:
        - Employee configuration - job categories
      parameters:
        - name: limit
          in: query
          required: false
        - name: page
          in: query
          required: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        internalId:
                          type: string
                        externalId:
                          type: string
                          nullable: true
                        name:
                          type: string
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - active
                            - inactive
                            - archive
                  page:
                    type: integer
                  pages:
                    type: integer
                  limit:
                    type: integer
                  total:
                    type: integer
              example:
                items:
                  - id: 05e050e8-47c7-11e8-aee8-001dd8b71dc9
                    internalId: '001'
                    externalId: '001'
                    name: First category
                    description: Description of the first category.
                    status: active
                total: 1
                limit: 10
                page: 1
                pages: 1
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create job category.
      tags:
        - Employee configuration - job categories
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                internalId:
                  type: string
                externalId:
                  type: string
                  nullable: true
                name:
                  type: string
                description:
                  type: string
                  nullable: true
              required:
                - internalId
                - externalId
                - name
                - description
            example:
              internalId: '001'
              externalId: '001'
              name: First category
              description: Description of the first category.
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  internalId:
                    type: string
                  externalId:
                    type: string
                    nullable: true
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - inactive
                      - archive
                required:
                  - internalId
                  - externalId
                  - name
                  - description
              example:
                id: 05e050e8-47c7-11e8-aee8-001dd8b71dc9
                internalId: '001'
                externalId: '001'
                name: First category
                description: Description of the first category.
                status: active
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/job-categories/{jobCategoryId}':
    get:
      summary: Get job category details.
      tags:
        - Employee configuration - job categories
      parameters:
        - name: jobCategoryId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  internalId:
                    type: string
                  externalId:
                    type: string
                    nullable: true
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - inactive
                      - archive
                required:
                  - internalId
                  - externalId
                  - name
                  - description
              example:
                id: 05e050e8-47c7-11e8-aee8-001dd8b71dc9
                internalId: '001'
                externalId: '001'
                name: First category
                description: Description of the first category.
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit job category details.
      tags:
        - Employee configuration - job categories
      parameters:
        - name: jobCategoryId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                internalId:
                  type: string
                externalId:
                  type: string
                  nullable: true
                name:
                  type: string
                description:
                  type: string
                  nullable: true
              required:
                - internalId
                - externalId
                - name
                - description
            example:
              internalId: '001'
              externalId: '001'
              name: First category
              description: Description of the first category.
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  internalId:
                    type: string
                  externalId:
                    type: string
                    nullable: true
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - inactive
                      - archive
                required:
                  - internalId
                  - externalId
                  - name
                  - description
              example:
                id: 05e050e8-47c7-11e8-aee8-001dd8b71dc9
                internalId: '001'
                externalId: '001'
                name: First category
                description: Description of the first category.
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit job category details.
      tags:
        - Employee configuration - job categories
      parameters:
        - name: jobCategoryId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                internalId:
                  type: string
                externalId:
                  type: string
                  nullable: true
                name:
                  type: string
                description:
                  type: string
                  nullable: true
              required:
                - internalId
                - externalId
                - name
                - description
            example:
              internalId: '001'
              externalId: '001'
              name: First category
              description: Description of the first category.
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  internalId:
                    type: string
                  externalId:
                    type: string
                    nullable: true
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - inactive
                      - archive
                required:
                  - internalId
                  - externalId
                  - name
                  - description
              example:
                id: 05e050e8-47c7-11e8-aee8-001dd8b71dc9
                internalId: '001'
                externalId: '001'
                name: First category
                description: Description of the first category.
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/job-categories/{jobCategoryId}/status':
    patch:
      summary: Edit job category status.
      tags:
        - Employee configuration - job categories
      parameters:
        - name: jobCategoryId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                    - archived
            example:
              status: active
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  internalId:
                    type: string
                  externalId:
                    type: string
                    nullable: true
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - inactive
                      - archive
                required:
                  - internalId
                  - externalId
                  - name
                  - description
              example:
                id: 05e050e8-47c7-11e8-aee8-001dd8b71dc9
                internalId: '001'
                externalId: '001'
                name: First category
                description: Description of the first category.
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/employee-types:
    get:
      summary: Returns existing employee types list.
      tags:
        - Employee configuration - employee types
      parameters:
        - name: limit
          in: query
          required: false
        - name: page
          in: query
          required: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        typeId:
                          type: string
                        employeeType:
                          type: string
                        employmentTypeId:
                          type: string
                        employmentType:
                          type: string
                        status:
                          type: string
                          enum:
                            - active
                            - archived
                        reason:
                          type: boolean
                        substitute:
                          type: boolean
                  total:
                    type: integer
                  limit:
                    type: integer
                  page:
                    type: integer
                  pages:
                    type: integer
              example:
                items:
                  - id: f5a0cdc6-4355-11ea-9192-0242ac12000d
                    typeId: I
                    employeeType: EMPLOYEE_TYPE_TEMPORARY_NONEMPLOYEE
                    employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                    employmentType: NONEMPLOYEE
                    status: active
                    reason: true
                    substitute: false
                  - id: f5a4a29c-4355-11ea-9192-0242ac12000d
                    typeId: O
                    employeeType: EMPLOYEE_TYPE_WORKER_NONEMPLOYEE
                    employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                    employmentType: NONEMPLOYEE
                    status: active
                    reason: true
                    substitute: false
                total: 2
                limit: 50
                page: 1
                pages: 1
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create personnel employee type.
      tags:
        - Employee configuration - employee types
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - typeId
                - employeeType
                - employmentTypeId
              properties:
                typeId:
                  type: string
                  minLength: 1
                  maxLength: 5
                employeeType:
                  type: string
                  minLength: 1
                  maxLength: 30
                employmentTypeId:
                  type: string
                  format: uuid
                reason:
                  type: boolean
                substitute:
                  type: boolean
              additionalProperties: false
            example:
              typeId: O
              employeeType: WORKER_NONEMPLOYEE
              employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
              reason: true
              substitute: false
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  typeId:
                    type: string
                  employeeType:
                    type: string
                  employmentTypeId:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - active
                      - archived
                  reason:
                    type: boolean
                  substitute:
                    type: boolean
              example:
                id: 5731a2fb-c768-11eb-9cc1-0242ac120012
                typeId: O
                employeeType: WORKER_NONEMPLOYEE
                employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                status: active
                reason: true
                substitute: false
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/employee-types/{employeeTypeId}':
    get:
      summary: Get employee type by given employeeTypeId.
      tags:
        - Employee configuration - employee types
      parameters:
        - name: employeeTypeId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  typeId:
                    type: string
                  employeeType:
                    type: string
                  employmentTypeId:
                    type: string
                    format: uuid
                  employmentType:
                    type: string
                  status:
                    type: string
                    enum:
                      - active
                      - archived
                  reason:
                    type: boolean
                  substitute:
                    type: boolean
              example:
                id: 9c50ff18-4cc1-4c3e-8a98-90d01ae1c28d
                typeId: l1p0
                employeeType: WORKER_NONEMPLOYEE
                employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                employmentType: NONEMPLOYEE
                status: active
                reason: true
                substitute: false
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit employee type.
      tags:
        - Employee configuration - employee types
      parameters:
        - name: employeeTypeId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - typeId
                - employeeType
                - employmentTypeId
              properties:
                typeId:
                  type: string
                  minLength: 1
                  maxLength: 5
                employeeType:
                  type: string
                  minLength: 1
                  maxLength: 30
                employmentTypeId:
                  type: string
                  format: uuid
                status:
                  type: string
                  enum:
                    - active
                    - archived
                reason:
                  type: boolean
                substitute:
                  type: boolean
              additionalProperties: false
            example:
              typeId: O
              employeeType: WORKER_NONEMPLOYEE
              employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
              status: active
              reason: true
              substitute: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  typeId:
                    type: string
                  employeeType:
                    type: string
                  employmentTypeId:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - active
                      - archived
                  reason:
                    type: boolean
                  substitute:
                    type: boolean
              example:
                id: 5731a2fb-c768-11eb-9cc1-0242ac120012
                typeId: O
                employeeType: WORKER_NONEMPLOYEE
                employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                status: active
                reason: true
                substitute: false
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit field in employee type.
      tags:
        - Employee configuration - employee types
      parameters:
        - name: employeeTypeId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                typeId:
                  type: string
                  minLength: 1
                  maxLength: 5
                employeeType:
                  type: string
                  minLength: 1
                  maxLength: 30
                employmentTypeId:
                  type: string
                  format: uuid
                status:
                  type: string
                  enum:
                    - active
                    - archived
                reason:
                  type: boolean
                substitute:
                  type: boolean
              additionalProperties: false
            example:
              typeId: O
              employeeType: WORKER_NONEMPLOYEE
              employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
              status: active
              reason: true
              substitute: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  typeId:
                    type: string
                  employeeType:
                    type: string
                  employmentTypeId:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - active
                      - archived
                  reason:
                    type: boolean
                  substitute:
                    type: boolean
              example:
                id: 5731a2fb-c768-11eb-9cc1-0242ac120012
                typeId: O
                employeeType: WORKER_NONEMPLOYEE
                employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                status: active
                reason: true
                substitute: false
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/resource-types:
    get:
      summary: Get resource types list.
      tags:
        - Employee configuration - resource types
      parameters:
        - name: limit
          in: query
          required: false
        - name: page
          in: query
          required: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        typeId:
                          type: string
                        name:
                          type: string
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - active
                            - archived
                  total:
                    type: integer
                  limit:
                    type: integer
                  page:
                    type: integer
                  pages:
                    type: integer
              example:
                items:
                  - id: 1
                    typeId: F
                    name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
                    description: BACKEND_DEFAULT_DESCRIPTION_RESOURCE_TYPE_F
                    status: active
                  - id: 2
                    typeId: L
                    name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_L
                    description: BACKEND_DEFAULT_DESCRIPTION_RESOURCE_TYPE_L
                    status: archived
                total: 2
                limit: 50
                page: 1
                pages: 1
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create resource type.
      tags:
        - Employee configuration - resource types
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - typeId
                - name
                - description
              properties:
                typeId:
                  type: string
                  minLength: 1
                  maxLength: 2
                  pattern: '(^[a-zA-Z0-9]*$)'
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
              additionalProperties: false
            example:
              typeId: F
              name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
              description: BACKEND_DEFAULT_DESCRIPTION_RESOURCE_TYPE_F
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  typeId:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - archived
              example:
                id: 1
                typeId: F
                name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
                description: BACKEND_DEFAULT_DESCRIPTION_RESOURCE_TYPE_F
                status: active
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/resource-types/{resourceTypeId}':
    get:
      summary: Get resource type with given id.
      tags:
        - Employee configuration - resource types
      parameters:
        - name: resourceTypeId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  typeId:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - archived
              example:
                id: 1
                typeId: F
                name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
                description: BACKEND_DEFAULT_DESCRIPTION_RESOURCE_TYPE_F
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit resource type.
      tags:
        - Employee configuration - resource types
      parameters:
        - name: resourceTypeId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - typeId
                - name
                - description
                - status
              properties:
                typeId:
                  type: string
                  minLength: 1
                  maxLength: 2
                  pattern: '(^[a-zA-Z0-9]*$)'
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                status:
                  type: string
                  enum:
                    - active
                    - archived
              additionalProperties: false
            example:
              typeId: F
              name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
              description: BACKEND_DEFAULT_DESCRIPTION_RESOURCE_TYPE_F
              status: active
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  typeId:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - archived
              example:
                id: 1
                typeId: F
                name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
                description: BACKEND_DEFAULT_DESCRIPTION_RESOURCE_TYPE_F
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field in resource type.
      tags:
        - Employee configuration - resource types
      parameters:
        - name: resourceTypeId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                typeId:
                  type: string
                  minLength: 1
                  maxLength: 2
                  pattern: '(^[a-zA-Z0-9]*$)'
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                status:
                  type: string
                  enum:
                    - active
                    - archived
              additionalProperties: false
            example:
              typeId: F
              name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
              description: BACKEND_DEFAULT_DESCRIPTION_RESOURCE_TYPE_F
              status: active
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  typeId:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - archived
              example:
                id: 1
                typeId: F
                name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
                description: BACKEND_DEFAULT_DESCRIPTION_RESOURCE_TYPE_F
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/employments:
    get:
      summary: List of employments.
      tags:
        - Employments
      parameters:
        - name: employmentId
          in: query
          required: false
          schema:
            type: string
        - name: external
          description: >-
            Param determines if id of employment is external (number) or
            internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
        - name: employeeId
          description: >-
            This is an external identifier of company-employee (employeeId
            field)
          in: query
          required: false
        - name: limit
          in: query
          required: false
        - name: page
          in: query
          required: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        createdAt:
                          type: string
                        terminationDate:
                          type: string
                          nullable: true
                        effectiveStatus:
                          type: string
                          nullable: true
                        effectiveStatusDate:
                          type: string
                          nullable: true
                        userStatus:
                          type: string
                          nullable: true
                          enum:
                            - null
                            - active
                            - invited
                            - inactive
                        userCalculatedStatus:
                          type: string
                          nullable: true
                          enum:
                            - null
                            - active
                            - invited
                            - offboarding
                            - offboardingSoon
                            - inactive
                            - expired
                            - uninvited
                        invitationDateTimestamp:
                          type: integer
                          nullable: true
                        managerId:
                          type: integer
                          nullable: true
                        company:
                          type: object
                          properties:
                            id:
                              type: integer
                              nullable: true
                            name:
                              type: string
                              nullable: true
                          required:
                            - id
                            - name
                        statusDate:
                          type: string
                          nullable: true
                        validFrom:
                          type: string
                          nullable: true
                        validTo:
                          type: string
                          nullable: true
                        uuid:
                          type: string
                        mainWorkplace:
                          type: string
                          nullable: true
                        referenceId:
                          type: integer
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        isLastEmployment:
                          type: boolean
                        orgUnitManagerId:
                          type: integer
                          nullable: true
                        employmentManagerId:
                          type: integer
                          nullable: true
                        occupationalCode:
                          type: string
                          nullable: true
                        employmentComment:
                          type: string
                          nullable: true
                        employeeType:
                          type: object
                          nullable: true
                          properties:
                            id:
                              type: string
                              format: uuid
                            typeId:
                              type: string
                            employeeType:
                              type: string
                            employmentType:
                              type: string
                            employmentTypeId:
                              type: string
                              format: uuid
                            status:
                              type: string
                              enum:
                                - active
                                - archived
                        personalJobDescription:
                          type: string
                          nullable: true
                        positionTitle:
                          type: string
                          nullable: true
                        jobDescription:
                          type: string
                          nullable: true
                        probationPeriod:
                          type: string
                          nullable: true
                        noticePeriod:
                          type: string
                          nullable: true
                        terminateReason:
                          type: string
                          nullable: true
                        companyLocation:
                          type: object
                          nullable: true
                          properties:
                            companyNumber:
                              type: string
                              nullable: true
                            id:
                              type: integer
                            name:
                              type: string
                              nullable: true
                            visitAddress:
                              type: object
                              nullable: true
                              properties:
                                address:
                                  type: string
                                  nullable: true
                                zipCode:
                                  type: string
                                  nullable: true
                                city:
                                  type: string
                                  nullable: true
                                municipality:
                                  type: string
                                  nullable: true
                            postAddress:
                              type: object
                              nullable: true
                              properties:
                                address:
                                  type: string
                                  nullable: true
                                zipCode:
                                  type: string
                                  nullable: true
                                city:
                                  type: string
                                  nullable: true
                                municipality:
                                  type: string
                                  nullable: true
                            externalId:
                              type: string
                              minLength: 1
                              maxLength: 40
                        country:
                          type: string
                          nullable: true
                        startDate:
                          type: string
                        endDate:
                          type: string
                          nullable: true
                        hasEmploymentLocation:
                          type: boolean
                        costPlace:
                          type: string
                          nullable: true
                        salaryCurrency:
                          type: string
                          nullable: true
                        salaryDefinition:
                          type: string
                          nullable: true
                        salarySystemCompanyId:
                          type: string
                          nullable: true
                          maxLength: 30
                        salaryValue:
                          type: string
                          nullable: true
                        salaryType:
                          type: string
                          nullable: true
                        workRelationType:
                          type: string
                          nullable: true
                        workingHoursPerWeek:
                          type: number
                          nullable: true
                        workingHoursArrangement:
                          type: string
                          format: uuid
                          nullable: true
                        hrRoleId:
                          type: string
                        fteFactor:
                          type: number
                          nullable: true
                          minimum: 0.00001
                          maximum: 1
                        presentFteFactor:
                          type: number
                          nullable: true
                          minimum: 0.00001
                          maximum: 1
                        number:
                          type: string
                        documentStatus:
                          type: string
                          nullable: true
                        employeeId:
                          type: string
                          description: >-
                            This is an external identifier of company-employee
                            (employeeId field)
                          nullable: true
                        jobId:
                          type: integer
                          nullable: true
                        jobTitle:
                          type: string
                          nullable: true
                        userId:
                          type: string
                          nullable: true
                        userName:
                          type: string
                          nullable: true
                        userPhoto:
                          type: string
                          nullable: true
                        emailWork:
                          type: string
                          nullable: true
                        phoneNumberWork:
                          type: string
                          nullable: true
                        employmentStatus:
                          type: string
                          nullable: true
                        employmentCalculatedStatus:
                          type: string
                          nullable: true
                          enum:
                            - vacant
                            - active
                            - terminating
                            - former
                            - dueForTermination
                            - pastDueTermination
                            - pending
                        remainingDays:
                          type: integer
                          nullable: true
                        salarySeniorityDate:
                          type: string
                          nullable: true
                        orgUnitId:
                          type: integer
                        orgUnitName:
                          type: string
                          nullable: true
                        firstWorkingDay:
                          type: string
                          nullable: true
                        lastWorkingDay:
                          type: string
                          nullable: true
                  page:
                    type: integer
                  pages:
                    type: integer
                  limit:
                    type: integer
                  total:
                    type: integer
              example:
                items:
                  - id: 1
                    createdAt: '1970-01-01T03:00:00+0000'
                    terminationDate: '2021-05-31T00:00:00+0000'
                    effectiveStatus: current
                    effectiveStatusDate: null
                    userStatus: active
                    userCalculatedStatus: active
                    invitationDateTimestamp: 0
                    managerId: 2
                    company:
                      id: 2
                      name: '0'
                    statusDate: '2021-05-31T00:00:00+0000'
                    validFrom: '2021-05-31 00:00:00'
                    validTo: '2021-05-31 00:00:00'
                    uuid: 53fb5470-5f46-4c39-ac7c-da19abbd5c70
                    mainWorkplace: null
                    referenceId: 123
                    externalId: '444'
                    isLastEmployment: true
                    orgUnitManagerId: 1
                    employmentManagerId: 2
                    occupationalCode: ''
                    employmentComment: null
                    employeeType:
                      id: 9c50ff18-4cc1-4c3e-8a98-90d01ae1c28d
                      typeId: l1p0
                      employeeType: WORKER_NONEMPLOYEE
                      employmentType: NONEMPLOYEE
                      employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                      status: active
                    personalJobDescription: null
                    positionTitle: null
                    jobDescription: null
                    probationPeriod: null
                    noticePeriod: notice
                    terminateReason: reason
                    companyLocation: null
                    country: POL
                    startDate: '1970-01-01T00:00:00+0000'
                    endDate: null
                    hasEmploymentLocation: false
                    costPlace: null
                    salaryCurrency: null
                    salaryDefinition: salary_def
                    salarySystemCompanyId: SAL-123
                    salaryValue: '3000.00'
                    salaryType: SALARY_TYPE
                    workRelationType: null
                    workingHoursPerWeek: null
                    workingHoursArrangement: null
                    hrRoleId: 7e4bc28a-bef9-11eb-99ad-0242c0a85004
                    fteFactor: null
                    presentFteFactor: 0.3
                    number: '007'
                    documentStatus: active
                    employeeId: null
                    jobId: null
                    jobTitle: Investigator
                    userId: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                    userName: John Doe
                    userPhoto: >-
                      https://s.gravatar.com/avatar/21e747ff9fe5ca75167b30ac9c276f93?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fpp.png
                    emailWork: user@example.com
                    phoneNumberWork: null
                    employmentStatus: terminating
                    employmentCalculatedStatus: terminating
                    remainingDays: -1
                    salarySeniorityDate: '1970-01-01T00:00:00+0000'
                    OrgUnitId: 2
                    orgUnitName: Main Unit
                    firstWorkingDay: null
                    lastWorkingDay: null
                  - id: 2
                    createdAt: '2021-05-31T08:08:57+0000'
                    terminationDate: null
                    effectiveStatus: current
                    effectiveStatusDate: '2021-05-31T00:00:00+0000'
                    userStatus: null
                    userCalculatedStatus: uninvited
                    invitationDateTimestamp: 1622448535
                    managerId: 1
                    company:
                      id: 2
                      name: '0'
                    statusDate: '2021-05-31T00:00:00+0000'
                    validFrom: null
                    validTo: null
                    uuid: d5211ac0-1051-4c24-989d-e598cb2043d1
                    mainWorkplace: null
                    referenceId: null
                    externalId: '2222'
                    isLastEmployment: true
                    orgUnitManagerId: 1
                    employmentManagerId: null
                    occupationalCode: null
                    employmentComment: null
                    employeeType:
                      id: 9c50ff18-4cc1-4c3e-8a98-90d01ae1c28d
                      typeId: l1p0
                      employeeType: WORKER_NONEMPLOYEE
                      employmentType: NONEMPLOYEE
                      employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                      status: active
                    personalJobDescription: null
                    positionTitle: Investigator
                    jobDescription: null
                    probationPeriod: null
                    noticePeriod: null
                    terminateReason: null
                    companyLocation: null
                    country: null
                    startDate: '2021-05-31T00:00:00+0000'
                    endDate: null
                    hasEmploymentLocation: false
                    costPlace: null
                    salaryCurrency: null
                    salaryDefinition: null
                    salaryValue: null
                    salaryType: null
                    workRelationType: null
                    workingHoursPerWeek: null
                    workingHoursArrangement: null
                    hrRoleId: 7e6da26d-bef9-11eb-99ad-0242c0a85004
                    fteFactor: null
                    presentFteFactor: 1
                    number: '8'
                    documentStatus: active
                    employeeId: '1'
                    jobId: null
                    jobTitle: Investigator
                    userId: 71a35e37-c1e7-11eb-8666-0242c0a85017
                    userName: Johny
                    userPhoto: null
                    emailWork: null
                    phoneNumberWork: null
                    employmentStatus: null
                    employmentCalculatedStatus: active
                    remainingDays: null
                    salarySeniorityDate: '1970-01-01T00:00:00+0000'
                    OrgUnitId: 2
                    orgUnitName: 4Human Hrm
                    firstWorkingDay: '2021-05-31T00:00:00+0000'
                    lastWorkingDay: null
                total: 2
                limit: 25
                page: 1
                pages: 1
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create personnel employment.
      tags:
        - Employments
      parameters:
        - name: sendInvitiation
          description: Determines if invitation email should be sent.
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: true
          required: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - user
                - employment
                - personalIdentification
              properties:
                user:
                  type: object
                  required:
                    - firstName
                    - lastName
                  properties:
                    id:
                      type: string
                      nullable: true
                    firstName:
                      type: string
                      nullable: true
                      maxLength: 50
                      pattern: '(\S|(^(?![\s\S])))'
                    lastName:
                      type: string
                      nullable: true
                      maxLength: 40
                      pattern: '(\S|(^(?![\s\S])))'
                    email:
                      type: string
                      nullable: true
                      format: email
                      maxLength: 254
                    language:
                      type: string
                      nullable: true
                      minLength: 2
                    dateOfBirth:
                      type: string
                      nullable: true
                      format: date-time
                    gender:
                      type: string
                      nullable: true
                    activeDirectoryLogin:
                      type: string
                      nullable: true
                    loginMethod:
                      type: string
                      enum:
                        - AUTH0
                        - ACTIVE_DIRECTORY
                        - NO_USER
                    phoneNumberPrivate:
                      type: string
                      nullable: true
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    accountNumber:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    countryOfBank:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 50
                      pattern: (^$|^\S$|^\S.*\S$)
                personalIdentification:
                  type: object
                  properties:
                    idType:
                      type: string
                      nullable: true
                    idCountry:
                      type: string
                      nullable: true
                    idNumber:
                      type: string
                      nullable: true
                    passportCountry:
                      type: string
                      nullable: true
                    passportNumber:
                      type: string
                      nullable: true
                employment:
                  type: object
                  required:
                    - hrRoleId
                    - jobId
                    - startDate
                    - orgUnitsWithAdvancedAccess
                  properties:
                    id:
                      type: integer
                      nullable: true
                    number:
                      type: string
                      nullable: true
                    phoneNumberWork:
                      type: string
                      nullable: true
                      maxLength: 40
                    emailWork:
                      type: string
                      nullable: true
                      format: email
                    startDate:
                      type: string
                    endDate:
                      type: string
                      nullable: true
                    firstWorkingDay:
                      type: string
                      nullable: true
                    lastWorkingDay:
                      type: string
                      nullable: true
                    hrRoleId:
                      type: string
                    seniorityDate:
                      type: string
                      nullable: true
                    salaryDefinition:
                      type: string
                      nullable: true
                    salaryValue:
                      type: string
                      nullable: true
                      minimum: 0
                      maximum: 100000000000000000000
                    fteFactor:
                      type: number
                      nullable: true
                      minimum: 0.00001
                      maximum: 1
                    presentFteFactor:
                      type: number
                      nullable: true
                      minimum: 0
                      maximum: 1
                    salarySeniorityDate:
                      type: string
                      nullable: true
                    salaryType:
                      type: string
                      nullable: true
                    noticePeriod:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: '^[0-9]+[wmy]$'
                    probationPeriod:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: '^[0-9]+[wmy]$'
                    employeeType:
                      type: string
                      description: EmployeeType id
                      format: uuid
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: \S
                    comment:
                      type: string
                      nullable: true
                      maxLength: 1000
                    salaryCurrency:
                      type: string
                      nullable: true
                      minLength: 3
                      maxLength: 3
                      pattern: \S
                    mainWorkplace:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 36
                      pattern: \S
                    managerId:
                      type: integer
                      nullable: true
                    orgUnitId:
                      type: integer
                      minimum: 1
                    jobId:
                      type: integer
                    positionTitle:
                      type: string
                      nullable: true
                      maxLength: 40
                    personalJobDescription:
                      type: string
                      nullable: true
                      maxLength: 1000
                    costPlace:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                    location:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                    workRelationType:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 64
                    workingHoursArrangement:
                      type: string
                      format: uuid
                      nullable: true
                      minLength: 1
                      maxLength: 64
                    workingHoursPerWeek:
                      type: number
                      nullable: true
                      minimum: 0
                      maximum: 168
                    occupationalCode:
                      type: string
                      description: Use code only without name
                      nullable: true
                      minLength: 1
                      maxLength: 64
                    externalId:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                    customFields:
                      type: array
                      items:
                        type: object
                        required:
                          - fieldId
                          - valueId
                        properties:
                          fieldId:
                            type: string
                            format: uuid
                          valueId:
                            type: string
                            format: uuid
                        additionalProperties: false
                    orgUnitsWithAdvancedAccess:
                      type: array
                      nullable: true
                      minItems: 1
                      items:
                        type: integer
                    reasonForEmployment:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                    substituteForEmployment:
                      type: array
                      nullable: true
                      items:
                        type: integer
                    overtimeAllowance:
                      type: string
                      nullable: true
                      enum:
                        - FIELD_OVERTIME_ALLOWANCE_YES
                        - FIELD_OVERTIME_ALLOWANCE_NO
                        - null
                programTemplateId:
                  type: integer
                  nullable: true
                personalGreetings:
                  type: string
                  maxLength: 1024
                taskTemplateChanges:
                  type: array
                  nullable: true
                  required:
                    - taskTemplateId
                    - actorEmploymentId
                  items:
                    type: object
                    properties:
                      taskTemplateId:
                        type: integer
                      actorEmploymentId:
                        type: integer
                referenceDate:
                  type: string
                  nullable: true
                companyEmployee:
                  type: object
                  nullable: true
                  properties:
                    seniorityDate:
                      type: string
                      nullable: true
                    employeeId:
                      type: string
                      nullable: true
                    mainEmployer:
                      type: boolean
                      nullable: true
                    salaryNumber:
                      type: string
                      nullable: true
                      maxLength: 40
                    selfSickness:
                      type: string
                      nullable: true
                    freeEmployer:
                      type: object
                      nullable: true
                      properties:
                        from:
                          type: string
                          nullable: true
                        to:
                          type: string
                          nullable: true
                    workPermit:
                      type: object
                      nullable: true
                      properties:
                        from:
                          type: string
                          nullable: true
                        to:
                          type: string
                          nullable: true
                    terminationSeniorityDate:
                      type: string
                      nullable: true
                    residencePermit:
                      type: object
                      nullable: true
                      properties:
                        from:
                          type: string
                          nullable: true
                        to:
                          type: string
                          nullable: true
                    readyForPayment:
                      type: boolean
                    customFields:
                      type: array
                      items:
                        type: object
                        required:
                          - fieldId
                          - valueId
                        properties:
                          fieldId:
                            type: string
                            format: uuid
                          valueId:
                            type: string
                            format: uuid
                        additionalProperties: false
                    resourceType:
                      type: integer
                      nullable: true
            example:
              user:
                id: '12345'
                firstName: John
                lastName: Doe
                email: jdoe@gmail.com
                language: en
                dateOfBirth: '1970-01-01T00:00:00Z'
                gender: M
                loginMethod: ACTIVE_DIRECTORY
                activeDirectoryLogin: jdoe@4human.no
                phoneNumberPrivate: 555-11-11
                countryOfBank: NOR
                accountNumber: '52523365415454455'
              personalIdentification:
                idType: none
                idCountry: null
                idNumber: null
                passportCountry: NOR
                passportNumber: '987654321'
              employment:
                id: 1
                number: 123EF
                phoneNumberWork: '1234567789'
                emailWork: jdoe@pgs-soft.com
                startDate: '2018-05-17T08:08:56Z'
                endDate: '2018-05-17T08:08:56Z'
                firstWorkingDay: '2018-05-17T08:08:56Z'
                lastWorkingDay: '2018-05-17T08:08:56Z'
                hrRoleId: 2c623c34-1a36-11e9-a48f-080027122a07
                seniorityDate: '2018-05-17T08:08:56Z'
                salaryDefinition: definition
                salaryValue: '39888'
                fteFactor: 1
                presentFteFactor: 1
                salarySeniorityDate: '2018-05-17T08:08:56Z'
                salaryType: fixed_salary
                comment: OM NOM NOM
                noticePeriod: 2m
                probationPeriod: 2m
                employeeType: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                salaryCurrency: NOK
                mainWorkplace: b9ee8cbc-cda5-11e9-8233-080027122a07
                managerId: 12345
                orgUnitId: 1
                jobId: 666
                positionTitle: Sandwich artist
                personalJobDescription: I make the edible artistry happen.
                costPlace: string
                location: '13131332'
                workRelationType: WORK_RELATION_NOR_CONTRACTOR
                workingHoursArrangement: 480edc96-89de-4682-8c41-beeeb392a604
                workingHoursPerWeek: 37.5
                occupationalCode: '0112102'
                externalId: externalId
                customFields:
                  - fieldId: b9ee8cbc-cda5-11e9-8233-080027122a07
                    valueId: 1e8c0383-bd78-11eb-b065-0242ac150002
                orgUnitsWithAdvancedAccess:
                  - 17
                reasonForEmployment: reason
                substituteForEmployment:
                  - 1
                  - 2
                  - 3
                overtimeAllowance: FIELD_OVERTIME_ALLOWANCE_YES
              programTemplateId: 13
              personalGreetings: Hello
              taskTemplateChanges:
                - taskTemplateId: 10
                  actorEmploymentId: 70
              referenceDate: '2019-12-25T00:00:00+0000'
              companyEmployee:
                seniorityDate: '2019-08-29T00:00:00+02:00'
                employeeId: '66'
                mainEmployer: false
                salaryNumber: '1'
                selfSickness: '2019-07-30T00:00:00+02:00'
                freeEmployer:
                  from: '2019-07-30T00:00:00+02:00'
                  to: '2019-07-30T00:00:00+02:00'
                workPermit:
                  from: '2019-07-30T00:00:00+02:00'
                  to: '2019-07-30T00:00:00+02:00'
                terminationSeniorityDate: '2019-08-29T00:00:00+02:00'
                residencePermit:
                  from: '2019-07-30T00:00:00+02:00'
                  to: '2019-07-30T00:00:00+02:00'
                readyForPayment: true
                customFields:
                  - fieldId: b9ee8cbc-cda5-11e9-8233-080027122a07
                    valueId: 1e8c0383-bd78-11eb-b065-0242ac150002
                resourceType: 1
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
              example:
                id: 2225ab28-b0ef-11eb-9396-0242ac160016
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/employments/formers:
    post:
      summary: Create former personnel employment.
      tags:
        - Employments
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - user
                - personalIdentification
                - employment
                - companyEmployee
                - terminationReasonId
                - internalTerminationReasonId
              properties:
                user:
                  type: object
                  required:
                    - firstName
                    - lastName
                  properties:
                    id:
                      type: string
                      nullable: true
                    firstName:
                      type: string
                      nullable: true
                      maxLength: 50
                      pattern: '(\S|(^(?![\s\S])))'
                    lastName:
                      type: string
                      nullable: true
                      maxLength: 40
                      pattern: '(\S|(^(?![\s\S])))'
                    email:
                      type: string
                      nullable: true
                      format: email
                      maxLength: 254
                    language:
                      type: string
                      nullable: true
                      minLength: 2
                    dateOfBirth:
                      type: string
                      nullable: true
                      format: date-time
                    gender:
                      type: string
                      nullable: true
                    activeDirectoryLogin:
                      type: string
                      nullable: true
                    loginMethod:
                      type: string
                      enum:
                        - AUTH0
                        - ACTIVE_DIRECTORY
                        - NO_USER
                    phoneNumberPrivate:
                      type: string
                      nullable: true
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    accountNumber:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: (^$|^\S$|^\S.*\S$)
                    countryOfBank:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 50
                      pattern: (^$|^\S$|^\S.*\S$)
                personalIdentification:
                  type: object
                  properties:
                    idType:
                      type: string
                      nullable: true
                    idCountry:
                      type: string
                      nullable: true
                    idNumber:
                      type: string
                      nullable: true
                    passportCountry:
                      type: string
                      nullable: true
                    passportNumber:
                      type: string
                      nullable: true
                employment:
                  type: object
                  required:
                    - hrRoleId
                    - jobId
                    - startDate
                    - orgUnitsWithAdvancedAccess
                  properties:
                    number:
                      type: string
                      nullable: true
                    phoneNumberWork:
                      type: string
                      nullable: true
                      maxLength: 40
                    emailWork:
                      type: string
                      nullable: true
                      format: email
                    startDate:
                      type: string
                    endDate:
                      type: string
                      nullable: true
                    firstWorkingDay:
                      type: string
                      nullable: true
                    lastWorkingDay:
                      type: string
                      nullable: true
                    hrRoleId:
                      type: string
                    seniorityDate:
                      type: string
                      nullable: true
                    salaryDefinition:
                      type: string
                      nullable: true
                    salaryValue:
                      type: string
                      nullable: true
                      minimum: 0
                      maximum: 100000000000000000000
                    fteFactor:
                      type: number
                      nullable: true
                      minimum: 0.00001
                      maximum: 1
                    presentFteFactor:
                      type: number
                      nullable: true
                      minimum: 0
                      maximum: 1
                    salarySeniorityDate:
                      type: string
                      nullable: true
                    salaryType:
                      type: string
                      nullable: true
                    noticePeriod:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: '^[0-9]+[wmy]$'
                    probationPeriod:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: '^[0-9]+[wmy]$'
                    employeeType:
                      type: string
                      description: EmployeeType id
                      format: uuid
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      pattern: \S
                    comment:
                      type: string
                      nullable: true
                      maxLength: 1000
                    salaryCurrency:
                      type: string
                      nullable: true
                      minLength: 3
                      maxLength: 3
                      pattern: \S
                    mainWorkplace:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 36
                      pattern: \S
                    managerId:
                      type: integer
                      nullable: true
                    orgUnitId:
                      type: integer
                      minimum: 1
                    jobId:
                      type: integer
                    positionTitle:
                      type: string
                      nullable: true
                      maxLength: 40
                    personalJobDescription:
                      type: string
                      nullable: true
                      maxLength: 1000
                    costPlace:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                    location:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                    workRelationType:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 64
                    workingHoursArrangement:
                      type: string
                      format: uuid
                      nullable: true
                      minLength: 1
                      maxLength: 64
                    workingHoursPerWeek:
                      type: number
                      nullable: true
                      minimum: 0
                      maximum: 168
                    occupationalCode:
                      type: string
                      description: Use code only without name
                      nullable: true
                      minLength: 1
                      maxLength: 64
                    externalId:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                    customFields:
                      type: array
                      items:
                        type: object
                        required:
                          - fieldId
                          - valueId
                        properties:
                          fieldId:
                            type: string
                            format: uuid
                          valueId:
                            type: string
                            format: uuid
                        additionalProperties: false
                    orgUnitsWithAdvancedAccess:
                      type: array
                      nullable: true
                      minItems: 1
                      items:
                        type: integer
                    reasonForEmployment:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                    substituteForEmployment:
                      type: array
                      nullable: true
                      items:
                        type: integer
                    overtimeAllowance:
                      type: string
                      nullable: true
                      enum:
                        - FIELD_OVERTIME_ALLOWANCE_YES
                        - FIELD_OVERTIME_ALLOWANCE_NO
                        - null
                  additionalProperties: false
                companyEmployee:
                  type: object
                  nullable: true
                  properties:
                    seniorityDate:
                      type: string
                      nullable: true
                    employeeId:
                      type: string
                      nullable: true
                    mainEmployer:
                      type: boolean
                      nullable: true
                    salaryNumber:
                      type: string
                      nullable: true
                      maxLength: 40
                    selfSickness:
                      type: string
                      nullable: true
                    freeEmployer:
                      type: object
                      nullable: true
                      properties:
                        from:
                          type: string
                          nullable: true
                        to:
                          type: string
                          nullable: true
                    workPermit:
                      type: object
                      nullable: true
                      properties:
                        from:
                          type: string
                          nullable: true
                        to:
                          type: string
                          nullable: true
                    terminationSeniorityDate:
                      type: string
                      nullable: true
                    residencePermit:
                      type: object
                      nullable: true
                      properties:
                        from:
                          type: string
                          nullable: true
                        to:
                          type: string
                          nullable: true
                    readyForPayment:
                      type: boolean
                    customFields:
                      type: array
                      items:
                        type: object
                        required:
                          - fieldId
                          - valueId
                        properties:
                          fieldId:
                            type: string
                            format: uuid
                          valueId:
                            type: string
                            format: uuid
                        additionalProperties: false
                    resourceType:
                      type: integer
                      nullable: true
                terminationReasonId:
                  type: string
                internalTerminationReasonId:
                  type: string
                  format: uuid
              additionalProperties: false
            example:
              user:
                id: '12345'
                firstName: John
                lastName: Doe
                email: jdoe@gmail.com
                language: en
                dateOfBirth: '1970-01-01T00:00:00Z'
                gender: M
                loginMethod: ACTIVE_DIRECTORY
                activeDirectoryLogin: jdoe@4human.no
                phoneNumberPrivate: 555-11-11
                countryOfBank: NOR
                accountNumber: '52523365415454455'
              personalIdentification:
                idType: none
                idCountry: null
                idNumber: null
                passportCountry: NOR
                passportNumber: '987654321'
              employment:
                number: 123EF
                phoneNumberWork: '1234567789'
                emailWork: jdoe@pgs-soft.com
                startDate: '2018-05-17T08:08:56Z'
                endDate: '2018-05-17T08:08:56Z'
                firstWorkingDay: '2018-05-17T08:08:56Z'
                lastWorkingDay: '2018-05-17T08:08:56Z'
                hrRoleId: 2c623c34-1a36-11e9-a48f-080027122a07
                seniorityDate: '2018-05-17T08:08:56Z'
                salaryDefinition: definition
                salaryValue: '39888'
                fteFactor: 1
                presentFteFactor: 1
                salarySeniorityDate: '2018-05-17T08:08:56Z'
                salaryType: fixed_salary
                comment: OM NOM NOM
                noticePeriod: 2m
                probationPeriod: 2m
                employeeType: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                salaryCurrency: NOK
                mainWorkplace: b9ee8cbc-cda5-11e9-8233-080027122a07
                managerId: 12345
                orgUnitId: 1
                jobId: 666
                positionTitle: Sandwich artist
                personalJobDescription: I make the edible artistry happen.
                costPlace: string
                location: '13131332'
                workRelationType: WORK_RELATION_NOR_CONTRACTOR
                workingHoursArrangement: 480edc96-89de-4682-8c41-beeeb392a604
                workingHoursPerWeek: 37.5
                occupationalCode: '0112102'
                externalId: externalId
                customFields:
                  - fieldId: b9ee8cbc-cda5-11e9-8233-080027122a07
                    valueId: 1e8c0383-bd78-11eb-b065-0242ac150002
                orgUnitsWithAdvancedAccess:
                  - 17
                reasonForEmployment: reason
                substituteForEmployment:
                  - 1
                  - 2
                  - 3
                overtimeAllowance: FIELD_OVERTIME_ALLOWANCE_YES
              companyEmployee:
                seniorityDate: '2019-08-29T00:00:00+02:00'
                employeeId: '66'
                mainEmployer: false
                salaryNumber: '1'
                selfSickness: '2019-07-30T00:00:00+02:00'
                freeEmployer:
                  from: '2019-07-30T00:00:00+02:00'
                  to: '2019-07-30T00:00:00+02:00'
                workPermit:
                  from: '2019-07-30T00:00:00+02:00'
                  to: '2019-07-30T00:00:00+02:00'
                terminationSeniorityDate: '2019-08-29T00:00:00+02:00'
                residencePermit:
                  from: '2019-07-30T00:00:00+02:00'
                  to: '2019-07-30T00:00:00+02:00'
                readyForPayment: true
                customFields:
                  - fieldId: b9ee8cbc-cda5-11e9-8233-080027122a07
                    valueId: 1e8c0383-bd78-11eb-b065-0242ac150002
                resourceType: 1
              terminationReasonId: '23420948'
              internalTerminationReasonId: 47ea068b-a752-11eb-b815-0242ac120006
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
              example:
                id: 2225ab28-b0ef-11eb-9396-0242ac160016
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/employments/configuration:
    get:
      summary: Get fields required for employment creation.
      tags:
        - Employments
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        value:
                          nullable: true
              example:
                items:
                  - key: number
                    value: '8'
                  - key: country
                    value: null
                  - key: phoneNumberWork
                    value: null
                  - key: emailWork
                    value: null
                  - key: startDate
                    value: null
                  - key: endDate
                    value: null
                  - key: firstWorkingDay
                    value: null
                  - key: lastWorkingDay
                    value: null
                  - key: fteFactor
                    value: null
                  - key: presentFteFactor
                    value: 1
                  - key: salarySeniorityDate
                    value: null
                  - key: salaryDefinition
                    value: null
                  - key: salaryValue
                    value: null
                  - key: salaryCurrency
                    value: null
                  - key: salaryType
                    value: null
                  - key: noticePeriod
                    value: null
                  - key: probationPeriod
                    value: null
                  - key: employeeType
                    value: null
                  - key: employeeTypeId
                    value: null
                  - key: employmentType
                    value: null
                  - key: comment
                    value: null
                  - key: hrRoleTitle
                    value: null
                  - key: hrRoleId
                    value: null
                  - key: hrRole
                    value: null
                  - key: job
                    value: null
                  - key: positionTitle
                    value: null
                  - key: generalJobDescription
                    value: null
                  - key: personalJobDescription
                    value: null
                  - key: companyId
                    value: null
                  - key: orgUnit
                    value: null
                  - key: orgUnitName
                    value: null
                  - key: managerId
                    value: null
                  - key: seniorityDate
                    value: null
                  - key: isLastEmployment
                    value: null
                  - key: startEndDateSummary
                    value: null
                  - key: employeeId
                    value: '1'
                  - key: primaryEmployment
                    value: null
                  - key: mainWorkplace
                    value: null
                  - key: costPlace
                    value: null
                  - key: location
                    value: null
                  - key: hasEmploymentLocation
                    value: null
                  - key: workRelationType
                    value: null
                  - key: workingHoursArrangement
                    value: null
                  - key: workingHoursPerWeek
                    value: null
                  - key: workStatus
                    value: null
                  - key: readyForPayment
                    value: null
                  - key: occupationalCode
                    value: null
                  - key: hasEmploymentOccupationalCode
                    value: null
                  - key: externalId
                    value: null
                  - key: orderNumber
                    value: null
                  - key: reasonForEmployment
                    value: null
                  - key: substituteForEmployment
                    value: null
                  - key: overtimeAllowance
                    value: null
                  - key: customFields
                    value: []
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/employments/{employmentId}':
    get:
      summary: Get employment details.
      tags:
        - Employments
      parameters:
        - name: employmentId
          in: path
          required: true
          schema:
            type: string
        - name: external
          description: >-
            Param determines if id of employment is external (number) or
            internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - number
                  - documentStatus
                  - country
                  - phoneNumberWork
                  - emailWork
                  - startDate
                  - endDate
                  - fteFactor
                  - salaryDefinition
                  - salaryValue
                  - salarySeniorityDate
                  - salaryCurrency
                  - salaryType
                  - noticePeriod
                  - probationPeriod
                  - employeeType
                  - comment
                  - positionTitle
                  - personalJobDescription
                  - userId
                  - firstWorkingDay
                  - lastWorkingDay
                  - mainWorkplaceId
                  - managerForUnit
                  - effectiveStatus
                  - referenceId
                  - hasEmploymentLocation
                  - locationCompanyNumber
                  - locationName
                  - locationAddress
                  - locationZipCode
                  - locationCity
                  - locationMunicipality
                  - costPlace
                  - workRelationType
                  - workingHoursArrangement
                  - workingHoursPerWeek
                  - occupationalCode
                  - hasOccupationalCode
                  - externalId
                  - validFrom
                  - validTo
                  - effectiveStatusDate
                  - previousSnapshotId
                  - nextSnapshotId
                  - userName
                  - userPhoto
                  - seniorityDate
                  - employmentStatus
                  - employmentCalculatedStatus
                  - statusDate
                  - terminationOrOffboardingDate
                  - terminateReason
                  - isLastEmployment
                  - manager
                  - managerPhoto
                  - managerJobTitle
                  - managerId
                  - hasEmploymentManager
                  - orgUnitId
                  - orgUnitName
                  - companyId
                  - hrRoleTitle
                  - hrRoleId
                  - customFields
                  - reasonForEmployment
                  - substituteForEmployment
                  - overtimeAllowance
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  documentStatus:
                    type: object
                    nullable: true
                    properties:
                      status:
                        type: string
                        enum:
                          - COVERED_BY_EXISTING_DOCUMENT
                          - LEAVE_IT_FOR_LATER
                          - WORK_AGREEMENT_COVERED_BY_EXISTING_DOCUMENT
                          - WORK_AGREEMENT_LEAVE_IT_FOR_LATER
                          - CANDIDATE_EXISTING_AGREEMENT
                          - CANDIDATE_OTHER_DOCUMENTS
                          - CANDIDATE_WITHOUT_AGREEMENT
                          - DOCUMENT_STATUS_IN_PROGRESS
                          - DOCUMENT_STATUS_FOR_SIGNING
                          - DOCUMENT_STATUS_CANDIDATE_APPROVAL
                          - CANDIDATE_REJECT
                      statusDate:
                        type: string
                        format: date-time
                  country:
                    type: string
                    nullable: true
                  phoneNumberWork:
                    type: string
                    nullable: true
                  emailWork:
                    type: string
                    nullable: true
                  startDate:
                    type: string
                    nullable: true
                  endDate:
                    type: string
                    nullable: true
                  fteFactor:
                    type: number
                    nullable: true
                    minimum: 0.00001
                    maximum: 1
                  presentFteFactor:
                    type: number
                    nullable: true
                    minimum: 0.00001
                    maximum: 1
                  salaryDefinition:
                    type: string
                    nullable: true
                  salarySystemCompanyId:
                    type: string
                    nullable: true
                    maxLength: 30
                  salaryValue:
                    type: string
                    nullable: true
                  salarySeniorityDate:
                    type: string
                    nullable: true
                  salaryCurrency:
                    type: string
                    nullable: true
                  salaryType:
                    type: string
                    nullable: true
                  noticePeriod:
                    type: string
                    nullable: true
                  probationPeriod:
                    type: string
                    nullable: true
                  employeeType:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                        format: uuid
                      typeId:
                        type: string
                      employeeType:
                        type: string
                      employmentType:
                        type: string
                      employmentTypeId:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                          - active
                          - archived
                  comment:
                    type: string
                    nullable: true
                  job:
                    type: object
                    required:
                      - title
                      - number
                      - description
                      - evolutionId
                      - status
                      - occupationalCodes
                    properties:
                      id:
                        type: integer
                      title:
                        type: string
                      number:
                        type: string
                      description:
                        type: string
                        nullable: true
                      evolutionId:
                        type: integer
                        nullable: true
                      status:
                        type: string
                      createdAt:
                        type: string
                      occupationalCodes:
                        type: array
                        items:
                          type: object
                          required:
                            - country
                            - code
                            - name
                          properties:
                            country:
                              type: string
                            code:
                              type: string
                            name:
                              type: string
                  positionTitle:
                    type: string
                    nullable: true
                  personalJobDescription:
                    type: string
                    nullable: true
                  userId:
                    type: string
                    nullable: true
                  firstWorkingDay:
                    type: string
                    nullable: true
                  lastWorkingDay:
                    type: string
                    nullable: true
                  mainWorkplaceId:
                    type: string
                    nullable: true
                  managerForUnit:
                    type: string
                    nullable: true
                  effectiveStatus:
                    type: string
                    nullable: true
                  referenceId:
                    type: integer
                    nullable: true
                  hasEmploymentLocation:
                    type: boolean
                  locationCompanyNumber:
                    type: string
                    nullable: true
                  locationName:
                    type: string
                    nullable: true
                  locationAddress:
                    type: string
                    nullable: true
                  locationZipCode:
                    type: string
                    nullable: true
                  locationCity:
                    type: string
                    nullable: true
                  locationMunicipality:
                    type: string
                    nullable: true
                  costPlace:
                    type: string
                    nullable: true
                  workRelationType:
                    type: string
                    nullable: true
                  workingHoursArrangement:
                    type: string
                    nullable: true
                  workingHoursPerWeek:
                    type: number
                    nullable: true
                  occupationalCode:
                    type: string
                    nullable: true
                  hasOccupationalCode:
                    type: boolean
                  externalId:
                    type: string
                    nullable: true
                  validFrom:
                    type: string
                    nullable: true
                  validTo:
                    type: string
                    nullable: true
                  effectiveStatusDate:
                    type: string
                    nullable: true
                  previousSnapshotId:
                    type: string
                    nullable: true
                  nextSnapshotId:
                    type: string
                    nullable: true
                  userName:
                    type: string
                    nullable: true
                  userPhoto:
                    type: string
                    nullable: true
                  seniorityDate:
                    type: string
                    nullable: true
                  employmentStatus:
                    type: string
                    nullable: true
                  employmentCalculatedStatus:
                    type: string
                    nullable: true
                  statusDate:
                    type: string
                    nullable: true
                  terminationOrOffboardingDate:
                    type: string
                    nullable: true
                  terminateReason:
                    type: string
                    nullable: true
                  isLastEmployment:
                    type: string
                    nullable: true
                  manager:
                    type: string
                    nullable: true
                  managerPhoto:
                    type: string
                    nullable: true
                  managerJobTitle:
                    type: string
                    nullable: true
                  managerId:
                    type: integer
                    nullable: true
                  hasEmploymentManager:
                    type: boolean
                  orgUnitId:
                    type: integer
                  orgUnitName:
                    type: string
                    nullable: true
                  companyId:
                    type: integer
                    nullable: true
                  hrRoleTitle:
                    type: string
                    nullable: true
                  hrRoleId:
                    type: string
                  customFields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldId:
                          type: string
                          format: uuid
                        valueId:
                          type: string
                          nullable: true
                          format: uuid
                        fieldTemplateId:
                          type: string
                          nullable: true
                          format: uuid
                        field:
                          type: string
                        value:
                          type: string
                          nullable: true
                        fieldTemplateName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalId:
                          type: string
                          maxLength: 40
                        valueExternalId:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalId:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalName:
                          type: string
                          maxLength: 40
                        valueExternalName:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalName:
                          type: string
                          nullable: true
                          maxLength: 40
                        hasCustomFields:
                          type: boolean
                  reasonForEmployment:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                  substituteForEmployment:
                    type: array
                    nullable: true
                    items:
                      type: integer
                  overtimeAllowance:
                    type: string
                    nullable: true
                    enum:
                      - FIELD_OVERTIME_ALLOWANCE_YES
                      - FIELD_OVERTIME_ALLOWANCE_NO
                      - null
              example:
                id: 1
                number: '007'
                documentStatus:
                  status: DOCUMENT_STATUS_CANDIDATE_APPROVAL
                  statusDate: '2020-01-01T00:00:00+00:00'
                country: ATA
                phoneNumberWork: null
                emailWork: null
                startDate: '1970-01-01T00:00:00+0000'
                endDate: null
                fteFactor: 1
                presentFteFactor: null
                salaryDefinition: null
                salaryValue: '1000.00'
                salarySeniorityDate: null
                salaryCurrency: null
                salarySystemCompanyId: SAL-123
                salaryType: null
                noticePeriod: null
                probationPeriod: null
                employeeType:
                  id: 9c50ff18-4cc1-4c3e-8a98-90d01ae1c28d
                  typeId: l1p0
                  employeeType: WORKER_NONEMPLOYEE
                  employmentType: NONEMPLOYEE
                  employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                  status: active
                comment: null
                job:
                  id: 1
                  title: Investigator
                  number: '007'
                  description: null
                  evolutionId: 123
                  status: active
                  createdAt: '1970-01-01T01:00:00+0000'
                  occupationalCodes:
                    - country: nor
                      code: '1143104'
                      name: KORPORAL
                positionTitle: null
                personalJobDescription: null
                userId: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                firstWorkingDay: null
                lastWorkingDay: null
                mainWorkplaceId: null
                managerForUnit: '[{"unitId":2,"name":"Company Name"}]'
                effectiveStatus: current
                referenceId: 1
                hasEmploymentLocation: false
                locationCompanyNumber: null
                locationName: null
                locationAddress: null
                locationZipCode: null
                locationCity: null
                locationMunicipality: null
                costPlace: null
                workRelationType: null
                workingHoursArrangement: null
                workingHoursPerWeek: null
                occupationalCode: null
                hasOccupationalCode: false
                externalId: null
                validFrom: null
                validTo: null
                effectiveStatusDate: null
                previousSnapshotId: null
                nextSnapshotId: null
                userName: John Doe
                userPhoto: >-
                  https://s.gravatar.com/avatar/5adda6c4672ef75cc1c394c7056fb325?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fmm.png
                seniorityDate: null
                employmentStatus: null
                employmentCalculatedStatus: active
                statusDate: '1970-01-01T00:00:00+0000'
                terminationOrOffboardingDate: null
                terminateReason: ''
                isLastEmployment: 'true'
                manager: John Doe
                managerPhoto: >-
                  https://s.gravatar.com/avatar/5adda6c4672ef75cc1c394c7056fb325?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fmm.png
                managerJobTitle: Investigator
                managerId: 1
                hasEmploymentManager: false
                orgUnitId: 2
                orgUnitName: Company Name
                companyId: 2
                hrRoleTitle: APP_INTERNAL_HR_ROLE_HR
                hrRoleId: 4391eeb4-a1bc-11eb-b327-0242ac170008
                customFields:
                  - fieldId: 0cb45f02-b8a1-11eb-bc74-0242ac15000b
                    valueId: cc5506a3-ca82-11eb-ab7b-0242ac150027
                    fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                    field: Country of origin
                    value: Norway
                    fieldTemplateName: Country
                    fieldExternalId: Country
                    valueExternalId: NOR_01
                    fieldTemplateExternalId: country
                    fieldExternalName: Country
                    fieldTemplateExternalName: country_name
                    valueExternalName: NOR
                    hasCustomFields: true
                reasonForEmployment: reason
                substituteForEmployment:
                  - 1
                  - 2
                  - 3
                overtimeAllowance: FIELD_OVERTIME_ALLOWANCE_YES
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Updates an employment.
      description: >-
        Only available fields will be updated. If the field is hidden in an
        employee profile, it will be omitted.
      tags:
        - Employments
      parameters:
        - name: employmentId
          in: path
          required: true
          schema:
            type: string
        - name: external
          description: >-
            Param determines if id of employment is external (number) or
            internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - number
                - phoneNumberWork
                - emailWork
                - startDate
                - endDate
                - fteFactor
                - presentFteFactor
                - salaryDefinition
                - salaryType
                - noticePeriod
                - probationPeriod
                - salaryValue
                - salarySeniorityDate
                - employeeTypeId
                - comment
                - jobId
                - positionTitle
                - personalJobDescription
                - hrRoleId
                - salaryCurrency
                - firstWorkingDay
                - lastWorkingDay
                - mainWorkplaceId
                - managerId
                - orgUnitId
                - costPlace
                - workRelationType
                - workingHoursArrangement
                - workingHoursPerWeek
                - occupationalCode
                - externalId
                - customFields
                - effectiveDates
              properties:
                number:
                  type: string
                  minLength: 1
                  maxLength: 40
                  pattern: \S
                phoneNumberWork:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 40
                  pattern: \S
                emailWork:
                  type: string
                  nullable: true
                  format: email
                startDate:
                  type: string
                endDate:
                  type: string
                  nullable: true
                fteFactor:
                  type: number
                  nullable: true
                  minimum: 0.00001
                  maximum: 1
                presentFteFactor:
                  type: number
                  nullable: true
                  minimum: 0.00001
                  maximum: 1
                salaryDefinition:
                  type: string
                  nullable: true
                salaryType:
                  type: string
                  nullable: true
                noticePeriod:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: '^[0-9]+[wmy]$'
                probationPeriod:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: '^[0-9]+[wmy]$'
                salaryValue:
                  type: string
                  nullable: true
                  minimum: 0
                  maximum: 100000000000000000000
                salarySeniorityDate:
                  type: string
                  nullable: true
                  format: date-time
                employeeTypeId:
                  type: string
                  format: uuid
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: \S
                comment:
                  type: string
                  nullable: true
                  maxLength: 1000
                jobId:
                  type: integer
                positionTitle:
                  type: string
                  nullable: true
                  maxLength: 40
                personalJobDescription:
                  type: string
                  nullable: true
                  maxLength: 1000
                hrRoleId:
                  type: string
                salaryCurrency:
                  type: string
                  nullable: true
                  minLength: 3
                  maxLength: 3
                  pattern: \S
                firstWorkingDay:
                  type: string
                  nullable: true
                  format: date-time
                lastWorkingDay:
                  type: string
                  nullable: true
                  format: date-time
                mainWorkplaceId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 36
                  pattern: \S
                managerId:
                  type: integer
                  nullable: true
                orgUnitId:
                  type: integer
                  minimum: 1
                costPlace:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 40
                workRelationType:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 64
                workingHoursArrangement:
                  type: string
                  format: uuid
                  nullable: true
                  minLength: 1
                  maxLength: 64
                workingHoursPerWeek:
                  type: number
                  nullable: true
                  minimum: 0
                  maximum: 168
                occupationalCode:
                  type: string
                  description: Use code only without name
                  nullable: true
                  minLength: 1
                  maxLength: 64
                externalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 40
                customFields:
                  type: array
                  items:
                    type: object
                    required:
                      - fieldId
                      - valueId
                    properties:
                      fieldId:
                        type: string
                        format: uuid
                      valueId:
                        type: string
                        format: uuid
                    additionalProperties: false
                effectiveDates:
                  type: object
                  required:
                    - immediate
                    - comment
                    - startValidityDate
                    - endValidityDate
                  properties:
                    comment:
                      type: string
                      nullable: true
                    startValidityDate:
                      type: string
                      nullable: true
                    endValidityDate:
                      type: string
                      nullable: true
                    immediate:
                      type: boolean
                      nullable: true
                reasonForEmployment:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                substituteForEmployment:
                  type: array
                  nullable: true
                  items:
                    type: integer
                overtimeAllowance:
                  type: string
                  nullable: true
                  enum:
                    - FIELD_OVERTIME_ALLOWANCE_YES
                    - FIELD_OVERTIME_ALLOWANCE_NO
                    - null
            example:
              number: Unique employment number which is string
              phoneNumberWork: '987239487'
              emailWork: email@email.com
              startDate: '1990-01-01T00:00:00+0100'
              endDate: '1990-01-01T00:00:00+0100'
              fteFactor: 1
              presentFteFactor: 0.3
              salaryDefinition: SALARY_DEFINITION_MONTHLY
              salaryValue: '39888.50'
              salarySeniorityDate: '1990-01-01T12:00:00Z'
              noticePeriod: 2m
              probationPeriod: 2m
              salaryType: fixed_salary
              employeeTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
              comment: OM NOM NOM
              jobId: 13
              positionTitle: Sandwich artist
              personalJobDescription: I make the sandwich artistry happen
              hrRoleId: 2c623c34-1a36-11e9-a48f-080027122a07
              salaryCurrency: NOK
              firstWorkingDay: '1990-01-01T12:00:00Z'
              lastWorkingDay: '1990-01-01T12:00:00Z'
              managerId: 123192837
              orgUnitId: 34
              mainWorkplaceId: b9ee8cbc-cda5-11e9-8233-080027122a07
              costPlace: string
              workRelationType: WORK_RELATION_NOR_CONTRACTOR
              workingHoursArrangement: 480edc96-89de-4682-8c41-beeeb392a604
              workingHoursPerWeek: 37.5
              occupationalCode: '0112102'
              externalId: null
              customFields:
                - fieldId: b9ee8cbc-cda5-11e9-8233-080027122a07
                  valueId: 1e8c0383-bd78-11eb-b065-0242ac150002
              effectiveDates:
                comment: null
                startValidityDate: null
                endValidityDate: null
                immediate: true
              reasonForEmployment: reason
              substituteForEmployment:
                - 1
                - 2
                - 3
              overtimeAllowance: FIELD_OVERTIME_ALLOWANCE_YES
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - number
                  - documentStatus
                  - country
                  - phoneNumberWork
                  - emailWork
                  - startDate
                  - endDate
                  - fteFactor
                  - salaryDefinition
                  - salaryValue
                  - salarySeniorityDate
                  - salaryCurrency
                  - salaryType
                  - noticePeriod
                  - probationPeriod
                  - employeeType
                  - comment
                  - positionTitle
                  - personalJobDescription
                  - userId
                  - firstWorkingDay
                  - lastWorkingDay
                  - mainWorkplaceId
                  - managerForUnit
                  - effectiveStatus
                  - referenceId
                  - hasEmploymentLocation
                  - locationCompanyNumber
                  - locationName
                  - locationAddress
                  - locationZipCode
                  - locationCity
                  - locationMunicipality
                  - costPlace
                  - workRelationType
                  - workingHoursArrangement
                  - workingHoursPerWeek
                  - occupationalCode
                  - hasOccupationalCode
                  - externalId
                  - validFrom
                  - validTo
                  - effectiveStatusDate
                  - previousSnapshotId
                  - nextSnapshotId
                  - userName
                  - userPhoto
                  - seniorityDate
                  - employmentStatus
                  - employmentCalculatedStatus
                  - statusDate
                  - terminationOrOffboardingDate
                  - terminateReason
                  - isLastEmployment
                  - manager
                  - managerPhoto
                  - managerJobTitle
                  - managerId
                  - hasEmploymentManager
                  - orgUnitId
                  - orgUnitName
                  - companyId
                  - hrRoleTitle
                  - hrRoleId
                  - customFields
                  - reasonForEmployment
                  - substituteForEmployment
                  - overtimeAllowance
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  documentStatus:
                    type: object
                    nullable: true
                    properties:
                      status:
                        type: string
                        enum:
                          - COVERED_BY_EXISTING_DOCUMENT
                          - LEAVE_IT_FOR_LATER
                          - WORK_AGREEMENT_COVERED_BY_EXISTING_DOCUMENT
                          - WORK_AGREEMENT_LEAVE_IT_FOR_LATER
                          - CANDIDATE_EXISTING_AGREEMENT
                          - CANDIDATE_OTHER_DOCUMENTS
                          - CANDIDATE_WITHOUT_AGREEMENT
                          - DOCUMENT_STATUS_IN_PROGRESS
                          - DOCUMENT_STATUS_FOR_SIGNING
                          - DOCUMENT_STATUS_CANDIDATE_APPROVAL
                          - CANDIDATE_REJECT
                      statusDate:
                        type: string
                        format: date-time
                  country:
                    type: string
                    nullable: true
                  phoneNumberWork:
                    type: string
                    nullable: true
                  emailWork:
                    type: string
                    nullable: true
                  startDate:
                    type: string
                    nullable: true
                  endDate:
                    type: string
                    nullable: true
                  fteFactor:
                    type: number
                    nullable: true
                    minimum: 0.00001
                    maximum: 1
                  presentFteFactor:
                    type: number
                    nullable: true
                    minimum: 0.00001
                    maximum: 1
                  salaryDefinition:
                    type: string
                    nullable: true
                  salarySystemCompanyId:
                    type: string
                    nullable: true
                    maxLength: 30
                  salaryValue:
                    type: string
                    nullable: true
                  salarySeniorityDate:
                    type: string
                    nullable: true
                  salaryCurrency:
                    type: string
                    nullable: true
                  salaryType:
                    type: string
                    nullable: true
                  noticePeriod:
                    type: string
                    nullable: true
                  probationPeriod:
                    type: string
                    nullable: true
                  employeeType:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                        format: uuid
                      typeId:
                        type: string
                      employeeType:
                        type: string
                      employmentType:
                        type: string
                      employmentTypeId:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                          - active
                          - archived
                  comment:
                    type: string
                    nullable: true
                  job:
                    type: object
                    required:
                      - title
                      - number
                      - description
                      - evolutionId
                      - status
                      - occupationalCodes
                    properties:
                      id:
                        type: integer
                      title:
                        type: string
                      number:
                        type: string
                      description:
                        type: string
                        nullable: true
                      evolutionId:
                        type: integer
                        nullable: true
                      status:
                        type: string
                      createdAt:
                        type: string
                      occupationalCodes:
                        type: array
                        items:
                          type: object
                          required:
                            - country
                            - code
                            - name
                          properties:
                            country:
                              type: string
                            code:
                              type: string
                            name:
                              type: string
                  positionTitle:
                    type: string
                    nullable: true
                  personalJobDescription:
                    type: string
                    nullable: true
                  userId:
                    type: string
                    nullable: true
                  firstWorkingDay:
                    type: string
                    nullable: true
                  lastWorkingDay:
                    type: string
                    nullable: true
                  mainWorkplaceId:
                    type: string
                    nullable: true
                  managerForUnit:
                    type: string
                    nullable: true
                  effectiveStatus:
                    type: string
                    nullable: true
                  referenceId:
                    type: integer
                    nullable: true
                  hasEmploymentLocation:
                    type: boolean
                  locationCompanyNumber:
                    type: string
                    nullable: true
                  locationName:
                    type: string
                    nullable: true
                  locationAddress:
                    type: string
                    nullable: true
                  locationZipCode:
                    type: string
                    nullable: true
                  locationCity:
                    type: string
                    nullable: true
                  locationMunicipality:
                    type: string
                    nullable: true
                  costPlace:
                    type: string
                    nullable: true
                  workRelationType:
                    type: string
                    nullable: true
                  workingHoursArrangement:
                    type: string
                    nullable: true
                  workingHoursPerWeek:
                    type: number
                    nullable: true
                  occupationalCode:
                    type: string
                    nullable: true
                  hasOccupationalCode:
                    type: boolean
                  externalId:
                    type: string
                    nullable: true
                  validFrom:
                    type: string
                    nullable: true
                  validTo:
                    type: string
                    nullable: true
                  effectiveStatusDate:
                    type: string
                    nullable: true
                  previousSnapshotId:
                    type: string
                    nullable: true
                  nextSnapshotId:
                    type: string
                    nullable: true
                  userName:
                    type: string
                    nullable: true
                  userPhoto:
                    type: string
                    nullable: true
                  seniorityDate:
                    type: string
                    nullable: true
                  employmentStatus:
                    type: string
                    nullable: true
                  employmentCalculatedStatus:
                    type: string
                    nullable: true
                  statusDate:
                    type: string
                    nullable: true
                  terminationOrOffboardingDate:
                    type: string
                    nullable: true
                  terminateReason:
                    type: string
                    nullable: true
                  isLastEmployment:
                    type: string
                    nullable: true
                  manager:
                    type: string
                    nullable: true
                  managerPhoto:
                    type: string
                    nullable: true
                  managerJobTitle:
                    type: string
                    nullable: true
                  managerId:
                    type: integer
                    nullable: true
                  hasEmploymentManager:
                    type: boolean
                  orgUnitId:
                    type: integer
                  orgUnitName:
                    type: string
                    nullable: true
                  companyId:
                    type: integer
                    nullable: true
                  hrRoleTitle:
                    type: string
                    nullable: true
                  hrRoleId:
                    type: string
                  customFields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldId:
                          type: string
                          format: uuid
                        valueId:
                          type: string
                          nullable: true
                          format: uuid
                        fieldTemplateId:
                          type: string
                          nullable: true
                          format: uuid
                        field:
                          type: string
                        value:
                          type: string
                          nullable: true
                        fieldTemplateName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalId:
                          type: string
                          maxLength: 40
                        valueExternalId:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalId:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalName:
                          type: string
                          maxLength: 40
                        valueExternalName:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalName:
                          type: string
                          nullable: true
                          maxLength: 40
                        hasCustomFields:
                          type: boolean
                  reasonForEmployment:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                  substituteForEmployment:
                    type: array
                    nullable: true
                    items:
                      type: integer
                  overtimeAllowance:
                    type: string
                    nullable: true
                    enum:
                      - FIELD_OVERTIME_ALLOWANCE_YES
                      - FIELD_OVERTIME_ALLOWANCE_NO
                      - null
              example:
                id: 1
                number: '007'
                documentStatus:
                  status: DOCUMENT_STATUS_CANDIDATE_APPROVAL
                  statusDate: '2020-01-01T00:00:00+00:00'
                country: ATA
                phoneNumberWork: null
                emailWork: null
                startDate: '1970-01-01T00:00:00+0000'
                endDate: null
                fteFactor: 1
                presentFteFactor: null
                salaryDefinition: null
                salaryValue: '1000.00'
                salarySeniorityDate: null
                salaryCurrency: null
                salarySystemCompanyId: SAL-123
                salaryType: null
                noticePeriod: null
                probationPeriod: null
                employeeType:
                  id: 9c50ff18-4cc1-4c3e-8a98-90d01ae1c28d
                  typeId: l1p0
                  employeeType: WORKER_NONEMPLOYEE
                  employmentType: NONEMPLOYEE
                  employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                  status: active
                comment: null
                job:
                  id: 1
                  title: Investigator
                  number: '007'
                  description: null
                  evolutionId: 123
                  status: active
                  createdAt: '1970-01-01T01:00:00+0000'
                  occupationalCodes:
                    - country: nor
                      code: '1143104'
                      name: KORPORAL
                positionTitle: null
                personalJobDescription: null
                userId: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                firstWorkingDay: null
                lastWorkingDay: null
                mainWorkplaceId: null
                managerForUnit: '[{"unitId":2,"name":"Company Name"}]'
                effectiveStatus: current
                referenceId: 1
                hasEmploymentLocation: false
                locationCompanyNumber: null
                locationName: null
                locationAddress: null
                locationZipCode: null
                locationCity: null
                locationMunicipality: null
                costPlace: null
                workRelationType: null
                workingHoursArrangement: null
                workingHoursPerWeek: null
                occupationalCode: null
                hasOccupationalCode: false
                externalId: null
                validFrom: null
                validTo: null
                effectiveStatusDate: null
                previousSnapshotId: null
                nextSnapshotId: null
                userName: John Doe
                userPhoto: >-
                  https://s.gravatar.com/avatar/5adda6c4672ef75cc1c394c7056fb325?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fmm.png
                seniorityDate: null
                employmentStatus: null
                employmentCalculatedStatus: active
                statusDate: '1970-01-01T00:00:00+0000'
                terminationOrOffboardingDate: null
                terminateReason: ''
                isLastEmployment: 'true'
                manager: John Doe
                managerPhoto: >-
                  https://s.gravatar.com/avatar/5adda6c4672ef75cc1c394c7056fb325?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fmm.png
                managerJobTitle: Investigator
                managerId: 1
                hasEmploymentManager: false
                orgUnitId: 2
                orgUnitName: Company Name
                companyId: 2
                hrRoleTitle: APP_INTERNAL_HR_ROLE_HR
                hrRoleId: 4391eeb4-a1bc-11eb-b327-0242ac170008
                customFields:
                  - fieldId: 0cb45f02-b8a1-11eb-bc74-0242ac15000b
                    valueId: cc5506a3-ca82-11eb-ab7b-0242ac150027
                    fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                    field: Country of origin
                    value: Norway
                    fieldTemplateName: Country
                    fieldExternalId: Country
                    valueExternalId: NOR_01
                    fieldTemplateExternalId: country
                    fieldExternalName: Country
                    fieldTemplateExternalName: country_name
                    valueExternalName: NOR
                    hasCustomFields: true
                reasonForEmployment: reason
                substituteForEmployment:
                  - 1
                  - 2
                  - 3
                overtimeAllowance: FIELD_OVERTIME_ALLOWANCE_YES
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of employment.
      description: >-
        Only available fields will be updated. If the field is hidden in an
        employee profile, it will be omitted.
      tags:
        - Employments
      parameters:
        - name: employmentId
          in: path
          required: true
          schema:
            type: string
        - name: external
          description: >-
            Param determines if id of employment is external (number) or
            internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                  minLength: 1
                  maxLength: 40
                  pattern: \S
                phoneNumberWork:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 40
                  pattern: \S
                emailWork:
                  type: string
                  nullable: true
                  format: email
                startDate:
                  type: string
                endDate:
                  type: string
                  description: >-
                    If endDate field is provided, the startDate field must also
                    be provided
                  nullable: true
                fteFactor:
                  type: number
                  nullable: true
                  minimum: 0.00001
                  maximum: 1
                presentFteFactor:
                  type: number
                  nullable: true
                  minimum: 0.00001
                  maximum: 1
                salaryDefinition:
                  type: string
                  nullable: true
                salaryType:
                  type: string
                  nullable: true
                noticePeriod:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: '^[0-9]+[wmy]$'
                probationPeriod:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: '^[0-9]+[wmy]$'
                salaryValue:
                  type: string
                  nullable: true
                  minimum: 0
                  maximum: 100000000000000000000
                employeeTypeId:
                  type: string
                  format: uuid
                  nullable: true
                  minLength: 1
                  maxLength: 255
                  pattern: \S
                comment:
                  type: string
                  nullable: true
                  maxLength: 1000
                jobId:
                  type: integer
                positionTitle:
                  type: string
                  nullable: true
                  maxLength: 40
                personalJobDescription:
                  type: string
                  nullable: true
                  maxLength: 1000
                hrRoleId:
                  type: string
                salaryCurrency:
                  type: string
                  nullable: true
                  minLength: 3
                  maxLength: 3
                  pattern: \S
                firstWorkingDay:
                  type: string
                  nullable: true
                  format: date-time
                lastWorkingDay:
                  type: string
                  nullable: true
                  format: date-time
                mainWorkplaceId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 36
                  pattern: \S
                managerId:
                  type: integer
                  nullable: true
                orgUnitId:
                  type: integer
                  minimum: 1
                costPlace:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 40
                workRelationType:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 64
                workingHoursArrangement:
                  type: string
                  format: uuid
                  nullable: true
                  minLength: 1
                  maxLength: 64
                workingHoursPerWeek:
                  type: number
                  nullable: true
                  minimum: 0
                  maximum: 168
                occupationalCode:
                  type: string
                  description: Use code only without name
                  nullable: true
                  minLength: 1
                  maxLength: 64
                externalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 40
                customFields:
                  type: array
                  items:
                    type: object
                    required:
                      - fieldId
                      - valueId
                    properties:
                      fieldId:
                        type: string
                        format: uuid
                      valueId:
                        type: string
                        format: uuid
                        nullable: true
                    additionalProperties: false
                effectiveDates:
                  type: object
                  description: >-
                    If effectiveDates are not provided, the changes will be
                    immediate
                  required:
                    - immediate
                    - comment
                    - startValidityDate
                    - endValidityDate
                  properties:
                    comment:
                      type: string
                      nullable: true
                    startValidityDate:
                      type: string
                      nullable: true
                    endValidityDate:
                      type: string
                      nullable: true
                    immediate:
                      type: boolean
                      nullable: true
                reasonForEmployment:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                substituteForEmployment:
                  type: array
                  nullable: true
                  items:
                    type: integer
                overtimeAllowance:
                  type: string
                  nullable: true
                  enum:
                    - FIELD_OVERTIME_ALLOWANCE_YES
                    - FIELD_OVERTIME_ALLOWANCE_NO
                    - null
            example:
              number: Unique employment number which is string
              phoneNumberWork: '987239487'
              emailWork: email@email.com
              startDate: '1990-01-01T00:00:00+0100'
              endDate: '1990-01-01T00:00:00+0100'
              fteFactor: 0.3
              presentFteFactor: 0.1
              salaryDefinition: SALARY_DEFINITION_MONTHLY
              salaryValue: '39888.50'
              noticePeriod: 2m
              probationPeriod: 2m
              salaryType: fixed_salary
              employeeTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
              comment: OM NOM NOM
              jobId: 13
              positionTitle: Sandwich artist
              personalJobDescription: I make the sandwich artistry happen
              hrRoleId: 2c623c34-1a36-11e9-a48f-080027122a07
              salaryCurrency: NOK
              firstWorkingDay: '1990-01-01T12:00:00Z'
              lastWorkingDay: '1990-01-01T12:00:00Z'
              managerId: 123192837
              orgUnitId: 34
              mainWorkplaceId: b9ee8cbc-cda5-11e9-8233-080027122a07
              costPlace: string
              workRelationType: WORK_RELATION_NOR_CONTRACTOR
              workingHoursArrangement: 480edc96-89de-4682-8c41-beeeb392a604
              workingHoursPerWeek: 37.5
              occupationalCode: '0112102'
              externalId: null
              customFields:
                - fieldId: b9ee8cbc-cda5-11e9-8233-080027122a07
                  valueId: 1e8c0383-bd78-11eb-b065-0242ac150002
                - fieldId: 8ff718f0-a391-11ec-b67d-02012b4602c5
                  valueId: null
              effectiveDates:
                comment: null
                startValidityDate: null
                endValidityDate: null
                immediate: true
              reasonForEmployment: reason
              substituteForEmployment:
                - 1
                - 2
                - 3
              overtimeAllowance: FIELD_OVERTIME_ALLOWANCE_YES
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - number
                  - documentStatus
                  - country
                  - phoneNumberWork
                  - emailWork
                  - startDate
                  - endDate
                  - fteFactor
                  - salaryDefinition
                  - salaryValue
                  - salarySeniorityDate
                  - salaryCurrency
                  - salaryType
                  - noticePeriod
                  - probationPeriod
                  - employeeType
                  - comment
                  - positionTitle
                  - personalJobDescription
                  - userId
                  - firstWorkingDay
                  - lastWorkingDay
                  - mainWorkplaceId
                  - managerForUnit
                  - effectiveStatus
                  - referenceId
                  - hasEmploymentLocation
                  - locationCompanyNumber
                  - locationName
                  - locationAddress
                  - locationZipCode
                  - locationCity
                  - locationMunicipality
                  - costPlace
                  - workRelationType
                  - workingHoursArrangement
                  - workingHoursPerWeek
                  - occupationalCode
                  - hasOccupationalCode
                  - externalId
                  - validFrom
                  - validTo
                  - effectiveStatusDate
                  - previousSnapshotId
                  - nextSnapshotId
                  - userName
                  - userPhoto
                  - seniorityDate
                  - employmentStatus
                  - employmentCalculatedStatus
                  - statusDate
                  - terminationOrOffboardingDate
                  - terminateReason
                  - isLastEmployment
                  - manager
                  - managerPhoto
                  - managerJobTitle
                  - managerId
                  - hasEmploymentManager
                  - orgUnitId
                  - orgUnitName
                  - companyId
                  - hrRoleTitle
                  - hrRoleId
                  - customFields
                  - reasonForEmployment
                  - substituteForEmployment
                  - overtimeAllowance
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  documentStatus:
                    type: object
                    nullable: true
                    properties:
                      status:
                        type: string
                        enum:
                          - COVERED_BY_EXISTING_DOCUMENT
                          - LEAVE_IT_FOR_LATER
                          - WORK_AGREEMENT_COVERED_BY_EXISTING_DOCUMENT
                          - WORK_AGREEMENT_LEAVE_IT_FOR_LATER
                          - CANDIDATE_EXISTING_AGREEMENT
                          - CANDIDATE_OTHER_DOCUMENTS
                          - CANDIDATE_WITHOUT_AGREEMENT
                          - DOCUMENT_STATUS_IN_PROGRESS
                          - DOCUMENT_STATUS_FOR_SIGNING
                          - DOCUMENT_STATUS_CANDIDATE_APPROVAL
                          - CANDIDATE_REJECT
                      statusDate:
                        type: string
                        format: date-time
                  country:
                    type: string
                    nullable: true
                  phoneNumberWork:
                    type: string
                    nullable: true
                  emailWork:
                    type: string
                    nullable: true
                  startDate:
                    type: string
                    nullable: true
                  endDate:
                    type: string
                    nullable: true
                  fteFactor:
                    type: number
                    nullable: true
                    minimum: 0.00001
                    maximum: 1
                  presentFteFactor:
                    type: number
                    nullable: true
                    minimum: 0.00001
                    maximum: 1
                  salaryDefinition:
                    type: string
                    nullable: true
                  salarySystemCompanyId:
                    type: string
                    nullable: true
                    maxLength: 30
                  salaryValue:
                    type: string
                    nullable: true
                  salarySeniorityDate:
                    type: string
                    nullable: true
                  salaryCurrency:
                    type: string
                    nullable: true
                  salaryType:
                    type: string
                    nullable: true
                  noticePeriod:
                    type: string
                    nullable: true
                  probationPeriod:
                    type: string
                    nullable: true
                  employeeType:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                        format: uuid
                      typeId:
                        type: string
                      employeeType:
                        type: string
                      employmentType:
                        type: string
                      employmentTypeId:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                          - active
                          - archived
                  comment:
                    type: string
                    nullable: true
                  job:
                    type: object
                    required:
                      - title
                      - number
                      - description
                      - evolutionId
                      - status
                      - occupationalCodes
                    properties:
                      id:
                        type: integer
                      title:
                        type: string
                      number:
                        type: string
                      description:
                        type: string
                        nullable: true
                      evolutionId:
                        type: integer
                        nullable: true
                      status:
                        type: string
                      createdAt:
                        type: string
                      occupationalCodes:
                        type: array
                        items:
                          type: object
                          required:
                            - country
                            - code
                            - name
                          properties:
                            country:
                              type: string
                            code:
                              type: string
                            name:
                              type: string
                  positionTitle:
                    type: string
                    nullable: true
                  personalJobDescription:
                    type: string
                    nullable: true
                  userId:
                    type: string
                    nullable: true
                  firstWorkingDay:
                    type: string
                    nullable: true
                  lastWorkingDay:
                    type: string
                    nullable: true
                  mainWorkplaceId:
                    type: string
                    nullable: true
                  managerForUnit:
                    type: string
                    nullable: true
                  effectiveStatus:
                    type: string
                    nullable: true
                  referenceId:
                    type: integer
                    nullable: true
                  hasEmploymentLocation:
                    type: boolean
                  locationCompanyNumber:
                    type: string
                    nullable: true
                  locationName:
                    type: string
                    nullable: true
                  locationAddress:
                    type: string
                    nullable: true
                  locationZipCode:
                    type: string
                    nullable: true
                  locationCity:
                    type: string
                    nullable: true
                  locationMunicipality:
                    type: string
                    nullable: true
                  costPlace:
                    type: string
                    nullable: true
                  workRelationType:
                    type: string
                    nullable: true
                  workingHoursArrangement:
                    type: string
                    nullable: true
                  workingHoursPerWeek:
                    type: number
                    nullable: true
                  occupationalCode:
                    type: string
                    nullable: true
                  hasOccupationalCode:
                    type: boolean
                  externalId:
                    type: string
                    nullable: true
                  validFrom:
                    type: string
                    nullable: true
                  validTo:
                    type: string
                    nullable: true
                  effectiveStatusDate:
                    type: string
                    nullable: true
                  previousSnapshotId:
                    type: string
                    nullable: true
                  nextSnapshotId:
                    type: string
                    nullable: true
                  userName:
                    type: string
                    nullable: true
                  userPhoto:
                    type: string
                    nullable: true
                  seniorityDate:
                    type: string
                    nullable: true
                  employmentStatus:
                    type: string
                    nullable: true
                  employmentCalculatedStatus:
                    type: string
                    nullable: true
                  statusDate:
                    type: string
                    nullable: true
                  terminationOrOffboardingDate:
                    type: string
                    nullable: true
                  terminateReason:
                    type: string
                    nullable: true
                  isLastEmployment:
                    type: string
                    nullable: true
                  manager:
                    type: string
                    nullable: true
                  managerPhoto:
                    type: string
                    nullable: true
                  managerJobTitle:
                    type: string
                    nullable: true
                  managerId:
                    type: integer
                    nullable: true
                  hasEmploymentManager:
                    type: boolean
                  orgUnitId:
                    type: integer
                  orgUnitName:
                    type: string
                    nullable: true
                  companyId:
                    type: integer
                    nullable: true
                  hrRoleTitle:
                    type: string
                    nullable: true
                  hrRoleId:
                    type: string
                  customFields:
                    type: array
                    items:
                      type: object
                      properties:
                        fieldId:
                          type: string
                          format: uuid
                        valueId:
                          type: string
                          nullable: true
                          format: uuid
                        fieldTemplateId:
                          type: string
                          nullable: true
                          format: uuid
                        field:
                          type: string
                        value:
                          type: string
                          nullable: true
                        fieldTemplateName:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalId:
                          type: string
                          maxLength: 40
                        valueExternalId:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalId:
                          type: string
                          nullable: true
                          maxLength: 40
                        fieldExternalName:
                          type: string
                          maxLength: 40
                        valueExternalName:
                          type: string
                          maxLength: 40
                          nullable: true
                        fieldTemplateExternalName:
                          type: string
                          nullable: true
                          maxLength: 40
                        hasCustomFields:
                          type: boolean
                  reasonForEmployment:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                  substituteForEmployment:
                    type: array
                    nullable: true
                    items:
                      type: integer
                  overtimeAllowance:
                    type: string
                    nullable: true
                    enum:
                      - FIELD_OVERTIME_ALLOWANCE_YES
                      - FIELD_OVERTIME_ALLOWANCE_NO
                      - null
              example:
                id: 1
                number: '007'
                documentStatus:
                  status: DOCUMENT_STATUS_CANDIDATE_APPROVAL
                  statusDate: '2020-01-01T00:00:00+00:00'
                country: ATA
                phoneNumberWork: null
                emailWork: null
                startDate: '1970-01-01T00:00:00+0000'
                endDate: null
                fteFactor: 1
                presentFteFactor: null
                salaryDefinition: null
                salaryValue: '1000.00'
                salarySeniorityDate: null
                salaryCurrency: null
                salarySystemCompanyId: SAL-123
                salaryType: null
                noticePeriod: null
                probationPeriod: null
                employeeType:
                  id: 9c50ff18-4cc1-4c3e-8a98-90d01ae1c28d
                  typeId: l1p0
                  employeeType: WORKER_NONEMPLOYEE
                  employmentType: NONEMPLOYEE
                  employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                  status: active
                comment: null
                job:
                  id: 1
                  title: Investigator
                  number: '007'
                  description: null
                  evolutionId: 123
                  status: active
                  createdAt: '1970-01-01T01:00:00+0000'
                  occupationalCodes:
                    - country: nor
                      code: '1143104'
                      name: KORPORAL
                positionTitle: null
                personalJobDescription: null
                userId: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                firstWorkingDay: null
                lastWorkingDay: null
                mainWorkplaceId: null
                managerForUnit: '[{"unitId":2,"name":"Company Name"}]'
                effectiveStatus: current
                referenceId: 1
                hasEmploymentLocation: false
                locationCompanyNumber: null
                locationName: null
                locationAddress: null
                locationZipCode: null
                locationCity: null
                locationMunicipality: null
                costPlace: null
                workRelationType: null
                workingHoursArrangement: null
                workingHoursPerWeek: null
                occupationalCode: null
                hasOccupationalCode: false
                externalId: null
                validFrom: null
                validTo: null
                effectiveStatusDate: null
                previousSnapshotId: null
                nextSnapshotId: null
                userName: John Doe
                userPhoto: >-
                  https://s.gravatar.com/avatar/5adda6c4672ef75cc1c394c7056fb325?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fmm.png
                seniorityDate: null
                employmentStatus: null
                employmentCalculatedStatus: active
                statusDate: '1970-01-01T00:00:00+0000'
                terminationOrOffboardingDate: null
                terminateReason: ''
                isLastEmployment: 'true'
                manager: John Doe
                managerPhoto: >-
                  https://s.gravatar.com/avatar/5adda6c4672ef75cc1c394c7056fb325?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fmm.png
                managerJobTitle: Investigator
                managerId: 1
                hasEmploymentManager: false
                orgUnitId: 2
                orgUnitName: Company Name
                companyId: 2
                hrRoleTitle: APP_INTERNAL_HR_ROLE_HR
                hrRoleId: 4391eeb4-a1bc-11eb-b327-0242ac170008
                customFields:
                  - fieldId: 0cb45f02-b8a1-11eb-bc74-0242ac15000b
                    valueId: cc5506a3-ca82-11eb-ab7b-0242ac150027
                    fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                    field: Country of origin
                    value: Norway
                    fieldTemplateName: Country
                    fieldExternalId: Country
                    valueExternalId: NOR_01
                    fieldTemplateExternalId: country
                    fieldExternalName: Country
                    fieldTemplateExternalName: country_name
                    valueExternalName: NOR
                    hasCustomFields: true
                reasonForEmployment: reason
                substituteForEmployment:
                  - 1
                  - 2
                  - 3
                overtimeAllowance: FIELD_OVERTIME_ALLOWANCE_YES
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/employments/{employmentId}/history':
    get:
      summary: Get employment details history.
      tags:
        - Employments
      parameters:
        - name: employmentId
          in: path
          required: true
          schema:
            type: string
        - name: external
          description: >-
            Param determines if id of employment is external (number) or
            internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
        - name: changesFrom
          description: >-
            Determines if snapshot was created or updated from selected unix
            timestamp.
          in: query
          required: false
          schema:
            type: integer
            format: timestamp
        - name: changesTo
          description: >-
            Determines if snapshot was created or updated to selected unix
            timestamp.
          in: query
          required: false
          schema:
            type: integer
            format: timestamp
        - name: validFrom
          in: query
          required: false
          schema:
            type: integer
            format: timestamp
        - name: validTo
          in: query
          required: false
          schema:
            type: integer
            format: timestamp
        - name: effectiveStatuses
          description: >-
            Filter by effective status of snapshot - comma separated list.
            Available values are: ["past", "current", "future", "replaced",
            "canceled", "effected", "approved", "for_approval",
            "for_confirmation", "rejected"] Its possible to filter by multiple
            statuses (each should be comma separated)
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
        - name: page
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        number:
                          type: string
                        documentStatus:
                          type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - COVERED_BY_EXISTING_DOCUMENT
                                - LEAVE_IT_FOR_LATER
                                - WORK_AGREEMENT_COVERED_BY_EXISTING_DOCUMENT
                                - WORK_AGREEMENT_LEAVE_IT_FOR_LATER
                                - CANDIDATE_EXISTING_AGREEMENT
                                - CANDIDATE_OTHER_DOCUMENTS
                                - CANDIDATE_WITHOUT_AGREEMENT
                                - DOCUMENT_STATUS_IN_PROGRESS
                                - DOCUMENT_STATUS_FOR_SIGNING
                                - DOCUMENT_STATUS_CANDIDATE_APPROVAL
                                - CANDIDATE_REJECT
                            statusDate:
                              type: string
                              format: date-time
                        country:
                          type: string
                          nullable: true
                        phoneNumberWork:
                          type: string
                          nullable: true
                        emailWork:
                          type: string
                          nullable: true
                        startDate:
                          type: string
                          nullable: true
                        endDate:
                          type: string
                          nullable: true
                        fteFactor:
                          type: number
                          nullable: true
                        presentFteFactor:
                          type: number
                          nullable: true
                        salaryDefinition:
                          type: string
                          nullable: true
                        salarySystemCompanyId:
                          type: string
                          nullable: true
                          maxLength: 30
                        salaryValue:
                          type: string
                          nullable: true
                        salarySeniorityDate:
                          type: string
                          nullable: true
                        salaryCurrency:
                          type: string
                          nullable: true
                        salaryType:
                          type: string
                          nullable: true
                        noticePeriod:
                          type: string
                          nullable: true
                        probationPeriod:
                          type: string
                          nullable: true
                        employeeType:
                          type: object
                          nullable: true
                          properties:
                            id:
                              type: string
                              format: uuid
                            typeId:
                              type: string
                            employeeType:
                              type: string
                            employmentType:
                              type: string
                            employmentTypeId:
                              type: string
                              format: uuid
                            status:
                              type: string
                              enum:
                                - active
                                - archived
                        comment:
                          type: string
                          nullable: true
                        job:
                          type: object
                          required:
                            - title
                            - number
                            - description
                            - evolutionId
                            - status
                            - occupationalCodes
                          properties:
                            id:
                              type: integer
                            title:
                              type: string
                            number:
                              type: string
                            description:
                              type: string
                              nullable: true
                            evolutionId:
                              type: integer
                              nullable: true
                            status:
                              type: string
                            createdAt:
                              type: string
                            occupationalCodes:
                              type: array
                              items:
                                type: object
                                required:
                                  - country
                                  - code
                                  - name
                                properties:
                                  country:
                                    type: string
                                  code:
                                    type: string
                                  name:
                                    type: string
                        positionTitle:
                          type: string
                          nullable: true
                        personalJobDescription:
                          type: string
                          nullable: true
                        userId:
                          type: string
                          nullable: true
                        firstWorkingDay:
                          type: string
                          nullable: true
                        lastWorkingDay:
                          type: string
                          nullable: true
                        mainWorkplaceId:
                          type: string
                          nullable: true
                        managerForUnit:
                          type: string
                          nullable: true
                        effectiveStatus:
                          type: string
                          enum:
                            - past
                            - current
                            - future
                            - replaced
                            - canceled
                            - effected
                            - approved
                            - for_approval
                            - for_confirmation
                            - rejected
                          nullable: true
                        referenceId:
                          type: integer
                          nullable: true
                        hasEmploymentLocation:
                          type: boolean
                        locationCompanyNumber:
                          type: string
                          nullable: true
                        locationName:
                          type: string
                          nullable: true
                        locationAddress:
                          type: string
                          nullable: true
                        locationZipCode:
                          type: string
                          nullable: true
                        locationCity:
                          type: string
                          nullable: true
                        locationMunicipality:
                          type: string
                          nullable: true
                        costPlace:
                          type: string
                          nullable: true
                        workRelationType:
                          type: string
                          nullable: true
                        workingHoursArrangement:
                          type: string
                          nullable: true
                        workingHoursPerWeek:
                          type: number
                          nullable: true
                        occupationalCode:
                          type: string
                          nullable: true
                        hasOccupationalCode:
                          type: boolean
                        externalId:
                          type: string
                          nullable: true
                        validFrom:
                          type: string
                          nullable: true
                        validTo:
                          type: string
                          nullable: true
                        effectiveStatusDate:
                          type: string
                          nullable: true
                        previousSnapshotId:
                          type: string
                          nullable: true
                        nextSnapshotId:
                          type: string
                          nullable: true
                        userName:
                          type: string
                          nullable: true
                        userPhoto:
                          type: string
                          nullable: true
                        seniorityDate:
                          type: string
                          nullable: true
                        employmentStatus:
                          type: string
                          nullable: true
                        employmentCalculatedStatus:
                          type: string
                          nullable: true
                        statusDate:
                          type: string
                          nullable: true
                        terminationOrOffboardingDate:
                          type: string
                          nullable: true
                        terminateReason:
                          type: string
                          nullable: true
                        isLastEmployment:
                          type: string
                          nullable: true
                        manager:
                          type: string
                          nullable: true
                        managerPhoto:
                          type: string
                          nullable: true
                        managerJobTitle:
                          type: string
                          nullable: true
                        managerId:
                          type: integer
                          nullable: true
                        hasEmploymentManager:
                          type: boolean
                        orgUnitId:
                          type: integer
                        orgUnitName:
                          type: string
                          nullable: true
                        companyId:
                          type: integer
                          nullable: true
                        hrRoleTitle:
                          type: string
                          nullable: true
                        hrRoleId:
                          type: string
                        customFields:
                          type: array
                          items:
                            type: object
                            properties:
                              fieldId:
                                type: string
                                format: uuid
                              valueId:
                                type: string
                                nullable: true
                                format: uuid
                              fieldTemplateId:
                                type: string
                                nullable: true
                                format: uuid
                              field:
                                type: string
                              value:
                                type: string
                                nullable: true
                              fieldTemplateName:
                                type: string
                                nullable: true
                                maxLength: 40
                              fieldExternalId:
                                type: string
                                maxLength: 40
                              valueExternalId:
                                type: string
                                maxLength: 40
                                nullable: true
                              fieldTemplateExternalId:
                                type: string
                                nullable: true
                                maxLength: 40
                              fieldExternalName:
                                type: string
                                maxLength: 40
                              valueExternalName:
                                type: string
                                maxLength: 40
                                nullable: true
                              fieldTemplateExternalName:
                                type: string
                                nullable: true
                                maxLength: 40
                              hasCustomFields:
                                type: boolean
                        reasonForEmployment:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 255
                        substituteForEmployment:
                          type: array
                          nullable: true
                          items:
                            type: integer
                        overtimeAllowance:
                          type: string
                          nullable: true
                          enum:
                            - FIELD_OVERTIME_ALLOWANCE_YES
                            - FIELD_OVERTIME_ALLOWANCE_NO
                            - null
                  page:
                    type: integer
                  pages:
                    type: integer
                  limit:
                    type: integer
                  total:
                    type: integer
              example:
                items:
                  - id: 1
                    number: '007'
                    documentStatus:
                      status: DOCUMENT_STATUS_CANDIDATE_APPROVAL
                      statusDate: '2020-01-01T00:00:00+00:00'
                    country: ATA
                    phoneNumberWork: null
                    emailWork: null
                    startDate: '2022-03-02T00:00:00+0000'
                    endDate: null
                    fteFactor: 0.3
                    presentFteFactor: 0.3
                    salaryDefinition: null
                    salarySystemCompanyId: SAL-123
                    salaryValue: '1000.00'
                    salarySeniorityDate: null
                    salaryCurrency: null
                    salaryType: null
                    noticePeriod: null
                    probationPeriod: null
                    employeeType:
                      id: 9c50ff18-4cc1-4c3e-8a98-90d01ae1c28d
                      typeId: l1p0
                      employeeType: WORKER_NONEMPLOYEE
                      employmentType: NONEMPLOYEE
                      employmentTypeId: 8e749ffa-bd74-4ff5-8365-96c673f1bb8e
                      status: active
                    comment: null
                    job:
                      id: 1
                      title: Investigator
                      number: '007'
                      description: null
                      evolutionId: null
                      status: active
                      createdAt: '1970-01-01T01:00:00+0000'
                      occupationalCodes:
                        - country: nor
                          code: '1143104'
                          name: KORPORAL
                    positionTitle: null
                    personalJobDescription: null
                    userId: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                    firstWorkingDay: null
                    lastWorkingDay: null
                    mainWorkplaceId: null
                    managerForUnit: '[{"unitId":2,"name":"Company Name"}]'
                    effectiveStatus: past
                    referenceId: 1
                    hasEmploymentLocation: false
                    locationCompanyNumber: null
                    locationName: null
                    locationAddress: null
                    locationZipCode: null
                    locationCity: null
                    locationMunicipality: null
                    costPlace: null
                    workRelationType: null
                    workingHoursArrangement: null
                    workingHoursPerWeek: null
                    occupationalCode: null
                    hasOccupationalCode: false
                    externalId: null
                    validFrom: null
                    validTo: null
                    effectiveStatusDate: '2022-03-02T00:00:00+0000'
                    previousSnapshotId: null
                    nextSnapshotId: null
                    userName: John Doe
                    userPhoto: >-
                      https://s.gravatar.com/avatar/5adda6c4672ef75cc1c394c7056fb325?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fmm.png
                    seniorityDate: null
                    employmentStatus: null
                    employmentCalculatedStatus: active
                    statusDate: '1970-01-01T00:00:00+0000'
                    terminationOrOffboardingDate: null
                    terminateReason: ''
                    isLastEmployment: 'true'
                    manager: John Doe
                    managerPhoto: >-
                      https://s.gravatar.com/avatar/5adda6c4672ef75cc1c394c7056fb325?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fmm.png
                    managerJobTitle: Investigator
                    managerId: 1
                    hasEmploymentManager: false
                    orgUnitId: 2
                    orgUnitName: Company Name
                    companyId: 2
                    hrRoleTitle: APP_INTERNAL_HR_ROLE_HR
                    hrRoleId: 4391eeb4-a1bc-11eb-b327-0242ac170008
                    customFields:
                      - fieldId: 0cb45f02-b8a1-11eb-bc74-0242ac15000b
                        valueId: cc5506a3-ca82-11eb-ab7b-0242ac150027
                        fieldTemplateId: 5e1527d4-af94-11ec-b749-0242ac140007
                        field: Country of origin
                        value: Norway
                        fieldTemplateName: Country
                        fieldExternalId: Country
                        valueExternalId: NOR_01
                        fieldTemplateExternalId: country
                        fieldExternalName: Country
                        fieldTemplateExternalName: country_name
                        valueExternalName: NOR
                        hasCustomFields: true
                    reasonForEmployment: reason
                    substituteForEmployment:
                      - 1
                      - 2
                      - 3
                    overtimeAllowance: FIELD_OVERTIME_ALLOWANCE_YES
                  - id: 2
                    number: '007'
                    country: ATA
                    phoneNumberWork: null
                    emailWork: null
                    startDate: '1999-03-01T00:00:00+0000'
                    endDate: '2022-03-01T00:00:00+0000'
                    fteFactor: 0.5
                    presentFteFactor: 0.5
                    salaryDefinition: null
                    salaryValue: null
                    salarySeniorityDate: null
                    salaryCurrency: null
                    salaryType: null
                    noticePeriod: null
                    probationPeriod: null
                    employeeTypeId: null
                    comment: null
                    jobId: 1
                    jobTitle: Investigator
                    positionTitle: null
                    personalJobDescription: null
                    userId: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                    firstWorkingDay: null
                    lastWorkingDay: null
                    mainWorkplaceId: null
                    managerForUnit: '[{"unitId":2,"name":"Company Name"}]'
                    effectiveStatus: past
                    referenceId: 1
                    hasEmploymentLocation: false
                    locationCompanyNumber: null
                    locationName: null
                    locationAddress: null
                    locationZipCode: null
                    locationCity: null
                    locationMunicipality: null
                    costPlace: null
                    workRelationType: null
                    workingHoursArrangement: null
                    workingHoursPerWeek: null
                    occupationalCode: null
                    hasOccupationalCode: false
                    externalId: null
                    validFrom: null
                    validTo: null
                    effectiveStatusDate: '2000-01-02T00:00:00+0000'
                    previousSnapshotId: null
                    nextSnapshotId: null
                    userName: John Doe
                    userPhoto: >-
                      https://s.gravatar.com/avatar/5adda6c4672ef75cc1c394c7056fb325?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fmm.png
                    seniorityDate: null
                    employmentStatus: null
                    employmentCalculatedStatus: active
                    statusDate: '1970-01-01T00:00:00+0000'
                    terminationOrOffboardingDate: null
                    terminateReason: ''
                    isLastEmployment: 'true'
                    manager: John Doe
                    managerPhoto: >-
                      https://s.gravatar.com/avatar/5adda6c4672ef75cc1c394c7056fb325?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fmm.png
                    managerJobTitle: Investigator
                    managerId: 1
                    hasEmploymentManager: false
                    orgUnitId: 2
                    orgUnitName: Company Name
                    companyId: 2
                    hrRoleTitle: APP_INTERNAL_HR_ROLE_HR
                    hrRoleId: 4391eeb4-a1bc-11eb-b327-0242ac170008
                    customFields:
                      - fieldId: 0cb45f02-b8a1-11eb-bc74-0242ac15000b
                        valueId: null
                        field: Country of origin
                        value: null
                        fieldExternalId: Country
                        valueExternalId: null
                        fieldExternalName: Country
                        valueExternalName: null
                        hasCustomFields: false
                    reasonForEmployment: reason
                    substituteForEmployment:
                      - 1
                      - 2
                      - 3
                    overtimeAllowance: FIELD_OVERTIME_ALLOWANCE_YES
                page: 1
                pages: 1
                total: 2
                limit: 10
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/custom-fields/templates:
    get:
      summary: Get custom fields templates structure.
      tags:
        - Custom Fields - templates
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - mandatory
                        - description
                        - status
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        mandatory:
                          type: boolean
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        children:
                          type: array
                          nullable: true
                        iconColor:
                          type: string
                          nullable: true
                          enum:
                            - darkblue100
                            - royalBlue100
                            - secondary105
                            - dodgerBlue100
                            - khaki100
                            - mediumPurple100
                            - indigo100
                            - purple100
                            - violetRed100
                            - hotPink100
                            - chocolate100
                            - dimGray100
                            - orangeRed100
                            - lightCoral100
                            - primaryBlack100
                            - teal100
                            - green130
                            - darkGreen100
                            - green110
                            - seaGreen100
                        placing:
                          type: object
                          nullable: true
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                                - null
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                                - null
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
                            - null
              example:
                items:
                  - id: a4f4d588-e3c0-11eb-b03b-0242ac120023
                    name: 4Human HRM
                    externalName: D0001
                    internalId: '001'
                    externalId: e001
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                        name: 4Human HRM Field
                        externalName: D0003
                        internalId: null
                        externalId: null
                        mandatory: false
                        description: null
                        status: INACTIVE
                        children:
                          - id: aa75da33-e3c0-11eb-b03b-0242ac120023
                            name: 4Human HRM Dimension
                            externalName: D0003
                            internalId: null
                            externalId: null
                            mandatory: false
                            description: null
                            status: INACTIVE
                            children: null
                            iconColor: null
                        iconColor: null
                        placing:
                          context: employment
                          section: details
                        fieldType: structure
                    iconColor: royalBlue100
                    placing: null
                    fieldType: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create custom fields template.
      tags:
        - Custom Fields - templates
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - externalId
                - description
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
              additionalProperties: false
            example:
              name: Place
              externalId: template_001
              description: template
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - mandatory
                        - description
                        - status
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        mandatory:
                          type: boolean
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        children:
                          type: array
                          nullable: true
                        iconColor:
                          type: string
                          nullable: true
                          enum:
                            - darkblue100
                            - royalBlue100
                            - secondary105
                            - dodgerBlue100
                            - khaki100
                            - mediumPurple100
                            - indigo100
                            - purple100
                            - violetRed100
                            - hotPink100
                            - chocolate100
                            - dimGray100
                            - orangeRed100
                            - lightCoral100
                            - primaryBlack100
                            - teal100
                            - green130
                            - darkGreen100
                            - green110
                            - seaGreen100
                        placing:
                          type: object
                          nullable: true
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                                - null
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                                - null
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
                            - null
              example:
                items:
                  - id: a4f4d588-e3c0-11eb-b03b-0242ac120023
                    name: 4Human HRM
                    externalName: D0001
                    internalId: '001'
                    externalId: e001
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                        name: 4Human HRM Field
                        externalName: D0003
                        internalId: null
                        externalId: null
                        mandatory: false
                        description: null
                        status: INACTIVE
                        children:
                          - id: aa75da33-e3c0-11eb-b03b-0242ac120023
                            name: 4Human HRM Dimension
                            externalName: D0003
                            internalId: null
                            externalId: null
                            mandatory: false
                            description: null
                            status: INACTIVE
                            children: null
                            iconColor: null
                        iconColor: null
                        placing:
                          context: employment
                          section: details
                        fieldType: structure
                    iconColor: royalBlue100
                    placing: null
                    fieldType: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/custom-fields/templates/{companyId}':
    get:
      summary: Get custom fields template by company.
      tags:
        - Custom Fields - templates
      parameters:
        - name: companyId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                  - externalName
                  - internalId
                  - externalId
                  - mandatory
                  - description
                  - status
                  - children
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  externalName:
                    type: string
                    nullable: true
                  internalId:
                    type: string
                    nullable: true
                  externalId:
                    type: string
                    nullable: true
                  mandatory:
                    type: boolean
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - ACTIVE
                      - INACTIVE
                  children:
                    type: array
                    nullable: true
              example:
                id: b67ccab7-f382-11eb-9fc0-0242ac120011
                name: Place
                externalName: null
                internalId: null
                externalId: template_001
                mandatory: null
                description: template
                status: ACTIVE
                children:
                  - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                    name: City
                    externalName: City - external
                    internalId: field_001
                    externalId: field_001_external
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: 38bd0f2c-f385-11eb-9fc0-0242ac120011
                        name: Main Office
                        externalName: Main Office - external
                        internalId: dimension_001
                        externalId: dimension_001_external
                        mandatory: false
                        description: null
                        status: ACTIVE
                        children: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/custom-fields/templates/{templateId}':
    put:
      summary: Edit custom fields template.
      tags:
        - Custom Fields - templates
      parameters:
        - name: templateId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - externalId
                - description
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
              additionalProperties: false
            example:
              name: Place
              externalId: template_001
              description: template
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - mandatory
                        - description
                        - status
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        mandatory:
                          type: boolean
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        children:
                          type: array
                          nullable: true
                        iconColor:
                          type: string
                          nullable: true
                          enum:
                            - darkblue100
                            - royalBlue100
                            - secondary105
                            - dodgerBlue100
                            - khaki100
                            - mediumPurple100
                            - indigo100
                            - purple100
                            - violetRed100
                            - hotPink100
                            - chocolate100
                            - dimGray100
                            - orangeRed100
                            - lightCoral100
                            - primaryBlack100
                            - teal100
                            - green130
                            - darkGreen100
                            - green110
                            - seaGreen100
                        placing:
                          type: object
                          nullable: true
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                                - null
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                                - null
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
                            - null
              example:
                items:
                  - id: a4f4d588-e3c0-11eb-b03b-0242ac120023
                    name: 4Human HRM
                    externalName: D0001
                    internalId: '001'
                    externalId: e001
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                        name: 4Human HRM Field
                        externalName: D0003
                        internalId: null
                        externalId: null
                        mandatory: false
                        description: null
                        status: INACTIVE
                        children:
                          - id: aa75da33-e3c0-11eb-b03b-0242ac120023
                            name: 4Human HRM Dimension
                            externalName: D0003
                            internalId: null
                            externalId: null
                            mandatory: false
                            description: null
                            status: INACTIVE
                            children: null
                            iconColor: null
                        iconColor: null
                        placing:
                          context: employment
                          section: details
                        fieldType: structure
                    iconColor: royalBlue100
                    placing: null
                    fieldType: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of custom fields template.
      tags:
        - Custom Fields - templates
      parameters:
        - name: templateId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
              additionalProperties: false
            example:
              name: Place
              externalId: template_001
              description: template
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - mandatory
                        - description
                        - status
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        mandatory:
                          type: boolean
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        children:
                          type: array
                          nullable: true
                        iconColor:
                          type: string
                          nullable: true
                          enum:
                            - darkblue100
                            - royalBlue100
                            - secondary105
                            - dodgerBlue100
                            - khaki100
                            - mediumPurple100
                            - indigo100
                            - purple100
                            - violetRed100
                            - hotPink100
                            - chocolate100
                            - dimGray100
                            - orangeRed100
                            - lightCoral100
                            - primaryBlack100
                            - teal100
                            - green130
                            - darkGreen100
                            - green110
                            - seaGreen100
                        placing:
                          type: object
                          nullable: true
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                                - null
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                                - null
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
                            - null
              example:
                items:
                  - id: a4f4d588-e3c0-11eb-b03b-0242ac120023
                    name: 4Human HRM
                    externalName: D0001
                    internalId: '001'
                    externalId: e001
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                        name: 4Human HRM Field
                        externalName: D0003
                        internalId: null
                        externalId: null
                        mandatory: false
                        description: null
                        status: INACTIVE
                        children:
                          - id: aa75da33-e3c0-11eb-b03b-0242ac120023
                            name: 4Human HRM Dimension
                            externalName: D0003
                            internalId: null
                            externalId: null
                            mandatory: false
                            description: null
                            status: INACTIVE
                            children: null
                            iconColor: null
                        iconColor: null
                        placing:
                          context: employment
                          section: details
                        fieldType: structure
                    iconColor: royalBlue100
                    placing: null
                    fieldType: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/custom-fields/templates/{templateId}/fields':
    post:
      summary: Create custom fields field for given template.
      tags:
        - Custom Fields - fields
      parameters:
        - name: templateId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - externalName
                - internalId
                - externalId
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                externalName:
                  type: string
                  minLength: 1
                  maxLength: 50
                internalId:
                  type: string
                  minLength: 1
                  maxLength: 40
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
              additionalProperties: false
            example:
              name: City
              externalName: City - external
              internalId: field_001
              externalId: field_001_external
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - mandatory
                        - description
                        - status
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        mandatory:
                          type: boolean
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        children:
                          type: array
                          nullable: true
                        iconColor:
                          type: string
                          nullable: true
                          enum:
                            - darkblue100
                            - royalBlue100
                            - secondary105
                            - dodgerBlue100
                            - khaki100
                            - mediumPurple100
                            - indigo100
                            - purple100
                            - violetRed100
                            - hotPink100
                            - chocolate100
                            - dimGray100
                            - orangeRed100
                            - lightCoral100
                            - primaryBlack100
                            - teal100
                            - green130
                            - darkGreen100
                            - green110
                            - seaGreen100
                        placing:
                          type: object
                          nullable: true
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                                - null
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                                - null
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
                            - null
              example:
                items:
                  - id: a4f4d588-e3c0-11eb-b03b-0242ac120023
                    name: 4Human HRM
                    externalName: D0001
                    internalId: '001'
                    externalId: e001
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                        name: 4Human HRM Field
                        externalName: D0003
                        internalId: null
                        externalId: null
                        mandatory: false
                        description: null
                        status: INACTIVE
                        children:
                          - id: aa75da33-e3c0-11eb-b03b-0242ac120023
                            name: 4Human HRM Dimension
                            externalName: D0003
                            internalId: null
                            externalId: null
                            mandatory: false
                            description: null
                            status: INACTIVE
                            children: null
                            iconColor: null
                        iconColor: null
                        placing:
                          context: employment
                          section: details
                        fieldType: structure
                    iconColor: royalBlue100
                    placing: null
                    fieldType: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/custom-fields/templates/{templateId}/fields/{fieldId}':
    put:
      summary: Edit custom fields field of given template.
      tags:
        - Custom Fields - fields
      parameters:
        - name: templateId
          in: path
          required: true
        - name: fieldId
          in: path
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - externalName
                - internalId
                - externalId
              properties:
                name:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 50
                externalName:
                  type: string
                  minLength: 1
                  maxLength: 50
                internalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 40
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
              additionalProperties: false
            example:
              name: City
              externalName: City - external
              internalId: field_001
              externalId: field_001_external
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - mandatory
                        - description
                        - status
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        mandatory:
                          type: boolean
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        children:
                          type: array
                          nullable: true
                        iconColor:
                          type: string
                          nullable: true
                          enum:
                            - darkblue100
                            - royalBlue100
                            - secondary105
                            - dodgerBlue100
                            - khaki100
                            - mediumPurple100
                            - indigo100
                            - purple100
                            - violetRed100
                            - hotPink100
                            - chocolate100
                            - dimGray100
                            - orangeRed100
                            - lightCoral100
                            - primaryBlack100
                            - teal100
                            - green130
                            - darkGreen100
                            - green110
                            - seaGreen100
                        placing:
                          type: object
                          nullable: true
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                                - null
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                                - null
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
                            - null
              example:
                items:
                  - id: a4f4d588-e3c0-11eb-b03b-0242ac120023
                    name: 4Human HRM
                    externalName: D0001
                    internalId: '001'
                    externalId: e001
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                        name: 4Human HRM Field
                        externalName: D0003
                        internalId: null
                        externalId: null
                        mandatory: false
                        description: null
                        status: INACTIVE
                        children:
                          - id: aa75da33-e3c0-11eb-b03b-0242ac120023
                            name: 4Human HRM Dimension
                            externalName: D0003
                            internalId: null
                            externalId: null
                            mandatory: false
                            description: null
                            status: INACTIVE
                            children: null
                            iconColor: null
                        iconColor: null
                        placing:
                          context: employment
                          section: details
                        fieldType: structure
                    iconColor: royalBlue100
                    placing: null
                    fieldType: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of custom fields field with given template.
      tags:
        - Custom Fields - fields
      parameters:
        - name: templateId
          in: path
          required: true
        - name: fieldId
          in: path
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 50
                externalName:
                  type: string
                  minLength: 1
                  maxLength: 50
                internalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 40
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
              additionalProperties: false
            example:
              name: City
              externalName: City - external
              internalId: field_001
              externalId: field_001_external
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - mandatory
                        - description
                        - status
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        mandatory:
                          type: boolean
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        children:
                          type: array
                          nullable: true
                        iconColor:
                          type: string
                          nullable: true
                          enum:
                            - darkblue100
                            - royalBlue100
                            - secondary105
                            - dodgerBlue100
                            - khaki100
                            - mediumPurple100
                            - indigo100
                            - purple100
                            - violetRed100
                            - hotPink100
                            - chocolate100
                            - dimGray100
                            - orangeRed100
                            - lightCoral100
                            - primaryBlack100
                            - teal100
                            - green130
                            - darkGreen100
                            - green110
                            - seaGreen100
                        placing:
                          type: object
                          nullable: true
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                                - null
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                                - null
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
                            - null
              example:
                items:
                  - id: a4f4d588-e3c0-11eb-b03b-0242ac120023
                    name: 4Human HRM
                    externalName: D0001
                    internalId: '001'
                    externalId: e001
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                        name: 4Human HRM Field
                        externalName: D0003
                        internalId: null
                        externalId: null
                        mandatory: false
                        description: null
                        status: INACTIVE
                        children:
                          - id: aa75da33-e3c0-11eb-b03b-0242ac120023
                            name: 4Human HRM Dimension
                            externalName: D0003
                            internalId: null
                            externalId: null
                            mandatory: false
                            description: null
                            status: INACTIVE
                            children: null
                            iconColor: null
                        iconColor: null
                        placing:
                          context: employment
                          section: details
                        fieldType: structure
                    iconColor: royalBlue100
                    placing: null
                    fieldType: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/custom-fields/fields/{fieldId}/dimensions':
    post:
      summary: Create custom fields dimension for given field.
      tags:
        - Custom Fields - dimensions
      parameters:
        - name: fieldId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - externalName
                - internalId
                - externalId
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                externalName:
                  type: string
                  minLength: 1
                  maxLength: 50
                internalId:
                  type: string
                  minLength: 1
                  maxLength: 40
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
              additionalProperties: false
            example:
              name: Main Office
              externalName: Main Office - external
              internalId: dimension_001
              externalId: dimension_001_external
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - mandatory
                        - description
                        - status
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        mandatory:
                          type: boolean
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        children:
                          type: array
                          nullable: true
                        iconColor:
                          type: string
                          nullable: true
                          enum:
                            - darkblue100
                            - royalBlue100
                            - secondary105
                            - dodgerBlue100
                            - khaki100
                            - mediumPurple100
                            - indigo100
                            - purple100
                            - violetRed100
                            - hotPink100
                            - chocolate100
                            - dimGray100
                            - orangeRed100
                            - lightCoral100
                            - primaryBlack100
                            - teal100
                            - green130
                            - darkGreen100
                            - green110
                            - seaGreen100
                        placing:
                          type: object
                          nullable: true
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                                - null
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                                - null
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
                            - null
              example:
                items:
                  - id: a4f4d588-e3c0-11eb-b03b-0242ac120023
                    name: 4Human HRM
                    externalName: D0001
                    internalId: '001'
                    externalId: e001
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                        name: 4Human HRM Field
                        externalName: D0003
                        internalId: null
                        externalId: null
                        mandatory: false
                        description: null
                        status: INACTIVE
                        children:
                          - id: aa75da33-e3c0-11eb-b03b-0242ac120023
                            name: 4Human HRM Dimension
                            externalName: D0003
                            internalId: null
                            externalId: null
                            mandatory: false
                            description: null
                            status: INACTIVE
                            children: null
                            iconColor: null
                        iconColor: null
                        placing:
                          context: employment
                          section: details
                        fieldType: structure
                    iconColor: royalBlue100
                    placing: null
                    fieldType: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/custom-fields/fields/dimensions/{dimensionId}':
    put:
      summary: Edit custom fields dimension.
      tags:
        - Custom Fields - dimensions
      parameters:
        - name: dimensionId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - externalName
                - internalId
                - externalId
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                externalName:
                  type: string
                  minLength: 1
                  maxLength: 50
                internalId:
                  type: string
                  minLength: 1
                  maxLength: 40
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
              additionalProperties: false
            example:
              name: Main Office
              externalName: Main Office - external
              internalId: dimension_001
              externalId: dimension_001_external
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - mandatory
                        - description
                        - status
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        mandatory:
                          type: boolean
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        children:
                          type: array
                          nullable: true
                        iconColor:
                          type: string
                          nullable: true
                          enum:
                            - darkblue100
                            - royalBlue100
                            - secondary105
                            - dodgerBlue100
                            - khaki100
                            - mediumPurple100
                            - indigo100
                            - purple100
                            - violetRed100
                            - hotPink100
                            - chocolate100
                            - dimGray100
                            - orangeRed100
                            - lightCoral100
                            - primaryBlack100
                            - teal100
                            - green130
                            - darkGreen100
                            - green110
                            - seaGreen100
                        placing:
                          type: object
                          nullable: true
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                                - null
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                                - null
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
                            - null
              example:
                items:
                  - id: a4f4d588-e3c0-11eb-b03b-0242ac120023
                    name: 4Human HRM
                    externalName: D0001
                    internalId: '001'
                    externalId: e001
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                        name: 4Human HRM Field
                        externalName: D0003
                        internalId: null
                        externalId: null
                        mandatory: false
                        description: null
                        status: INACTIVE
                        children:
                          - id: aa75da33-e3c0-11eb-b03b-0242ac120023
                            name: 4Human HRM Dimension
                            externalName: D0003
                            internalId: null
                            externalId: null
                            mandatory: false
                            description: null
                            status: INACTIVE
                            children: null
                            iconColor: null
                        iconColor: null
                        placing:
                          context: employment
                          section: details
                        fieldType: structure
                    iconColor: royalBlue100
                    placing: null
                    fieldType: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of custom fields dimension.
      tags:
        - Custom Fields - dimensions
      parameters:
        - name: dimensionId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                externalName:
                  type: string
                  minLength: 1
                  maxLength: 50
                internalId:
                  type: string
                  minLength: 1
                  maxLength: 40
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
              additionalProperties: false
            example:
              name: Main Office
              externalName: Main Office - external
              internalId: dimension_001
              externalId: dimension_001_external
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - mandatory
                        - description
                        - status
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        mandatory:
                          type: boolean
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        children:
                          type: array
                          nullable: true
                        iconColor:
                          type: string
                          nullable: true
                          enum:
                            - darkblue100
                            - royalBlue100
                            - secondary105
                            - dodgerBlue100
                            - khaki100
                            - mediumPurple100
                            - indigo100
                            - purple100
                            - violetRed100
                            - hotPink100
                            - chocolate100
                            - dimGray100
                            - orangeRed100
                            - lightCoral100
                            - primaryBlack100
                            - teal100
                            - green130
                            - darkGreen100
                            - green110
                            - seaGreen100
                        placing:
                          type: object
                          nullable: true
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                                - null
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                                - null
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
                            - null
              example:
                items:
                  - id: a4f4d588-e3c0-11eb-b03b-0242ac120023
                    name: 4Human HRM
                    externalName: D0001
                    internalId: '001'
                    externalId: e001
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                        name: 4Human HRM Field
                        externalName: D0003
                        internalId: null
                        externalId: null
                        mandatory: false
                        description: null
                        status: INACTIVE
                        children:
                          - id: aa75da33-e3c0-11eb-b03b-0242ac120023
                            name: 4Human HRM Dimension
                            externalName: D0003
                            internalId: null
                            externalId: null
                            mandatory: false
                            description: null
                            status: INACTIVE
                            children: null
                            iconColor: null
                        iconColor: null
                        placing:
                          context: employment
                          section: details
                        fieldType: structure
                    iconColor: royalBlue100
                    placing: null
                    fieldType: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/custom-fields/change-status/{id}':
    patch:
      summary: Enable or disable custom field or dimension with given id.
      tags:
        - Custom Fields - fields
        - Custom Fields - dimensions
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  enum:
                    - ACTIVE
                    - INACTIVE
            example:
              status: ACTIVE
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - mandatory
                        - description
                        - status
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        mandatory:
                          type: boolean
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        children:
                          type: array
                          nullable: true
                        iconColor:
                          type: string
                          nullable: true
                          enum:
                            - darkblue100
                            - royalBlue100
                            - secondary105
                            - dodgerBlue100
                            - khaki100
                            - mediumPurple100
                            - indigo100
                            - purple100
                            - violetRed100
                            - hotPink100
                            - chocolate100
                            - dimGray100
                            - orangeRed100
                            - lightCoral100
                            - primaryBlack100
                            - teal100
                            - green130
                            - darkGreen100
                            - green110
                            - seaGreen100
                        placing:
                          type: object
                          nullable: true
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                                - null
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                                - null
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
                            - null
              example:
                items:
                  - id: a4f4d588-e3c0-11eb-b03b-0242ac120023
                    name: 4Human HRM
                    externalName: D0001
                    internalId: '001'
                    externalId: e001
                    mandatory: false
                    description: null
                    status: ACTIVE
                    children:
                      - id: bd95da33-e3c0-11eb-b03b-0242ac120023
                        name: 4Human HRM Field
                        externalName: D0003
                        internalId: null
                        externalId: null
                        mandatory: false
                        description: null
                        status: INACTIVE
                        children:
                          - id: aa75da33-e3c0-11eb-b03b-0242ac120023
                            name: 4Human HRM Dimension
                            externalName: D0003
                            internalId: null
                            externalId: null
                            mandatory: false
                            description: null
                            status: INACTIVE
                            children: null
                            iconColor: null
                        iconColor: null
                        placing:
                          context: employment
                          section: details
                        fieldType: structure
                    iconColor: royalBlue100
                    placing: null
                    fieldType: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/custom-fields/values/company/{companyId}/tree':
    get:
      summary: Get custom field values tree for given company.
      tags:
        - Custom Fields - values
      parameters:
        - name: companyId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - dimensionId
                        - dimensionName
                        - dimensionStatus
                        - childrenDimensionId
                        - childrenDimensionName
                        - childrenDimensionStatus
                        - status
                        - isValue
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                        externalId:
                          type: string
                        dimensionId:
                          type: string
                          format: uuid
                        dimensionName:
                          type: string
                        dimensionStatus:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        childrenDimensionId:
                          type: string
                          nullable: true
                          format: uuid
                        childrenDimensionName:
                          type: string
                          nullable: true
                        childrenDimensionStatus:
                          type: string
                          nullable: true
                          enum:
                            - ACTIVE
                            - INACTIVE
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        isValue:
                          type: boolean
                        children:
                          type: array
                          nullable: true
                        placing:
                          type: object
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
              example:
                items:
                  - id: 1aa836a4-ba11-11eb-b89f-0242ac15001f
                    name: 4Human HRM
                    externalName: 4Human HRM
                    internalId: internalId
                    externalId: externalId
                    dimensionId: 0cb45f02-b8a1-11eb-bc74-0242ac15000b
                    dimensionName: 4Human HRM
                    dimensionStatus: ACTIVE
                    childrenDimensionId: 134fe866-b8a1-11eb-bc74-0242ac15000b
                    childrenDimensionName: 4Human HRM1
                    childrenDimensionStatus: ACTIVE
                    status: ACTIVE
                    isValue: false
                    children:
                      - id: eb57c330-ba16-11eb-b89f-0242ac15001f
                        name: 4Human HRM
                        externalName: 4Human HRM - External
                        internalId: '1'
                        externalId: Ex1
                        dimensionId: 134fe866-b8a1-11eb-bc74-0242ac15000b
                        dimensionName: 4Human HRM1
                        dimensionStatus: INACTIVE
                        childrenDimensionId: null
                        childrenDimensionName: null
                        childrenDimensionStatus: null
                        status: INACTIVE
                        isValue: true
                        children: []
                        fieldType: null
                        placing: null
                    fieldType: structure
                    placing:
                      context: employment
                      section: details
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/custom-fields/values/{valueId}':
    post:
      summary: Create dimension value for given custom fields value.
      tags:
        - Custom Fields - values
      parameters:
        - name: valueId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - externalName
                - internalId
                - externalId
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                externalName:
                  type: string
                  minLength: 1
                  maxLength: 50
                internalId:
                  type: string
                  minLength: 1
                  maxLength: 40
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
              additionalProperties: false
            example:
              name: Oslo
              externalName: Oslo - external
              internalId: main_office_city_001
              externalId: main_office_city_001_external
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - dimensionId
                        - dimensionName
                        - dimensionStatus
                        - childrenDimensionId
                        - childrenDimensionName
                        - childrenDimensionStatus
                        - status
                        - isValue
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                        externalId:
                          type: string
                        dimensionId:
                          type: string
                          format: uuid
                        dimensionName:
                          type: string
                        dimensionStatus:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        childrenDimensionId:
                          type: string
                          nullable: true
                          format: uuid
                        childrenDimensionName:
                          type: string
                          nullable: true
                        childrenDimensionStatus:
                          type: string
                          nullable: true
                          enum:
                            - ACTIVE
                            - INACTIVE
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        isValue:
                          type: boolean
                        children:
                          type: array
                          nullable: true
                        placing:
                          type: object
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
              example:
                items:
                  - id: 1aa836a4-ba11-11eb-b89f-0242ac15001f
                    name: 4Human HRM
                    externalName: 4Human HRM
                    internalId: internalId
                    externalId: externalId
                    dimensionId: 0cb45f02-b8a1-11eb-bc74-0242ac15000b
                    dimensionName: 4Human HRM
                    dimensionStatus: ACTIVE
                    childrenDimensionId: 134fe866-b8a1-11eb-bc74-0242ac15000b
                    childrenDimensionName: 4Human HRM1
                    childrenDimensionStatus: ACTIVE
                    status: ACTIVE
                    isValue: false
                    children:
                      - id: eb57c330-ba16-11eb-b89f-0242ac15001f
                        name: 4Human HRM
                        externalName: 4Human HRM - External
                        internalId: '1'
                        externalId: Ex1
                        dimensionId: 134fe866-b8a1-11eb-bc74-0242ac15000b
                        dimensionName: 4Human HRM1
                        dimensionStatus: INACTIVE
                        childrenDimensionId: null
                        childrenDimensionName: null
                        childrenDimensionStatus: null
                        status: INACTIVE
                        isValue: true
                        children: []
                        fieldType: null
                        placing: null
                    fieldType: structure
                    placing:
                      context: employment
                      section: details
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit custom fields value.
      tags:
        - Custom Fields - values
      parameters:
        - name: valueId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - externalName
                - internalId
                - externalId
              properties:
                name:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 50
                externalName:
                  type: string
                  minLength: 1
                  maxLength: 50
                internalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 40
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
              additionalProperties: false
            example:
              name: Oslo
              externalName: Oslo - external
              internalId: main_office_city_001
              externalId: main_office_city_001_external
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - dimensionId
                        - dimensionName
                        - dimensionStatus
                        - childrenDimensionId
                        - childrenDimensionName
                        - childrenDimensionStatus
                        - status
                        - isValue
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                        externalId:
                          type: string
                        dimensionId:
                          type: string
                          format: uuid
                        dimensionName:
                          type: string
                        dimensionStatus:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        childrenDimensionId:
                          type: string
                          nullable: true
                          format: uuid
                        childrenDimensionName:
                          type: string
                          nullable: true
                        childrenDimensionStatus:
                          type: string
                          nullable: true
                          enum:
                            - ACTIVE
                            - INACTIVE
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        isValue:
                          type: boolean
                        children:
                          type: array
                          nullable: true
                        placing:
                          type: object
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
              example:
                items:
                  - id: 1aa836a4-ba11-11eb-b89f-0242ac15001f
                    name: 4Human HRM
                    externalName: 4Human HRM
                    internalId: internalId
                    externalId: externalId
                    dimensionId: 0cb45f02-b8a1-11eb-bc74-0242ac15000b
                    dimensionName: 4Human HRM
                    dimensionStatus: ACTIVE
                    childrenDimensionId: 134fe866-b8a1-11eb-bc74-0242ac15000b
                    childrenDimensionName: 4Human HRM1
                    childrenDimensionStatus: ACTIVE
                    status: ACTIVE
                    isValue: false
                    children:
                      - id: eb57c330-ba16-11eb-b89f-0242ac15001f
                        name: 4Human HRM
                        externalName: 4Human HRM - External
                        internalId: '1'
                        externalId: Ex1
                        dimensionId: 134fe866-b8a1-11eb-bc74-0242ac15000b
                        dimensionName: 4Human HRM1
                        dimensionStatus: INACTIVE
                        childrenDimensionId: null
                        childrenDimensionName: null
                        childrenDimensionStatus: null
                        status: INACTIVE
                        isValue: true
                        children: []
                        fieldType: null
                        placing: null
                    fieldType: structure
                    placing:
                      context: employment
                      section: details
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of custom fields value.
      tags:
        - Custom Fields - values
      parameters:
        - name: valueId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 50
                externalName:
                  type: string
                  minLength: 1
                  maxLength: 50
                internalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 40
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 40
              additionalProperties: false
            example:
              name: Oslo
              externalName: Oslo - external
              internalId: main_office_city_001
              externalId: main_office_city_001_external
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - dimensionId
                        - dimensionName
                        - dimensionStatus
                        - childrenDimensionId
                        - childrenDimensionName
                        - childrenDimensionStatus
                        - status
                        - isValue
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                        externalId:
                          type: string
                        dimensionId:
                          type: string
                          format: uuid
                        dimensionName:
                          type: string
                        dimensionStatus:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        childrenDimensionId:
                          type: string
                          nullable: true
                          format: uuid
                        childrenDimensionName:
                          type: string
                          nullable: true
                        childrenDimensionStatus:
                          type: string
                          nullable: true
                          enum:
                            - ACTIVE
                            - INACTIVE
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        isValue:
                          type: boolean
                        children:
                          type: array
                          nullable: true
                        placing:
                          type: object
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
              example:
                items:
                  - id: 1aa836a4-ba11-11eb-b89f-0242ac15001f
                    name: 4Human HRM
                    externalName: 4Human HRM
                    internalId: internalId
                    externalId: externalId
                    dimensionId: 0cb45f02-b8a1-11eb-bc74-0242ac15000b
                    dimensionName: 4Human HRM
                    dimensionStatus: ACTIVE
                    childrenDimensionId: 134fe866-b8a1-11eb-bc74-0242ac15000b
                    childrenDimensionName: 4Human HRM1
                    childrenDimensionStatus: ACTIVE
                    status: ACTIVE
                    isValue: false
                    children:
                      - id: eb57c330-ba16-11eb-b89f-0242ac15001f
                        name: 4Human HRM
                        externalName: 4Human HRM - External
                        internalId: '1'
                        externalId: Ex1
                        dimensionId: 134fe866-b8a1-11eb-bc74-0242ac15000b
                        dimensionName: 4Human HRM1
                        dimensionStatus: INACTIVE
                        childrenDimensionId: null
                        childrenDimensionName: null
                        childrenDimensionStatus: null
                        status: INACTIVE
                        isValue: true
                        children: []
                        fieldType: null
                        placing: null
                    fieldType: structure
                    placing:
                      context: employment
                      section: details
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/custom-fields/values/change-status/{id}':
    patch:
      summary: Enable or disable custom field value with given id.
      tags:
        - Custom Fields - values
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  enum:
                    - ACTIVE
                    - INACTIVE
            example:
              status: ACTIVE
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - externalName
                        - internalId
                        - externalId
                        - dimensionId
                        - dimensionName
                        - dimensionStatus
                        - childrenDimensionId
                        - childrenDimensionName
                        - childrenDimensionStatus
                        - status
                        - isValue
                        - children
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        externalName:
                          type: string
                          nullable: true
                        internalId:
                          type: string
                        externalId:
                          type: string
                        dimensionId:
                          type: string
                          format: uuid
                        dimensionName:
                          type: string
                        dimensionStatus:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        childrenDimensionId:
                          type: string
                          nullable: true
                          format: uuid
                        childrenDimensionName:
                          type: string
                          nullable: true
                        childrenDimensionStatus:
                          type: string
                          nullable: true
                          enum:
                            - ACTIVE
                            - INACTIVE
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - INACTIVE
                        isValue:
                          type: boolean
                        children:
                          type: array
                          nullable: true
                        placing:
                          type: object
                          properties:
                            context:
                              type: string
                              nullable: true
                              enum:
                                - employment
                                - companyEmployee
                            section:
                              type: string
                              nullable: true
                              enum:
                                - details
                        fieldType:
                          type: string
                          nullable: true
                          enum:
                            - structure
              example:
                items:
                  - id: 1aa836a4-ba11-11eb-b89f-0242ac15001f
                    name: 4Human HRM
                    externalName: 4Human HRM
                    internalId: internalId
                    externalId: externalId
                    dimensionId: 0cb45f02-b8a1-11eb-bc74-0242ac15000b
                    dimensionName: 4Human HRM
                    dimensionStatus: ACTIVE
                    childrenDimensionId: 134fe866-b8a1-11eb-bc74-0242ac15000b
                    childrenDimensionName: 4Human HRM1
                    childrenDimensionStatus: ACTIVE
                    status: ACTIVE
                    isValue: false
                    children:
                      - id: eb57c330-ba16-11eb-b89f-0242ac15001f
                        name: 4Human HRM
                        externalName: 4Human HRM - External
                        internalId: '1'
                        externalId: Ex1
                        dimensionId: 134fe866-b8a1-11eb-bc74-0242ac15000b
                        dimensionName: 4Human HRM1
                        dimensionStatus: INACTIVE
                        childrenDimensionId: null
                        childrenDimensionName: null
                        childrenDimensionStatus: null
                        status: INACTIVE
                        isValue: true
                        children: []
                        fieldType: null
                        placing: null
                    fieldType: structure
                    placing:
                      context: employment
                      section: details
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/company-employees:
    get:
      summary: Get company employees
      tags:
        - Company employees
      parameters:
        - name: external
          description: >-
            Param determines if employmentId used in filter is external (number)
            or internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
        - name: employeeId
          in: query
          required: false
          schema:
            type: integer
        - name: employmentId
          in: query
          required: false
        - name: companyId
          in: query
          required: false
          schema:
            type: integer
        - name: userId
          in: query
          required: false
          schema:
            type: integer
        - name: limit
          in: query
          required: false
          schema:
            type: integer
        - name: page
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - total
                  - limit
                  - page
                  - pages
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        countriesOfEmployments:
                          type: array
                          items:
                            type: string
                        userStatus:
                          type: string
                          nullable: true
                        userCalculatedStatus:
                          type: string
                          nullable: true
                        totalFteFactor:
                          type: number
                          nullable: true
                        employmentCount:
                          type: integer
                        companyEmployeeCalculatedStatus:
                          type: string
                        statusDate:
                          type: string
                          nullable: true
                        companyEmployeeOffboardingDate:
                          type: string
                          nullable: true
                        mainEmployer:
                          type: boolean
                        hasMainEmployer:
                          type: boolean
                        companyId:
                          type: integer
                        userId:
                          type: string
                        seniorityDate:
                          type: string
                          nullable: true
                        primaryEmployment:
                          type: object
                          properties:
                            id:
                              type: integer
                            idExt:
                              type: string
                            fteFactor:
                              type: number
                              nullable: true
                        employeeId:
                          type: string
                          nullable: true
                        startDate:
                          type: string
                          nullable: true
                        endDate:
                          type: string
                          nullable: true
                        salaryNumber:
                          type: string
                          nullable: true
                          maxLength: 40
                        salarySystemCompanyId:
                          type: string
                          nullable: true
                          maxLength: 30
                        selfSickness:
                          type: string
                          nullable: true
                        freeEmployer:
                          type: object
                          nullable: true
                          properties:
                            from:
                              type: string
                              nullable: true
                            to:
                              type: string
                              nullable: true
                        workPermit:
                          type: object
                          nullable: true
                          properties:
                            from:
                              type: string
                              nullable: true
                            to:
                              type: string
                              nullable: true
                        terminationSeniorityDate:
                          type: string
                          nullable: true
                        residencePermit:
                          type: object
                          nullable: true
                          properties:
                            from:
                              type: string
                              nullable: true
                            to:
                              type: string
                              nullable: true
                        primaryLocation:
                          type: object
                          nullable: true
                          properties:
                            name:
                              type: string
                              nullable: true
                            companyNumber:
                              type: string
                              nullable: true
                            visitAddress:
                              type: object
                              nullable: true
                              properties:
                                address:
                                  type: string
                                  nullable: true
                                zipCode:
                                  type: string
                                  nullable: true
                                city:
                                  type: string
                                  nullable: true
                                municipality:
                                  type: string
                                  nullable: true
                            externalId:
                              type: string
                              minLength: 1
                              maxLength: 40
                        readyForPayment:
                          type: boolean
                          nullable: true
                        readyForPaymentMessage:
                          type: string
                          nullable: true
                        workStatus:
                          type: string
                          nullable: true
                          enum:
                            - WORK_STATUS_ACTIVE
                            - WORK_STATUS_RESIGNED
                            - WORK_STATUS_SICK_WITHOUT_PAYMENT
                            - WORK_STATUS_SICK
                            - WORK_STATUS_LEAVE
                            - WORK_STATUS_LEAVE_WITHOUT_PAYMENT
                            - WORK_STATUS_TEMPORARILY_LAID_OFF
                            - WORK_STATUS_TEMPORARILY_ACTIVE
                        resourceType:
                          type: object
                          required:
                            - id
                            - typeId
                            - name
                          properties:
                            id:
                              type: integer
                            typeId:
                              type: string
                            name:
                              type: string
                          nullable: true
                  total:
                    type: integer
                  limit:
                    type: integer
                  page:
                    type: integer
                  pages:
                    type: integer
              example:
                items:
                  - id: 1
                    countriesOfEmployments:
                      - POL
                    userStatus: null
                    userCalculatedStatus: null
                    totalFteFactor: 0
                    employmentCount: 1
                    companyEmployeeCalculatedStatus: active
                    statusDate: null
                    companyEmployeeOffboardingDate: '2021-06-02T13:10:11+0000'
                    mainEmployer: true
                    hasMainEmployer: true
                    seniorityDate: null
                    primaryEmployment:
                      id: 1
                      idExt: '007'
                      fteFactor: 1
                    employeeId: '333'
                    startDate: '1970-01-01T03:00:00+00:00'
                    endDate: '2032-01-01T03:00:00+00:00'
                    salaryNumber: N-201
                    salarySystemCompanyId: SAL-123
                    selfSickness: null
                    freeEmployer:
                      from: null
                      to: null
                    workPermit:
                      from: null
                      to: null
                    terminationSeniorityDate: '2021-06-01T00:00:00+00:00'
                    residencePermit:
                      from: null
                      to: null
                    primaryLocation:
                      companyNumber: '12212'
                      name: Example company location
                      visitAddress:
                        address: Street 10
                        zipCode: 11-111
                        city: Oslo
                        municipality: Oslo
                      externalId: '001'
                    readyForPayment: false
                    readyForPaymentMessage: null
                    workStatus: WORK_STATUS_ACTIVE
                    resourceType:
                      id: 1
                      typeId: F
                      name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
                total: 1
                limit: 10
                page: 1
                pages: 1
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/company-employees/{companyEmployeeId}':
    get:
      summary: Get company employee details.
      tags:
        - Company employees
      parameters:
        - name: companyEmployeeId
          in: path
          required: true
          schema:
            type: integer
        - name: external
          description: >-
            Param determines if id of company employee is external (employeeId)
            or internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  primaryEmployment:
                    type: object
                    properties:
                      id:
                        type: integer
                      idExt:
                        type: string
                      fteFactor:
                        type: number
                        nullable: true
                  seniorityDate:
                    type: string
                    nullable: true
                  employeeId:
                    type: string
                    nullable: true
                  startDate:
                    type: string
                    nullable: true
                  endDate:
                    type: string
                    nullable: true
                  countriesOfEmployments:
                    type: array
                    items:
                      type: string
                  userStatus:
                    type: string
                    nullable: true
                    enum:
                      - active
                      - invited
                      - null
                  userCalculatedStatus:
                    type: string
                    nullable: true
                    enum:
                      - active
                      - invited
                      - offboarding
                      - offboardingSoon
                      - inactive
                      - expired
                      - uninvited
                      - null
                  companyEmployeeCalculatedStatus:
                    type: string
                    enum:
                      - active
                      - inactive
                      - offboarding
                      - pending
                  statusDate:
                    type: string
                    nullable: true
                  companyEmployeeOffboardingDate:
                    type: string
                    nullable: true
                  primaryLocation:
                    type: object
                    nullable: true
                    properties:
                      name:
                        type: string
                        nullable: true
                      companyNumber:
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      externalId:
                        type: string
                        minLength: 1
                        maxLength: 40
                  employmentCount:
                    type: integer
                  hasMainEmployer:
                    type: boolean
                  mainEmployer:
                    type: boolean
                  totalFteFactor:
                    type: number
                  salaryNumber:
                    type: string
                    nullable: true
                  salarySystemCompanyId:
                    type: string
                    nullable: true
                    maxLength: 30
                  selfSickness:
                    type: string
                    nullable: true
                  freeEmployer:
                    type: object
                    nullable: true
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  workPermit:
                    type: object
                    nullable: true
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  terminationSeniorityDate:
                    type: string
                    nullable: true
                  residencePermit:
                    type: object
                    nullable: true
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  workStatus:
                    type: string
                    nullable: true
                    enum:
                      - WORK_STATUS_ACTIVE
                      - WORK_STATUS_RESIGNED
                      - WORK_STATUS_SICK_WITHOUT_PAYMENT
                      - WORK_STATUS_SICK
                      - WORK_STATUS_LEAVE
                      - WORK_STATUS_LEAVE_WITHOUT_PAYMENT
                      - WORK_STATUS_TEMPORARILY_LAID_OFF
                      - WORK_STATUS_TEMPORARILY_ACTIVE
                  resourceType:
                    type: object
                    required:
                      - id
                      - typeId
                      - name
                    properties:
                      id:
                        type: integer
                      typeId:
                        type: string
                      name:
                        type: string
                    nullable: true
                  readyForPayment:
                    type: boolean
                    description: >-
                      Field not available if related employment is in
                      "candidate" status
                    nullable: true
                  readyForPaymentMessage:
                    type: string
                    description: >-
                      Field not available if related employment is in
                      "candidate" status
                    nullable: true
                  companyId:
                    type: integer
                  userId:
                    type: string
              example:
                id: 1
                employeeId: '1'
                companyEmployeeCalculatedStatus: active
                companyEmployeeOffboardingDate: null
                countriesOfEmployments:
                  - NOR
                employmentCount: 1
                endDate: null
                hasMainEmployer: true
                mainEmployer: true
                primaryEmployment:
                  id: 26
                  idExt: '007'
                  fteFactor: 1
                seniorityDate: '2021-06-01T00:00:00+00:00'
                startDate: '2021-02-08T00:00:00+00:00'
                statusDate: '2021-02-08T00:00:00+00:00'
                totalFteFactor: 1
                userCalculatedStatus: active
                userStatus: active
                salaryNumber: null
                salarySystemCompanyId: SAL-123
                selfSickness: null
                freeEmployer:
                  from: null
                  to: null
                workPermit:
                  from: null
                  to: null
                terminationSeniorityDate: '2019-08-29T00:00:00+02:00'
                residencePermit:
                  from: null
                  to: null
                primaryLocation:
                  companyNumber: '12212'
                  name: Example company location
                  visitAddress:
                    address: Street 10
                    zipCode: 11-111
                    city: Oslo
                    municipality: Oslo
                  externalId: '001'
                workStatus: WORK_STATUS_ACTIVE
                resourceType:
                  id: 1
                  typeId: F
                  name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
                readyForPayment: false
                readyForPaymentMessage: message
                companyId: 2
                userId: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Update a company employee.
      tags:
        - Company employees
      parameters:
        - name: companyEmployeeId
          in: path
          required: true
          schema:
            type: integer
        - name: external
          description: >-
            Param determines if id of company employee is external (employeeId)
            or internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - primaryEmploymentId
                - seniorityDate
                - employeeId
                - mainEmployer
                - salaryNumber
                - selfSickness
                - freeEmployer
                - workPermit
                - terminationSeniorityDate
                - residencePermit
                - readyForPayment
                - workStatus
              properties:
                primaryEmploymentId:
                  type: integer
                seniorityDate:
                  type: string
                  nullable: true
                employeeId:
                  type: string
                mainEmployer:
                  type: boolean
                salaryNumber:
                  type: string
                  nullable: true
                  maxLength: 40
                selfSickness:
                  type: string
                  nullable: true
                freeEmployer:
                  type: object
                  nullable: true
                  properties:
                    from:
                      type: string
                      nullable: true
                    to:
                      type: string
                      nullable: true
                workPermit:
                  type: object
                  nullable: true
                  properties:
                    from:
                      type: string
                      nullable: true
                    to:
                      type: string
                      nullable: true
                terminationSeniorityDate:
                  type: string
                  nullable: true
                residencePermit:
                  type: object
                  nullable: true
                  properties:
                    from:
                      type: string
                      nullable: true
                    to:
                      type: string
                      nullable: true
                readyForPayment:
                  type: boolean
                workStatus:
                  type: string
                  minLength: 1
                  maxLength: 64
                resourceType:
                  type: integer
                  nullable: true
            example:
              primaryEmploymentId: 28
              seniorityDate: '2019-08-29T00:00:00+02:00'
              employeeId: '66'
              mainEmployer: false
              salaryNumber: SAL-01A
              selfSickness: '2019-07-30T00:00:00+02:00'
              freeEmployer:
                from: '2021-02-15T00:00:00+00:00'
                to: '2021-02-15T00:00:00+00:00'
              workPermit:
                from: '2021-02-15T00:00:00+00:00'
                to: '2021-02-15T00:00:00+00:00'
              terminationSeniorityDate: '2019-08-29T00:00:00+02:00'
              residencePermit:
                from: '2021-02-15T00:00:00+00:00'
                to: null
              readyForPayment: false
              workStatus: WORK_STATUS_ACTIVE
              resourceType: 1
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  primaryEmployment:
                    type: object
                    properties:
                      id:
                        type: integer
                      idExt:
                        type: string
                      fteFactor:
                        type: number
                        nullable: true
                  seniorityDate:
                    type: string
                    nullable: true
                  employeeId:
                    type: string
                    nullable: true
                  startDate:
                    type: string
                    nullable: true
                  endDate:
                    type: string
                    nullable: true
                  countriesOfEmployments:
                    type: array
                    items:
                      type: string
                  userStatus:
                    type: string
                    nullable: true
                    enum:
                      - active
                      - invited
                      - null
                  userCalculatedStatus:
                    type: string
                    nullable: true
                    enum:
                      - active
                      - invited
                      - offboarding
                      - offboardingSoon
                      - inactive
                      - expired
                      - uninvited
                      - null
                  companyEmployeeCalculatedStatus:
                    type: string
                    enum:
                      - active
                      - inactive
                      - offboarding
                      - pending
                  statusDate:
                    type: string
                    nullable: true
                  companyEmployeeOffboardingDate:
                    type: string
                    nullable: true
                  primaryLocation:
                    type: object
                    nullable: true
                    properties:
                      name:
                        type: string
                        nullable: true
                      companyNumber:
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      externalId:
                        type: string
                        minLength: 1
                        maxLength: 40
                  employmentCount:
                    type: integer
                  hasMainEmployer:
                    type: boolean
                  mainEmployer:
                    type: boolean
                  totalFteFactor:
                    type: number
                  salaryNumber:
                    type: string
                    nullable: true
                  salarySystemCompanyId:
                    type: string
                    nullable: true
                    maxLength: 30
                  selfSickness:
                    type: string
                    nullable: true
                  freeEmployer:
                    type: object
                    nullable: true
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  workPermit:
                    type: object
                    nullable: true
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  terminationSeniorityDate:
                    type: string
                    nullable: true
                  residencePermit:
                    type: object
                    nullable: true
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  workStatus:
                    type: string
                    nullable: true
                    enum:
                      - WORK_STATUS_ACTIVE
                      - WORK_STATUS_RESIGNED
                      - WORK_STATUS_SICK_WITHOUT_PAYMENT
                      - WORK_STATUS_SICK
                      - WORK_STATUS_LEAVE
                      - WORK_STATUS_LEAVE_WITHOUT_PAYMENT
                      - WORK_STATUS_TEMPORARILY_LAID_OFF
                      - WORK_STATUS_TEMPORARILY_ACTIVE
                  resourceType:
                    type: object
                    required:
                      - id
                      - typeId
                      - name
                    properties:
                      id:
                        type: integer
                      typeId:
                        type: string
                      name:
                        type: string
                    nullable: true
                  readyForPayment:
                    type: boolean
                    description: >-
                      Field not available if related employment is in
                      "candidate" status
                    nullable: true
                  readyForPaymentMessage:
                    type: string
                    description: >-
                      Field not available if related employment is in
                      "candidate" status
                    nullable: true
                  companyId:
                    type: integer
                  userId:
                    type: string
              example:
                id: 1
                employeeId: '1'
                companyEmployeeCalculatedStatus: active
                companyEmployeeOffboardingDate: null
                countriesOfEmployments:
                  - NOR
                employmentCount: 1
                endDate: null
                hasMainEmployer: true
                mainEmployer: true
                primaryEmployment:
                  id: 26
                  idExt: '007'
                  fteFactor: 1
                seniorityDate: '2021-06-01T00:00:00+00:00'
                startDate: '2021-02-08T00:00:00+00:00'
                statusDate: '2021-02-08T00:00:00+00:00'
                totalFteFactor: 1
                userCalculatedStatus: active
                userStatus: active
                salaryNumber: null
                salarySystemCompanyId: SAL-123
                selfSickness: null
                freeEmployer:
                  from: null
                  to: null
                workPermit:
                  from: null
                  to: null
                terminationSeniorityDate: '2019-08-29T00:00:00+02:00'
                residencePermit:
                  from: null
                  to: null
                primaryLocation:
                  companyNumber: '12212'
                  name: Example company location
                  visitAddress:
                    address: Street 10
                    zipCode: 11-111
                    city: Oslo
                    municipality: Oslo
                  externalId: '001'
                workStatus: WORK_STATUS_ACTIVE
                resourceType:
                  id: 1
                  typeId: F
                  name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
                readyForPayment: false
                readyForPaymentMessage: message
                companyId: 2
                userId: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of company employee.
      tags:
        - Company employees
      parameters:
        - name: companyEmployeeId
          in: path
          required: true
          schema:
            type: string
        - name: external
          description: >-
            Param determines if id of company employee is external (employeeId)
            or internal (id)
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                primaryEmploymentId:
                  type: integer
                seniorityDate:
                  type: string
                  nullable: true
                employeeId:
                  type: string
                mainEmployer:
                  type: boolean
                salaryNumber:
                  type: string
                  nullable: true
                  maxLength: 40
                selfSickness:
                  type: string
                  nullable: true
                freeEmployer:
                  type: object
                  nullable: true
                  properties:
                    from:
                      type: string
                      nullable: true
                    to:
                      type: string
                      nullable: true
                workPermit:
                  type: object
                  nullable: true
                  properties:
                    from:
                      type: string
                      nullable: true
                    to:
                      type: string
                      nullable: true
                terminationSeniorityDate:
                  type: string
                  nullable: true
                residencePermit:
                  type: object
                  nullable: true
                  properties:
                    from:
                      type: string
                      nullable: true
                    to:
                      type: string
                      nullable: true
                readyForPayment:
                  type: boolean
                workStatus:
                  type: string
                  minLength: 1
                  maxLength: 64
                resourceType:
                  type: integer
                  nullable: true
            example:
              primaryEmploymentId: 28
              seniorityDate: '2019-08-29T00:00:00+02:00'
              employeeId: '66'
              mainEmployer: false
              salaryNumber: SAL-01A
              selfSickness: '2019-07-30T00:00:00+02:00'
              freeEmployer:
                from: '2021-02-15T00:00:00+00:00'
                to: '2021-02-15T00:00:00+00:00'
              workPermit:
                from: '2021-02-15T00:00:00+00:00'
                to: '2021-02-15T00:00:00+00:00'
              terminationSeniorityDate: '2019-08-29T00:00:00+02:00'
              residencePermit:
                from: '2021-02-15T00:00:00+00:00'
                to: null
              readyForPayment: false
              workStatus: WORK_STATUS_ACTIVE
              resourceType: 1
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  primaryEmployment:
                    type: object
                    properties:
                      id:
                        type: integer
                      idExt:
                        type: string
                      fteFactor:
                        type: number
                        nullable: true
                  seniorityDate:
                    type: string
                    nullable: true
                  employeeId:
                    type: string
                    nullable: true
                  startDate:
                    type: string
                    nullable: true
                  endDate:
                    type: string
                    nullable: true
                  countriesOfEmployments:
                    type: array
                    items:
                      type: string
                  userStatus:
                    type: string
                    nullable: true
                    enum:
                      - active
                      - invited
                      - null
                  userCalculatedStatus:
                    type: string
                    nullable: true
                    enum:
                      - active
                      - invited
                      - offboarding
                      - offboardingSoon
                      - inactive
                      - expired
                      - uninvited
                      - null
                  companyEmployeeCalculatedStatus:
                    type: string
                    enum:
                      - active
                      - inactive
                      - offboarding
                      - pending
                  statusDate:
                    type: string
                    nullable: true
                  companyEmployeeOffboardingDate:
                    type: string
                    nullable: true
                  primaryLocation:
                    type: object
                    nullable: true
                    properties:
                      name:
                        type: string
                        nullable: true
                      companyNumber:
                        type: string
                        nullable: true
                      visitAddress:
                        type: object
                        nullable: true
                        properties:
                          address:
                            type: string
                            nullable: true
                          zipCode:
                            type: string
                            nullable: true
                          city:
                            type: string
                            nullable: true
                          municipality:
                            type: string
                            nullable: true
                      externalId:
                        type: string
                        minLength: 1
                        maxLength: 40
                  employmentCount:
                    type: integer
                  hasMainEmployer:
                    type: boolean
                  mainEmployer:
                    type: boolean
                  totalFteFactor:
                    type: number
                  salaryNumber:
                    type: string
                    nullable: true
                  salarySystemCompanyId:
                    type: string
                    nullable: true
                    maxLength: 30
                  selfSickness:
                    type: string
                    nullable: true
                  freeEmployer:
                    type: object
                    nullable: true
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  workPermit:
                    type: object
                    nullable: true
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  terminationSeniorityDate:
                    type: string
                    nullable: true
                  residencePermit:
                    type: object
                    nullable: true
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  workStatus:
                    type: string
                    nullable: true
                    enum:
                      - WORK_STATUS_ACTIVE
                      - WORK_STATUS_RESIGNED
                      - WORK_STATUS_SICK_WITHOUT_PAYMENT
                      - WORK_STATUS_SICK
                      - WORK_STATUS_LEAVE
                      - WORK_STATUS_LEAVE_WITHOUT_PAYMENT
                      - WORK_STATUS_TEMPORARILY_LAID_OFF
                      - WORK_STATUS_TEMPORARILY_ACTIVE
                  resourceType:
                    type: object
                    required:
                      - id
                      - typeId
                      - name
                    properties:
                      id:
                        type: integer
                      typeId:
                        type: string
                      name:
                        type: string
                    nullable: true
                  readyForPayment:
                    type: boolean
                    description: >-
                      Field not available if related employment is in
                      "candidate" status
                    nullable: true
                  readyForPaymentMessage:
                    type: string
                    description: >-
                      Field not available if related employment is in
                      "candidate" status
                    nullable: true
                  companyId:
                    type: integer
                  userId:
                    type: string
              example:
                id: 1
                employeeId: '1'
                companyEmployeeCalculatedStatus: active
                companyEmployeeOffboardingDate: null
                countriesOfEmployments:
                  - NOR
                employmentCount: 1
                endDate: null
                hasMainEmployer: true
                mainEmployer: true
                primaryEmployment:
                  id: 26
                  idExt: '007'
                  fteFactor: 1
                seniorityDate: '2021-06-01T00:00:00+00:00'
                startDate: '2021-02-08T00:00:00+00:00'
                statusDate: '2021-02-08T00:00:00+00:00'
                totalFteFactor: 1
                userCalculatedStatus: active
                userStatus: active
                salaryNumber: null
                salarySystemCompanyId: SAL-123
                selfSickness: null
                freeEmployer:
                  from: null
                  to: null
                workPermit:
                  from: null
                  to: null
                terminationSeniorityDate: '2019-08-29T00:00:00+02:00'
                residencePermit:
                  from: null
                  to: null
                primaryLocation:
                  companyNumber: '12212'
                  name: Example company location
                  visitAddress:
                    address: Street 10
                    zipCode: 11-111
                    city: Oslo
                    municipality: Oslo
                  externalId: '001'
                workStatus: WORK_STATUS_ACTIVE
                resourceType:
                  id: 1
                  typeId: F
                  name: BACKEND_DEFAULT_NAME_RESOURCE_TYPE_F
                readyForPayment: false
                readyForPaymentMessage: message
                companyId: 2
                userId: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /competence/skill-type-categories:
    get:
      summary: Get list of skill type categories.
      tags:
        - Skills configuration - categories
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      required:
                        - ancestors
                        - children
                        - color
                        - createdAt
                        - description
                        - icon
                        - id
                        - level
                        - name
                        - number
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        description:
                          type: string
                        parentId:
                          type: string
                          nullable: true
                        ancestors:
                          type: array
                          items:
                            type: string
                        number:
                          type: string
                        color:
                          type: string
                          nullable: true
                        icon:
                          required:
                            - prefix
                            - iconName
                          type: object
                          nullable: true
                          properties:
                            prefix:
                              type: string
                              enum:
                                - fas
                                - fab
                                - far
                                - fal
                                - fad
                            iconName:
                              type: string
                              maxLength: 40
                              minLength: 1
                        level:
                          type: integer
                        children:
                          type: array
                          items:
                            type: object
                        createdAt:
                          type: string
              example:
                items:
                  - id: ab856537-c922-4a2d-a69b-2f0cd788c2b5
                    name: Developer
                    description: Responsible for implementation computer programs.
                    parentId: null
                    ancestors: []
                    number: D0001
                    color: '#c44a30'
                    icon:
                      prefix: fal
                      iconName: award
                    level: 0
                    children:
                      - id: f866acc7-ed9e-4eef-8a45-95f1c7ae29aa
                        name: Cloud Developer
                        description: >-
                          Responsible for implementations and maintenance cloud
                          infrastructures.
                        parentId: ab856537-c922-4a2d-a69b-2f0cd788c2b5
                        ancestors:
                          - ab856537-c922-4a2d-a69b-2f0cd788c2b5
                        number: D0025
                        color: '#1a1716'
                        icon:
                          prefix: fab
                          iconName: book
                        level: 1
                        children: []
                        createdAt: '2020-04-30T12:34:56+0000'
                    createdAt: '2020-04-30T12:34:56+0000'
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create skill type category.
      tags:
        - Skills configuration - categories
      requestBody:
        content:
          application/json:
            schema:
              required:
                - color
                - description
                - name
                - number
                - parentId
              type: object
              properties:
                name:
                  type: string
                  maxLength: 40
                  minLength: 1
                description:
                  type: string
                  nullable: true
                  maxLength: 255
                  minLength: 1
                parentId:
                  type: string
                  nullable: true
                number:
                  type: string
                  maxLength: 40
                  minLength: 1
                color:
                  type: string
                  nullable: true
                  maxLength: 50
                  minLength: 1
                icon:
                  type: object
                  nullable: true
                  required:
                    - iconName
                    - prefix
                  properties:
                    prefix:
                      type: string
                      enum:
                        - fas
                        - fab
                        - far
                        - fal
                        - fad
                    iconName:
                      type: string
                      maxLength: 40
                      minLength: 1
            example:
              name: Cloud Developer
              description: >-
                Responsible for implementations and maintenance cloud
                infrastructures.
              parentId: f866acc7-ed9e-4eef-8a45-95f1c7ae29aa
              number: D0001
              color: '#c44a30'
              icon:
                prefix: fab
                iconName: book
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - number
                  - name
                  - description
                  - color
                  - icon
                  - parentId
                properties:
                  id:
                    type: string
                    format: uuid
                  number:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                  color:
                    type: string
                    nullable: true
                  icon:
                    type: object
                    nullable: true
                    required:
                      - prefix
                      - iconName
                    properties:
                      prefix:
                        type: string
                        enum:
                          - fas
                          - fab
                          - far
                          - fal
                          - fad
                      iconName:
                        type: string
                        minLength: 1
                        maxLength: 40
                  parentId:
                    type: string
                    nullable: true
              example:
                id: bbdb035a-9091-11eb-acb1-0242ac160003
                number: '1'
                name: Example category
                description: New Category
                color: '#000000'
                icon:
                  prefix: fal
                  iconName: book-medical
                parentId: 066f8ea3-d10d-4b65-a54a-dda88bcb98ae
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/competence/skill-type-categories/{id}':
    get:
      summary: Get skill type category with given id.
      tags:
        - Skills configuration - categories
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - number
                  - name
                  - description
                  - color
                  - icon
                  - parentId
                properties:
                  id:
                    type: string
                    format: uuid
                  number:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                  color:
                    type: string
                    nullable: true
                  icon:
                    type: object
                    nullable: true
                    required:
                      - prefix
                      - iconName
                    properties:
                      prefix:
                        type: string
                        enum:
                          - fas
                          - fab
                          - far
                          - fal
                          - fad
                      iconName:
                        type: string
                        minLength: 1
                        maxLength: 40
                  parentId:
                    type: string
                    nullable: true
              example:
                id: bbdb035a-9091-11eb-acb1-0242ac160003
                number: '1'
                name: Example category
                description: New Category
                color: '#000000'
                icon:
                  prefix: fal
                  iconName: book-medical
                parentId: 066f8ea3-d10d-4b65-a54a-dda88bcb98ae
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit skill type category with given id.
      tags:
        - Skills configuration - categories
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - description
                - parentId
                - number
                - color
              properties:
                number:
                  type: string
                  minLength: 1
                  maxLength: 40
                name:
                  type: string
                  minLength: 1
                  maxLength: 40
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                color:
                  type: string
                  nullable: true
                icon:
                  type: object
                  nullable: true
                  required:
                    - prefix
                    - iconName
                  properties:
                    prefix:
                      type: string
                      enum:
                        - fas
                        - fab
                        - far
                        - fal
                        - fad
                    iconName:
                      type: string
                      minLength: 1
                      maxLength: 40
                parentId:
                  type: string
                  nullable: true
            example:
              number: D0001
              name: Cloud Developer
              description: >-
                Responsible for implementations and maintenance cloud
                infrastructures.
              color: '#c44a30'
              icon:
                prefix: fab
                iconName: book
              parentId: f866acc7-ed9e-4eef-8a45-95f1c7ae29aa
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - number
                  - name
                  - description
                  - color
                  - icon
                  - parentId
                properties:
                  id:
                    type: string
                    format: uuid
                  number:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                  color:
                    type: string
                    nullable: true
                  icon:
                    type: object
                    nullable: true
                    required:
                      - prefix
                      - iconName
                    properties:
                      prefix:
                        type: string
                        enum:
                          - fas
                          - fab
                          - far
                          - fal
                          - fad
                      iconName:
                        type: string
                        minLength: 1
                        maxLength: 40
                  parentId:
                    type: string
                    nullable: true
              example:
                id: bbdb035a-9091-11eb-acb1-0242ac160003
                number: '1'
                name: Example category
                description: New Category
                color: '#000000'
                icon:
                  prefix: fal
                  iconName: book-medical
                parentId: 066f8ea3-d10d-4b65-a54a-dda88bcb98ae
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of skill type category with given id.
      tags:
        - Skills configuration - categories
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                  minLength: 1
                  maxLength: 40
                name:
                  type: string
                  minLength: 1
                  maxLength: 40
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                color:
                  type: string
                  nullable: true
                icon:
                  type: object
                  nullable: true
                  required:
                    - prefix
                    - iconName
                  properties:
                    prefix:
                      type: string
                      enum:
                        - fas
                        - fab
                        - far
                        - fal
                        - fad
                    iconName:
                      type: string
                      minLength: 1
                      maxLength: 40
                parentId:
                  type: string
                  nullable: true
            example:
              number: D0001
              name: Cloud Developer
              description: >-
                Responsible for implementations and maintenance cloud
                infrastructures.
              color: '#c44a30'
              icon:
                prefix: fab
                iconName: book
              parentId: f866acc7-ed9e-4eef-8a45-95f1c7ae29aa
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - number
                  - name
                  - description
                  - color
                  - icon
                  - parentId
                properties:
                  id:
                    type: string
                    format: uuid
                  number:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                  color:
                    type: string
                    nullable: true
                  icon:
                    type: object
                    nullable: true
                    required:
                      - prefix
                      - iconName
                    properties:
                      prefix:
                        type: string
                        enum:
                          - fas
                          - fab
                          - far
                          - fal
                          - fad
                      iconName:
                        type: string
                        minLength: 1
                        maxLength: 40
                  parentId:
                    type: string
                    nullable: true
              example:
                id: bbdb035a-9091-11eb-acb1-0242ac160003
                number: '1'
                name: Example category
                description: New Category
                color: '#000000'
                icon:
                  prefix: fal
                  iconName: book-medical
                parentId: 066f8ea3-d10d-4b65-a54a-dda88bcb98ae
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /competence/skill-types/configuration:
    get:
      summary: >-
        This endpoint returns whole structure of skill type needed to generate
        empty form by fronted site.
      tags:
        - Skills configuration - types
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                required:
                  - createdAt
                  - defaultSkillStatus
                  - description
                  - id
                  - metaFields
                  - name
                  - number
                  - privacy
                  - status
                type: object
                properties:
                  id:
                    type: string
                  number:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
                    enum:
                      - active
                      - draft
                      - archived
                  categories:
                    type: array
                    items:
                      required:
                        - color
                        - icon
                        - id
                        - name
                        - number
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        number:
                          type: string
                        color:
                          type: string
                        icon:
                          required:
                            - iconName
                            - prefix
                          type: object
                          properties:
                            prefix:
                              type: string
                              enum:
                                - fas
                                - fab
                                - far
                                - fal
                                - fad
                            iconName:
                              maxLength: 40
                              minLength: 1
                              type: string
                          nullable: true
                  privacy:
                    type: string
                    enum:
                      - public
                      - myOrganization
                      - myManagers
                      - onlyMe
                  defaultSkillStatus:
                    type: string
                    enum:
                      - toBePlanned
                      - planned
                      - started
                      - toBeApproved
                      - approved
                      - expired
                  createdAt:
                    type: string
                  uploadedAt:
                    type: string
                  metaFields:
                    type: array
                    items:
                      required:
                        - descriptionTranslation
                        - id
                        - nameTranslation
                        - visibility
                      type: object
                      properties:
                        id:
                          type: string
                        nameTranslation:
                          type: string
                        descriptionTranslation:
                          type: string
                        visibility:
                          type: string
                          enum:
                            - none
                            - visible
                  sections:
                    type: array
                    items:
                      required:
                        - descriptionTranslation
                        - fields
                        - id
                        - nameTranslation
                      type: object
                      properties:
                        id:
                          type: string
                        nameTranslation:
                          type: string
                        descriptionTranslation:
                          type: string
                        fields:
                          type: array
                          items:
                            required:
                              - id
                              - nameTranslation
                              - descriptionTranslation
                              - visibility
                              - value
                              - options
                            type: object
                            properties:
                              id:
                                type: string
                              nameTranslation:
                                type: string
                              descriptionTranslation:
                                type: string
                              visibility:
                                type: string
                                enum:
                                  - none
                                  - visible
                                  - mandatory
                              value:
                                nullable: true
                              options:
                                type: object
                                nullable: true
              example:
                id: 975bcf52-e730-4ed1-89a1-7e0d8bde7e70
                number: '123'
                name: Industrial flower arrangement
                description: Petal to the metal.
                privacy: public
                defaultSkillStatus: approved
                status: active
                categories:
                  - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                    name: Cloud Developer
                    number: D0006
                    color: C44A30
                    icon:
                      prefix: fas
                      iconName: book
                createdAt: '2020-04-30T12:34:56+0000'
                updatedAt: '2020-04-30T12:34:56+0000'
                metaFields:
                  - id: administrator
                    nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_ADMINISTRATOR_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_ADMINISTRATOR_DESCRIPTION
                    visibility: visible
                    value: '1'
                  - id: tags
                    nameTranslation: COMPETENCE_SKILL_TYPE_TAGS_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_TAGS_DESCRIPTION
                    visibility: visible
                    value:
                      - yamaha
                      - honda
                      - kawasaki
                      - suzuki
                sections:
                  - id: details
                    nameTranslation: COMPETENCE_SKILL_TYPE_SECTION_DETAILS_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_SECTION_DETAILS_DESCRIPTION
                    fields:
                      - id: startDate
                        nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_START_DATE_LABEL
                        descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_START_DATE_DESCRIPTION
                        visibility: mandatory
                        value: null
                        options: null
                      - id: completeDate
                        nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_COMPLETE_DATE_LABEL
                        descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_COMPLETE_DATE_DESCRIPTION
                        visibility: visible
                        value: null
                        options: null
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /competence/skill-types:
    get:
      summary: Get list of competence skill types.
      tags:
        - Skills configuration - types
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - total
                  - limit
                  - page
                  - pages
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - number
                        - name
                        - description
                        - privacy
                        - defaultSkillStatus
                        - status
                        - tags
                        - createdAt
                        - updatedAt
                      properties:
                        id:
                          type: string
                          format: uuid
                        number:
                          type: string
                        name:
                          type: string
                        description:
                          type: string
                          nullable: true
                        privacy:
                          type: string
                          enum:
                            - public
                            - myOrganization
                            - myManagers
                            - onlyMe
                        defaultSkillStatus:
                          type: string
                          enum:
                            - toBePlanned
                            - planned
                            - started
                            - toBeApproved
                            - approved
                            - expired
                        status:
                          type: string
                          enum:
                            - active
                            - draft
                            - archived
                        tags:
                          type: array
                          nullable: true
                          items:
                            type: string
                        categories:
                          type: array
                          items:
                            type: object
                            required:
                              - id
                              - name
                              - number
                              - color
                              - icon
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              number:
                                type: string
                              color:
                                type: string
                                nullable: true
                              icon:
                                type: object
                                nullable: true
                                required:
                                  - prefix
                                  - iconName
                                properties:
                                  prefix:
                                    type: string
                                    enum:
                                      - fas
                                      - fab
                                      - far
                                      - fal
                                      - fad
                                  iconName:
                                    type: string
                                    minLength: 1
                                    maxLength: 40
                        createdAt:
                          type: string
                        updatedAt:
                          type: string
                  total:
                    type: integer
                  limit:
                    type: integer
                  page:
                    type: integer
                  pages:
                    type: integer
              example:
                items:
                  - id: 975bcf52-e730-4ed1-89a1-7e0d8bde7e70
                    number: '123'
                    name: Industrial flower arrangement
                    description: Petal to the metal.
                    privacy: public
                    defaultSkillStatus: approved
                    status: active
                    tags:
                      - kawasaki
                      - honda
                    categories:
                      - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                        name: Cloud Developer
                        number: D0006
                        color: '#c44a30'
                        icon:
                          prefix: fas
                          iconName: book
                    createdAt: '2020-04-30T12:34:56+0000'
                    updatedAt: '2020-04-30T12:34:56+0000'
                total: 1
                limit: 10
                page: 1
                pages: 1
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create competence skill type.
      tags:
        - Skills configuration - types
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - number
                - name
                - description
                - privacy
                - defaultSkillStatus
                - categories
                - cvCategories
                - metaFields
                - sections
              properties:
                number:
                  type: string
                  minLength: 1
                  maxLength: 40
                name:
                  type: string
                  minLength: 1
                  maxLength: 40
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                privacy:
                  type: string
                  enum:
                    - public
                    - myOrganization
                    - myManagers
                    - onlyMe
                defaultSkillStatus:
                  type: string
                  enum:
                    - toBePlanned
                    - planned
                    - started
                    - toBeApproved
                    - approved
                categories:
                  type: array
                  items:
                    type: string
                    format: uuid
                cvCategories:
                  type: array
                  items:
                    type: string
                    format: uuid
                metaFields:
                  type: array
                  items:
                    type: object
                    required:
                      - id
                      - visibility
                      - value
                    properties:
                      id:
                        type: string
                        enum:
                          - administrator
                          - fixedUrl
                          - hoursOfDuration
                          - tags
                      visibility:
                        type: string
                        enum:
                          - none
                          - visible
                      value:
                        oneOf:
                          - type: integer
                          - type: string
                            maxLength: 255
                          - type: array
                            items:
                              type: string
                          - type: 'null'
                sections:
                  type: array
                  items:
                    type: object
                    required:
                      - id
                      - fields
                    properties:
                      id:
                        type: string
                        enum:
                          - details
                          - skillProvider
                          - expiryPlanningAndScore
                          - attachmentsAndLinks
                      fields:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - visibility
                          properties:
                            id:
                              type: string
                              enum:
                                - skillTitle
                                - startedDate
                                - completedDate
                                - comment
                                - lengthOfExperience
                                - educationalLevel
                                - writtenLanguageSkillLevel
                                - oralLanguageSkillLevel
                                - internalExternal
                                - nameOfProvider
                                - countryOfProvider
                                - providerPlace
                                - targetScore
                                - currentScore
                                - expiryDate
                                - plannedCompletedDate
                                - requirement
                                - criticality
                                - userDefinedNotificationDate
                                - documents
                                - customUrl
                            visibility:
                              type: string
                              enum:
                                - none
                                - visible
                                - mandatory
                            value:
                              oneOf:
                                - type: integer
                                - type: string
                                  maxLength: 255
                                - type: array
                                  items: {}
                                - type: object
                                - type: 'null'
            example:
              number: '123'
              name: Industrial flower arrangement
              description: Petal to the metal.
              privacy: public
              defaultSkillStatus: approved
              categories:
                - 7aa384cc-b007-4537-9fb7-d985b54fbb2f
                - fe6b2a07-eddf-11ea-a2e3-022ed6ba66f8
              cvCategories:
                - 94c7599e-bd9c-453c-9d2d-a3a9d0037db7
                - eb62b316-d588-4a2f-9e37-68d4ee09dc45
              metaFields:
                - id: administrator
                  visibility: visible
                  value: '1'
                - id: tags
                  visibility: visible
                  value:
                    - yamaha
                    - honda
                    - kawasaki
                    - suzuki
              sections:
                - id: details
                  fields:
                    - id: startedDate
                      visibility: mandatory
                    - id: completedDate
                      visibility: visible
                    - id: comment
                      visibility: visible
                    - id: lengthOfExperience
                      visibility: visible
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - number
                  - name
                  - description
                  - status
                  - categories
                  - cvCategories
                  - privacy
                  - defaultSkillStatus
                  - createdAt
                  - updatedAt
                  - metaFields
                  - sections
                properties:
                  id:
                    type: string
                    format: uuid
                  number:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  privacy:
                    type: string
                    enum:
                      - public
                      - myOrganization
                      - myManagers
                      - onlyMe
                  defaultSkillStatus:
                    type: string
                    enum:
                      - toBePlanned
                      - planned
                      - started
                      - toBeApproved
                      - approved
                      - expired
                  status:
                    type: string
                    enum:
                      - active
                      - draft
                      - archived
                  categories:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - number
                        - color
                        - icon
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        number:
                          type: string
                        color:
                          type: string
                          nullable: true
                        icon:
                          type: object
                          nullable: true
                          required:
                            - prefix
                            - iconName
                          properties:
                            prefix:
                              type: string
                              enum:
                                - fas
                                - fab
                                - far
                                - fal
                                - fad
                            iconName:
                              type: string
                              minLength: 1
                              maxLength: 40
                  cvCategories:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - color
                        - icon
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        color:
                          type: string
                          nullable: true
                        icon:
                          type: object
                          nullable: true
                          required:
                            - prefix
                            - iconName
                          properties:
                            prefix:
                              type: string
                              enum:
                                - fas
                                - fab
                                - far
                                - fal
                                - fad
                            iconName:
                              type: string
                              minLength: 1
                              maxLength: 40
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  metaFields:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - nameTranslation
                        - descriptionTranslation
                        - visibility
                        - value
                        - options
                      properties:
                        id:
                          type: string
                          enum:
                            - administrator
                            - fixedUrl
                            - hoursOfDuration
                            - tags
                        nameTranslation:
                          type: string
                        descriptionTranslation:
                          type: string
                        visibility:
                          type: string
                          enum:
                            - none
                            - visible
                        value:
                          nullable: true
                        options:
                          nullable: true
                  sections:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - nameTranslation
                        - descriptionTranslation
                        - fields
                      properties:
                        id:
                          type: string
                          enum:
                            - details
                            - skillProvider
                            - expiryPlanningAndScore
                            - attachmentsAndLinks
                        nameTranslation:
                          type: string
                        descriptionTranslation:
                          type: string
                        fields:
                          type: array
                          items:
                            type: object
                            required:
                              - id
                              - nameTranslation
                              - descriptionTranslation
                              - visibility
                              - value
                              - options
                            properties:
                              id:
                                type: string
                                enum:
                                  - skillTitle
                                  - startedDate
                                  - completedDate
                                  - comment
                                  - lengthOfExperience
                                  - educationalLevel
                                  - writtenLanguageSkillLevel
                                  - oralLanguageSkillLevel
                                  - internalExternal
                                  - nameOfProvider
                                  - countryOfProvider
                                  - providerPlace
                                  - targetScore
                                  - currentScore
                                  - expiryDate
                                  - plannedCompletedDate
                                  - requirement
                                  - criticality
                                  - userDefinedNotificationDate
                                  - documents
                                  - customUrl
                              nameTranslation:
                                type: string
                              descriptionTranslation:
                                type: string
                              visibility:
                                type: string
                                enum:
                                  - none
                                  - visible
                                  - mandatory
                              value:
                                nullable: true
                              options:
                                nullable: true
              example:
                id: 975bcf52-e730-4ed1-89a1-7e0d8bde7e70
                number: '123'
                name: Industrial flower arrangement
                description: Petal to the metal.
                privacy: public
                defaultSkillStatus: approved
                status: active
                categories:
                  - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                    name: Cloud Developer
                    number: D0006
                    color: '#c44a30'
                    icon:
                      prefix: fas
                      iconName: book
                cvCategories:
                  - id: 6ec02b97-ad0c-4ebe-8ee8-c5866793f741
                    name: Work experiences
                    color: C44A30
                    icon:
                      prefix: fas
                      iconName: book
                createdAt: '2020-04-30T12:34:56+0000'
                updatedAt: '2020-04-30T12:34:56+0000'
                metaFields:
                  - id: administrator
                    nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_ADMINISTRATOR_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_ADMINISTRATOR_DESCRIPTION
                    visibility: visible
                    value: '1'
                    options: null
                  - id: tags
                    nameTranslation: COMPETENCE_SKILL_TYPE_TAGS_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_TAGS_DESCRIPTION
                    visibility: visible
                    value:
                      - yamaha
                      - honda
                      - kawasaki
                      - suzuki
                    options: null
                sections:
                  - id: details
                    nameTranslation: COMPETENCE_SKILL_TYPE_SECTION_DETAILS_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_SECTION_DETAILS_DESCRIPTION
                    fields:
                      - id: startedDate
                        nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_START_DATE_LABEL
                        descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_START_DATE_DESCRIPTION
                        visibility: mandatory
                        value: null
                        options: null
                      - id: completedDate
                        nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_COMPLETE_DATE_LABEL
                        descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_COMPLETE_DATE_DESCRIPTION
                        visibility: visible
                        value: null
                        options: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/competence/skill-types/{id}':
    get:
      summary: 'Get one Skill Type with all its definition, fields etc by given id.'
      tags:
        - Skills configuration - types
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: 200 response
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - number
                  - name
                  - description
                  - status
                  - categories
                  - cvCategories
                  - privacy
                  - defaultSkillStatus
                  - createdAt
                  - updatedAt
                  - metaFields
                  - sections
                properties:
                  id:
                    type: string
                    format: uuid
                  number:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  privacy:
                    type: string
                    enum:
                      - public
                      - myOrganization
                      - myManagers
                      - onlyMe
                  defaultSkillStatus:
                    type: string
                    enum:
                      - toBePlanned
                      - planned
                      - started
                      - toBeApproved
                      - approved
                      - expired
                  status:
                    type: string
                    enum:
                      - active
                      - draft
                      - archived
                  categories:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - number
                        - color
                        - icon
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        number:
                          type: string
                        color:
                          type: string
                          nullable: true
                        icon:
                          type: object
                          nullable: true
                          required:
                            - prefix
                            - iconName
                          properties:
                            prefix:
                              type: string
                              enum:
                                - fas
                                - fab
                                - far
                                - fal
                                - fad
                            iconName:
                              type: string
                              minLength: 1
                              maxLength: 40
                  cvCategories:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - color
                        - icon
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        color:
                          type: string
                          nullable: true
                        icon:
                          type: object
                          nullable: true
                          required:
                            - prefix
                            - iconName
                          properties:
                            prefix:
                              type: string
                              enum:
                                - fas
                                - fab
                                - far
                                - fal
                                - fad
                            iconName:
                              type: string
                              minLength: 1
                              maxLength: 40
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  metaFields:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - nameTranslation
                        - descriptionTranslation
                        - visibility
                        - value
                        - options
                      properties:
                        id:
                          type: string
                          enum:
                            - administrator
                            - fixedUrl
                            - hoursOfDuration
                            - tags
                        nameTranslation:
                          type: string
                        descriptionTranslation:
                          type: string
                        visibility:
                          type: string
                          enum:
                            - none
                            - visible
                        value:
                          nullable: true
                        options:
                          nullable: true
                  sections:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - nameTranslation
                        - descriptionTranslation
                        - fields
                      properties:
                        id:
                          type: string
                          enum:
                            - details
                            - skillProvider
                            - expiryPlanningAndScore
                            - attachmentsAndLinks
                        nameTranslation:
                          type: string
                        descriptionTranslation:
                          type: string
                        fields:
                          type: array
                          items:
                            type: object
                            required:
                              - id
                              - nameTranslation
                              - descriptionTranslation
                              - visibility
                              - value
                              - options
                            properties:
                              id:
                                type: string
                                enum:
                                  - skillTitle
                                  - startedDate
                                  - completedDate
                                  - comment
                                  - lengthOfExperience
                                  - educationalLevel
                                  - writtenLanguageSkillLevel
                                  - oralLanguageSkillLevel
                                  - internalExternal
                                  - nameOfProvider
                                  - countryOfProvider
                                  - providerPlace
                                  - targetScore
                                  - currentScore
                                  - expiryDate
                                  - plannedCompletedDate
                                  - requirement
                                  - criticality
                                  - userDefinedNotificationDate
                                  - documents
                                  - customUrl
                              nameTranslation:
                                type: string
                              descriptionTranslation:
                                type: string
                              visibility:
                                type: string
                                enum:
                                  - none
                                  - visible
                                  - mandatory
                              value:
                                nullable: true
                              options:
                                nullable: true
              example:
                id: 975bcf52-e730-4ed1-89a1-7e0d8bde7e70
                number: '123'
                name: Industrial flower arrangement
                description: Petal to the metal.
                privacy: public
                defaultSkillStatus: approved
                status: active
                categories:
                  - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                    name: Cloud Developer
                    number: D0006
                    color: '#c44a30'
                    icon:
                      prefix: fas
                      iconName: book
                cvCategories:
                  - id: 6ec02b97-ad0c-4ebe-8ee8-c5866793f741
                    name: Work experiences
                    color: C44A30
                    icon:
                      prefix: fas
                      iconName: book
                createdAt: '2020-04-30T12:34:56+0000'
                updatedAt: '2020-04-30T12:34:56+0000'
                metaFields:
                  - id: administrator
                    nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_ADMINISTRATOR_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_ADMINISTRATOR_DESCRIPTION
                    visibility: visible
                    value: '1'
                    options: null
                  - id: tags
                    nameTranslation: COMPETENCE_SKILL_TYPE_TAGS_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_TAGS_DESCRIPTION
                    visibility: visible
                    value:
                      - yamaha
                      - honda
                      - kawasaki
                      - suzuki
                    options: null
                sections:
                  - id: details
                    nameTranslation: COMPETENCE_SKILL_TYPE_SECTION_DETAILS_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_SECTION_DETAILS_DESCRIPTION
                    fields:
                      - id: startedDate
                        nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_START_DATE_LABEL
                        descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_START_DATE_DESCRIPTION
                        visibility: mandatory
                        value: null
                        options: null
                      - id: completedDate
                        nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_COMPLETE_DATE_LABEL
                        descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_COMPLETE_DATE_DESCRIPTION
                        visibility: visible
                        value: null
                        options: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit Skill Type with given id.
      tags:
        - Skills configuration - types
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - number
                - name
                - description
                - privacy
                - defaultSkillStatus
                - categories
                - cvCategories
                - metaFields
                - sections
              properties:
                number:
                  type: string
                  minLength: 1
                  maxLength: 40
                name:
                  type: string
                  minLength: 1
                  maxLength: 40
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                privacy:
                  type: string
                  enum:
                    - public
                    - myOrganization
                    - myManagers
                    - onlyMe
                defaultSkillStatus:
                  type: string
                  enum:
                    - toBePlanned
                    - planned
                    - started
                    - toBeApproved
                    - approved
                categories:
                  type: array
                  items:
                    type: string
                    format: uuid
                cvCategories:
                  type: array
                  items:
                    type: string
                    format: uuid
                metaFields:
                  type: array
                  items:
                    type: object
                    required:
                      - id
                      - visibility
                      - value
                    properties:
                      id:
                        type: string
                        enum:
                          - administrator
                          - fixedUrl
                          - hoursOfDuration
                          - tags
                      visibility:
                        type: string
                        enum:
                          - none
                          - visible
                      value:
                        oneOf:
                          - type: integer
                          - type: string
                            maxLength: 255
                          - type: array
                            items:
                              type: string
                          - type: 'null'
                sections:
                  type: array
                  items:
                    type: object
                    required:
                      - id
                      - fields
                    properties:
                      id:
                        type: string
                        enum:
                          - details
                          - skillProvider
                          - expiryPlanningAndScore
                          - attachmentsAndLinks
                      fields:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - visibility
                          properties:
                            id:
                              type: string
                              enum:
                                - skillTitle
                                - startedDate
                                - completedDate
                                - comment
                                - lengthOfExperience
                                - educationalLevel
                                - writtenLanguageSkillLevel
                                - oralLanguageSkillLevel
                                - internalExternal
                                - nameOfProvider
                                - countryOfProvider
                                - providerPlace
                                - targetScore
                                - currentScore
                                - expiryDate
                                - plannedCompletedDate
                                - requirement
                                - criticality
                                - userDefinedNotificationDate
                                - documents
                                - customUrl
                            visibility:
                              type: string
                              enum:
                                - none
                                - visible
                                - mandatory
                            value:
                              oneOf:
                                - type: integer
                                - type: string
                                  maxLength: 255
                                - type: array
                                  items: {}
                                - type: object
                                - type: 'null'
            example:
              number: '123'
              name: Industrial flower arrangement
              description: Petal to the metal.
              privacy: public
              defaultSkillStatus: approved
              categories:
                - 7aa384cc-b007-4537-9fb7-d985b54fbb2f
                - fe6b2a07-eddf-11ea-a2e3-022ed6ba66f8
              cvCategories:
                - 94c7599e-bd9c-453c-9d2d-a3a9d0037db7
                - eb62b316-d588-4a2f-9e37-68d4ee09dc45
              metaFields:
                - id: administrator
                  visibility: visible
                  value: '1'
                - id: tags
                  visibility: visible
                  value:
                    - yamaha
                    - honda
                    - kawasaki
                    - suzuki
              sections:
                - id: details
                  fields:
                    - id: startedDate
                      visibility: mandatory
                    - id: completedDate
                      visibility: visible
                    - id: comment
                      visibility: visible
                    - id: lengthOfExperience
                      visibility: visible
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - number
                  - name
                  - description
                  - status
                  - categories
                  - cvCategories
                  - privacy
                  - defaultSkillStatus
                  - createdAt
                  - updatedAt
                  - metaFields
                  - sections
                properties:
                  id:
                    type: string
                    format: uuid
                  number:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  privacy:
                    type: string
                    enum:
                      - public
                      - myOrganization
                      - myManagers
                      - onlyMe
                  defaultSkillStatus:
                    type: string
                    enum:
                      - toBePlanned
                      - planned
                      - started
                      - toBeApproved
                      - approved
                      - expired
                  status:
                    type: string
                    enum:
                      - active
                      - draft
                      - archived
                  categories:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - number
                        - color
                        - icon
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        number:
                          type: string
                        color:
                          type: string
                          nullable: true
                        icon:
                          type: object
                          nullable: true
                          required:
                            - prefix
                            - iconName
                          properties:
                            prefix:
                              type: string
                              enum:
                                - fas
                                - fab
                                - far
                                - fal
                                - fad
                            iconName:
                              type: string
                              minLength: 1
                              maxLength: 40
                  cvCategories:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - color
                        - icon
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        color:
                          type: string
                          nullable: true
                        icon:
                          type: object
                          nullable: true
                          required:
                            - prefix
                            - iconName
                          properties:
                            prefix:
                              type: string
                              enum:
                                - fas
                                - fab
                                - far
                                - fal
                                - fad
                            iconName:
                              type: string
                              minLength: 1
                              maxLength: 40
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  metaFields:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - nameTranslation
                        - descriptionTranslation
                        - visibility
                        - value
                        - options
                      properties:
                        id:
                          type: string
                          enum:
                            - administrator
                            - fixedUrl
                            - hoursOfDuration
                            - tags
                        nameTranslation:
                          type: string
                        descriptionTranslation:
                          type: string
                        visibility:
                          type: string
                          enum:
                            - none
                            - visible
                        value:
                          nullable: true
                        options:
                          nullable: true
                  sections:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - nameTranslation
                        - descriptionTranslation
                        - fields
                      properties:
                        id:
                          type: string
                          enum:
                            - details
                            - skillProvider
                            - expiryPlanningAndScore
                            - attachmentsAndLinks
                        nameTranslation:
                          type: string
                        descriptionTranslation:
                          type: string
                        fields:
                          type: array
                          items:
                            type: object
                            required:
                              - id
                              - nameTranslation
                              - descriptionTranslation
                              - visibility
                              - value
                              - options
                            properties:
                              id:
                                type: string
                                enum:
                                  - skillTitle
                                  - startedDate
                                  - completedDate
                                  - comment
                                  - lengthOfExperience
                                  - educationalLevel
                                  - writtenLanguageSkillLevel
                                  - oralLanguageSkillLevel
                                  - internalExternal
                                  - nameOfProvider
                                  - countryOfProvider
                                  - providerPlace
                                  - targetScore
                                  - currentScore
                                  - expiryDate
                                  - plannedCompletedDate
                                  - requirement
                                  - criticality
                                  - userDefinedNotificationDate
                                  - documents
                                  - customUrl
                              nameTranslation:
                                type: string
                              descriptionTranslation:
                                type: string
                              visibility:
                                type: string
                                enum:
                                  - none
                                  - visible
                                  - mandatory
                              value:
                                nullable: true
                              options:
                                nullable: true
              example:
                id: 975bcf52-e730-4ed1-89a1-7e0d8bde7e70
                number: '123'
                name: Industrial flower arrangement
                description: Petal to the metal.
                privacy: public
                defaultSkillStatus: approved
                status: active
                categories:
                  - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                    name: Cloud Developer
                    number: D0006
                    color: '#c44a30'
                    icon:
                      prefix: fas
                      iconName: book
                cvCategories:
                  - id: 6ec02b97-ad0c-4ebe-8ee8-c5866793f741
                    name: Work experiences
                    color: C44A30
                    icon:
                      prefix: fas
                      iconName: book
                createdAt: '2020-04-30T12:34:56+0000'
                updatedAt: '2020-04-30T12:34:56+0000'
                metaFields:
                  - id: administrator
                    nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_ADMINISTRATOR_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_ADMINISTRATOR_DESCRIPTION
                    visibility: visible
                    value: '1'
                    options: null
                  - id: tags
                    nameTranslation: COMPETENCE_SKILL_TYPE_TAGS_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_TAGS_DESCRIPTION
                    visibility: visible
                    value:
                      - yamaha
                      - honda
                      - kawasaki
                      - suzuki
                    options: null
                sections:
                  - id: details
                    nameTranslation: COMPETENCE_SKILL_TYPE_SECTION_DETAILS_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_SECTION_DETAILS_DESCRIPTION
                    fields:
                      - id: startedDate
                        nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_START_DATE_LABEL
                        descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_START_DATE_DESCRIPTION
                        visibility: mandatory
                        value: null
                        options: null
                      - id: completedDate
                        nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_COMPLETE_DATE_LABEL
                        descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_COMPLETE_DATE_DESCRIPTION
                        visibility: visible
                        value: null
                        options: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of Skill Type with given id.
      tags:
        - Skills configuration - types
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                  minLength: 1
                  maxLength: 40
                name:
                  type: string
                  minLength: 1
                  maxLength: 40
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                privacy:
                  type: string
                  enum:
                    - public
                    - myOrganization
                    - myManagers
                    - onlyMe
                defaultSkillStatus:
                  type: string
                  enum:
                    - toBePlanned
                    - planned
                    - started
                    - toBeApproved
                    - approved
                categories:
                  type: array
                  items:
                    type: string
                    format: uuid
                cvCategories:
                  type: array
                  items:
                    type: string
                    format: uuid
                metaFields:
                  type: array
                  items:
                    type: object
                    required:
                      - id
                      - visibility
                      - value
                    properties:
                      id:
                        type: string
                        enum:
                          - administrator
                          - fixedUrl
                          - hoursOfDuration
                          - tags
                      visibility:
                        type: string
                        enum:
                          - none
                          - visible
                      value:
                        oneOf:
                          - type: integer
                          - type: string
                            maxLength: 255
                          - type: array
                            items:
                              type: string
                          - type: 'null'
                sections:
                  type: array
                  items:
                    type: object
                    required:
                      - id
                      - fields
                    properties:
                      id:
                        type: string
                        enum:
                          - details
                          - skillProvider
                          - expiryPlanningAndScore
                          - attachmentsAndLinks
                      fields:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - visibility
                          properties:
                            id:
                              type: string
                              enum:
                                - skillTitle
                                - startedDate
                                - completedDate
                                - comment
                                - lengthOfExperience
                                - educationalLevel
                                - writtenLanguageSkillLevel
                                - oralLanguageSkillLevel
                                - internalExternal
                                - nameOfProvider
                                - countryOfProvider
                                - providerPlace
                                - targetScore
                                - currentScore
                                - expiryDate
                                - plannedCompletedDate
                                - requirement
                                - criticality
                                - userDefinedNotificationDate
                                - documents
                                - customUrl
                            visibility:
                              type: string
                              enum:
                                - none
                                - visible
                                - mandatory
                            value:
                              oneOf:
                                - type: integer
                                - type: string
                                  maxLength: 255
                                - type: array
                                  items: {}
                                - type: object
                                - type: 'null'
            example:
              number: '123'
              name: Industrial flower arrangement
              description: Petal to the metal.
              privacy: public
              defaultSkillStatus: approved
              categories:
                - 7aa384cc-b007-4537-9fb7-d985b54fbb2f
                - fe6b2a07-eddf-11ea-a2e3-022ed6ba66f8
              cvCategories:
                - 94c7599e-bd9c-453c-9d2d-a3a9d0037db7
                - eb62b316-d588-4a2f-9e37-68d4ee09dc45
              metaFields:
                - id: administrator
                  visibility: visible
                  value: '1'
                - id: tags
                  visibility: visible
                  value:
                    - yamaha
                    - honda
                    - kawasaki
                    - suzuki
              sections:
                - id: details
                  fields:
                    - id: startedDate
                      visibility: mandatory
                    - id: completedDate
                      visibility: visible
                    - id: comment
                      visibility: visible
                    - id: lengthOfExperience
                      visibility: visible
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - number
                  - name
                  - description
                  - status
                  - categories
                  - cvCategories
                  - privacy
                  - defaultSkillStatus
                  - createdAt
                  - updatedAt
                  - metaFields
                  - sections
                properties:
                  id:
                    type: string
                    format: uuid
                  number:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  privacy:
                    type: string
                    enum:
                      - public
                      - myOrganization
                      - myManagers
                      - onlyMe
                  defaultSkillStatus:
                    type: string
                    enum:
                      - toBePlanned
                      - planned
                      - started
                      - toBeApproved
                      - approved
                      - expired
                  status:
                    type: string
                    enum:
                      - active
                      - draft
                      - archived
                  categories:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - number
                        - color
                        - icon
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        number:
                          type: string
                        color:
                          type: string
                          nullable: true
                        icon:
                          type: object
                          nullable: true
                          required:
                            - prefix
                            - iconName
                          properties:
                            prefix:
                              type: string
                              enum:
                                - fas
                                - fab
                                - far
                                - fal
                                - fad
                            iconName:
                              type: string
                              minLength: 1
                              maxLength: 40
                  cvCategories:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - color
                        - icon
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        color:
                          type: string
                          nullable: true
                        icon:
                          type: object
                          nullable: true
                          required:
                            - prefix
                            - iconName
                          properties:
                            prefix:
                              type: string
                              enum:
                                - fas
                                - fab
                                - far
                                - fal
                                - fad
                            iconName:
                              type: string
                              minLength: 1
                              maxLength: 40
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  metaFields:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - nameTranslation
                        - descriptionTranslation
                        - visibility
                        - value
                        - options
                      properties:
                        id:
                          type: string
                          enum:
                            - administrator
                            - fixedUrl
                            - hoursOfDuration
                            - tags
                        nameTranslation:
                          type: string
                        descriptionTranslation:
                          type: string
                        visibility:
                          type: string
                          enum:
                            - none
                            - visible
                        value:
                          nullable: true
                        options:
                          nullable: true
                  sections:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - nameTranslation
                        - descriptionTranslation
                        - fields
                      properties:
                        id:
                          type: string
                          enum:
                            - details
                            - skillProvider
                            - expiryPlanningAndScore
                            - attachmentsAndLinks
                        nameTranslation:
                          type: string
                        descriptionTranslation:
                          type: string
                        fields:
                          type: array
                          items:
                            type: object
                            required:
                              - id
                              - nameTranslation
                              - descriptionTranslation
                              - visibility
                              - value
                              - options
                            properties:
                              id:
                                type: string
                                enum:
                                  - skillTitle
                                  - startedDate
                                  - completedDate
                                  - comment
                                  - lengthOfExperience
                                  - educationalLevel
                                  - writtenLanguageSkillLevel
                                  - oralLanguageSkillLevel
                                  - internalExternal
                                  - nameOfProvider
                                  - countryOfProvider
                                  - providerPlace
                                  - targetScore
                                  - currentScore
                                  - expiryDate
                                  - plannedCompletedDate
                                  - requirement
                                  - criticality
                                  - userDefinedNotificationDate
                                  - documents
                                  - customUrl
                              nameTranslation:
                                type: string
                              descriptionTranslation:
                                type: string
                              visibility:
                                type: string
                                enum:
                                  - none
                                  - visible
                                  - mandatory
                              value:
                                nullable: true
                              options:
                                nullable: true
              example:
                id: 975bcf52-e730-4ed1-89a1-7e0d8bde7e70
                number: '123'
                name: Industrial flower arrangement
                description: Petal to the metal.
                privacy: public
                defaultSkillStatus: approved
                status: active
                categories:
                  - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                    name: Cloud Developer
                    number: D0006
                    color: '#c44a30'
                    icon:
                      prefix: fas
                      iconName: book
                cvCategories:
                  - id: 6ec02b97-ad0c-4ebe-8ee8-c5866793f741
                    name: Work experiences
                    color: C44A30
                    icon:
                      prefix: fas
                      iconName: book
                createdAt: '2020-04-30T12:34:56+0000'
                updatedAt: '2020-04-30T12:34:56+0000'
                metaFields:
                  - id: administrator
                    nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_ADMINISTRATOR_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_ADMINISTRATOR_DESCRIPTION
                    visibility: visible
                    value: '1'
                    options: null
                  - id: tags
                    nameTranslation: COMPETENCE_SKILL_TYPE_TAGS_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_TAGS_DESCRIPTION
                    visibility: visible
                    value:
                      - yamaha
                      - honda
                      - kawasaki
                      - suzuki
                    options: null
                sections:
                  - id: details
                    nameTranslation: COMPETENCE_SKILL_TYPE_SECTION_DETAILS_LABEL
                    descriptionTranslation: COMPETENCE_SKILL_TYPE_SECTION_DETAILS_DESCRIPTION
                    fields:
                      - id: startedDate
                        nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_START_DATE_LABEL
                        descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_START_DATE_DESCRIPTION
                        visibility: mandatory
                        value: null
                        options: null
                      - id: completedDate
                        nameTranslation: COMPETENCE_SKILL_TYPE_FIELD_COMPLETE_DATE_LABEL
                        descriptionTranslation: COMPETENCE_SKILL_TYPE_FIELD_COMPLETE_DATE_DESCRIPTION
                        visibility: visible
                        value: null
                        options: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/competence/skill-types/{id}/status':
    patch:
      summary: Change status of Skill Type.
      tags:
        - Skills configuration - types
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - status
              properties:
                status:
                  type: string
                  enum:
                    - active
                    - draft
                    - archived
            example:
              status: active
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - total
                  - limit
                  - page
                  - pages
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - number
                        - name
                        - description
                        - privacy
                        - defaultSkillStatus
                        - status
                        - tags
                        - createdAt
                        - updatedAt
                      properties:
                        id:
                          type: string
                          format: uuid
                        number:
                          type: string
                        name:
                          type: string
                        description:
                          type: string
                          nullable: true
                        privacy:
                          type: string
                          enum:
                            - public
                            - myOrganization
                            - myManagers
                            - onlyMe
                        defaultSkillStatus:
                          type: string
                          enum:
                            - toBePlanned
                            - planned
                            - started
                            - toBeApproved
                            - approved
                            - expired
                        status:
                          type: string
                          enum:
                            - active
                            - draft
                            - archived
                        tags:
                          type: array
                          nullable: true
                          items:
                            type: string
                        categories:
                          type: array
                          items:
                            type: object
                            required:
                              - id
                              - name
                              - number
                              - color
                              - icon
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              number:
                                type: string
                              color:
                                type: string
                                nullable: true
                              icon:
                                type: object
                                nullable: true
                                required:
                                  - prefix
                                  - iconName
                                properties:
                                  prefix:
                                    type: string
                                    enum:
                                      - fas
                                      - fab
                                      - far
                                      - fal
                                      - fad
                                  iconName:
                                    type: string
                                    minLength: 1
                                    maxLength: 40
                        createdAt:
                          type: string
                        updatedAt:
                          type: string
                  total:
                    type: integer
                  limit:
                    type: integer
                  page:
                    type: integer
                  pages:
                    type: integer
              example:
                items:
                  - id: 975bcf52-e730-4ed1-89a1-7e0d8bde7e70
                    number: '123'
                    name: Industrial flower arrangement
                    description: Petal to the metal.
                    privacy: public
                    defaultSkillStatus: approved
                    status: active
                    tags:
                      - kawasaki
                      - honda
                    categories:
                      - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                        name: Cloud Developer
                        number: D0006
                        color: '#c44a30'
                        icon:
                          prefix: fas
                          iconName: book
                    createdAt: '2020-04-30T12:34:56+0000'
                    updatedAt: '2020-04-30T12:34:56+0000'
                total: 1
                limit: 10
                page: 1
                pages: 1
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /competence/skills:
    get:
      summary: Get list of competence skills.
      tags:
        - Skills
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - total
                  - limit
                  - page
                  - pages
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - createdAt
                        - updatedAt
                        - metaFields
                        - employment
                        - status
                        - privacy
                        - programTemplateVersionId
                        - lessonVersionId
                        - skillType
                        - fields
                      properties:
                        id:
                          type: string
                        createdAt:
                          type: string
                        updatedAt:
                          type: string
                        metaFields:
                          type: object
                          required:
                            - administrator
                            - fixedUrl
                            - hoursOfDuration
                            - tags
                          properties:
                            administrator:
                              type: string
                              nullable: true
                            fixedUrl:
                              type: string
                              nullable: true
                            hoursOfDuration:
                              type: integer
                              nullable: true
                            tags:
                              type: array
                              nullable: true
                              items:
                                type: string
                        employment:
                          type: object
                          nullable: true
                          required:
                            - id
                            - jobTitle
                          properties:
                            id:
                              type: integer
                            jobTitle:
                              type: string
                        status:
                          type: string
                          enum:
                            - toBePlanned
                            - planned
                            - started
                            - toBeApproved
                            - approved
                        privacy:
                          type: string
                          enum:
                            - public
                            - myOrganization
                            - myManagers
                            - onlyMe
                        programTemplateVersionId:
                          type: integer
                          nullable: true
                        lessonVersionId:
                          type: integer
                          nullable: true
                        skillType:
                          type: object
                          required:
                            - id
                            - number
                            - name
                            - description
                            - categories
                          properties:
                            id:
                              type: string
                            number:
                              type: string
                            name:
                              type: string
                            description:
                              type: string
                              nullable: true
                            privacy:
                              type: string
                            categories:
                              type: array
                              items:
                                type: object
                                required:
                                  - id
                                  - name
                                  - number
                                  - color
                                  - icon
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  number:
                                    type: string
                                  color:
                                    type: string
                                    nullable: true
                                  icon:
                                    type: object
                                    nullable: true
                                    required:
                                      - prefix
                                      - iconName
                                    properties:
                                      prefix:
                                        type: string
                                        enum:
                                          - fas
                                          - fab
                                          - far
                                          - fal
                                          - fad
                                      iconName:
                                        type: string
                                        minLength: 1
                                        maxLength: 40
                        fields:
                          type: object
                          required:
                            - skillTitle
                            - startedDate
                            - completedDate
                            - comment
                            - lengthOfExperience
                            - educationalLevel
                            - writtenLanguageSkillLevel
                            - oralLanguageSkillLevel
                            - documents
                            - customUrl
                            - internalExternal
                            - nameOfProvider
                            - countryOfProvider
                            - providerPlace
                            - targetScore
                            - currentScore
                            - expiryDate
                            - plannedCompletedDate
                            - userDefinedNotificationDate
                            - requirement
                            - criticality
                          properties:
                            skillTitle:
                              type: string
                              nullable: true
                            startedDate:
                              type: string
                              nullable: true
                            completedDate:
                              type: string
                              nullable: true
                            comment:
                              type: string
                              nullable: true
                            lengthOfExperience:
                              type: string
                              nullable: true
                            educationalLevel:
                              type: integer
                              nullable: true
                            writtenLanguageSkillLevel:
                              type: integer
                              nullable: true
                            oralLanguageSkillLevel:
                              type: integer
                              nullable: true
                            documents:
                              type: array
                              nullable: true
                              items:
                                type: object
                                required:
                                  - id
                                  - originalName
                                properties:
                                  id:
                                    type: string
                                  originalName:
                                    type: string
                            customUrl:
                              type: string
                              nullable: true
                            internalExternal:
                              type: integer
                              nullable: true
                            nameOfProvider:
                              type: string
                              nullable: true
                            countryOfProvider:
                              type: string
                              nullable: true
                            providerPlace:
                              type: string
                              nullable: true
                            targetScore:
                              type: integer
                              nullable: true
                            currentScore:
                              type: integer
                              nullable: true
                            expiryDate:
                              type: string
                              nullable: true
                            plannedCompletedDate:
                              type: string
                              nullable: true
                            userDefinedNotificationDate:
                              type: string
                              nullable: true
                            requirement:
                              type: integer
                              nullable: true
                  total:
                    type: integer
                  limit:
                    type: integer
                  page:
                    type: integer
                  pages:
                    type: integer
              example:
                items:
                  - id: 0d97966e-a1b3-11ea-9c25-022ed6ba66f8
                    createdAt: '2020-05-29T15:48:18+0000'
                    updatedAt: '2020-05-29T15:48:18+0000'
                    metaFields:
                      administrator: 'John Stine, Boss'
                      fixedUrl: 'http://www.google.com'
                      hoursOfDuration: null
                      tags:
                        - kawasaki
                        - honda
                    employment:
                      id: 2
                      jobTitle: Big BOSS
                    status: approved
                    privacy: public
                    programTemplateVersionId: null
                    lessonVersionId: 4
                    skillType:
                      id: fe8e0a40-968b-11ea-9c25-022ed6ba66f8
                      number: '234'
                      name: Industrial flower arrangement666
                      description: The best skill type
                      privacy: public
                      categories:
                        - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                          name: Cloud Developer
                          number: D0006
                          color: '#c44a30'
                          icon:
                            prefix: fas
                            iconName: book
                    fields:
                      skillTitle: PHP
                      startedDate: '2021-03-01T00:00:00+00:00'
                      completedDate: '2021-03-31T00:00:00+00:00'
                      comment: PHP for beginners.
                      lengthOfExperience: 1m
                      educationalLevel: 2
                      writtenLanguageSkillLevel: 1
                      oralLanguageSkillLevel: 2
                      documents:
                        - id: 5ccb543e-b98c-43b0-8cdf-829bb710b6d5
                          originalName: manual.pdf
                        - id: d32a45d6-40fb-4c7c-9964-65c5a4d25c71
                          originalName: documentation.pdf
                      customUrl: 'http://php.net'
                      internalExternal: 1
                      nameOfProvider: PHP University
                      countryOfProvider: pol
                      providerPlace: null
                      targetScore: 3
                      currentScore: 1
                      expiryDate: '2021-07-09T00:00:00+00:00'
                      plannedCompletedDate: '2021-03-31T00:00:00+00:00'
                      userDefinedNotificationDate: null
                      requirement: 1
                      criticality: 1
                total: 1
                limit: 10
                page: 1
                pages: 1
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create skill.
      tags:
        - Skills
      requestBody:
        content:
          application/json:
            schema:
              required:
                - userId
                - companyId
                - employmentId
                - parentId
                - fields
                - privacy
                - skillTypeId
                - status
              type: object
              properties:
                userId:
                  type: string
                companyId:
                  type: integer
                employeeId:
                  type: string
                  nullable: true
                organizationNumber:
                  type: string
                  nullable: true
                skillTypeId:
                  type: string
                parentId:
                  type: integer
                  description: Id of parent skill used in renewed process.
                  nullable: true
                employmentId:
                  type: integer
                  nullable: true
                status:
                  type: string
                  enum:
                    - toBePlanned
                    - planned
                    - started
                    - toBeApproved
                    - approved
                privacy:
                  type: string
                  enum:
                    - public
                    - myOrganization
                    - myManagers
                    - onlyMe
                fields:
                  type: array
                  items:
                    type: object
                    required:
                      - id
                      - data
                    properties:
                      id:
                        type: string
                        enum:
                          - skillTitle
                          - startedDate
                          - completedDate
                          - comment
                          - lengthOfExperience
                          - educationalLevel
                          - writtenLanguageSkillLevel
                          - oralLanguageSkillLevel
                          - documents
                          - customUrl
                          - internalExternal
                          - nameOfProvider
                          - countryOfProvider
                          - providerPlace
                          - targetScore
                          - currentScore
                          - expiryDate
                          - plannedCompletedDate
                          - userDefinedNotificationDate
                          - requirement
                          - criticality
                      data:
                        description: |
                          * Allowed values depending on `id` field:
                            * `lengthOfExperience`, available suffixes:
                              * `y` for year(s)
                              * `m` for month(s)
                              * `w` for week(s)
                              * `d` for day(s)
                              * `h` for hour(s)
                            * `educationalLevel`:
                              * `1` for Primary school
                              * `2` for High school
                              * `3` for Certificate of apprenticeship
                              * `4` for Technical College
                              * `5` for Higher apprenticeship
                              * `6` for Academic credit
                              * `7` for Year study University/College
                              * `8` for 2-year University/College
                              * `9` for 3-year University/College
                              * `10` for Bachelor's degree
                              * `11` for Master's degree
                              * `12` for Ph.D.
                            * `writtenLanguageSkillLevel` and `oralLanguageSkillLevel`:
                              * `1` for Elementary proficiency
                              * `2` for Limited working proficiency
                              * `3` for Professional working proficiency
                              * `4` for Full professional proficiency
                              * `5` for Native or bilingual proficiency
                            * `internalExternal`:
                              * `1` for Internal
                              * `2` for External
                            * `targetScore` and `currentScore`:
                              * `1` for Some knowledge
                              * `2` for Competent
                              * `3` for Highly competent
                              * `4` for Expert
                            * `requirement`:
                              * `1` for Legal requirement
                              * `2` for ISO-requirement
                              * `3` for Internal requirement
                              * `4` for Other
                              * `5` for Customer requirement
                            * `criticality`:
                              * `1` for Optional
                              * `2` for Required
                              * `3` for Recommended
                              * `4` for Critical
            example:
              skillTypeId: 95058825-a8e1-11eb-866b-0242ac130011
              userId: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
              companyId: 2
              employeeId: '333'
              organizationNumber: '982247500'
              parentId: null
              employmentId: 123
              status: approved
              privacy: public
              fields:
                - id: skillTitle
                  data: PHP
                - id: startedDate
                  data: '2021-03-01T00:00:00+00:00'
                - id: completedDate
                  data: '2021-03-31T00:00:00+00:00'
                - id: comment
                  data: PHP for beginners.
                - id: lengthOfExperience
                  data: 1m
                - id: educationalLevel
                  data: 2
                - id: writtenLanguageSkillLevel
                  data: 1
                - id: oralLanguageSkillLevel
                  data: 2
                - id: documents
                  data:
                    - id: 5ccb543e-b98c-43b0-8cdf-829bb710b6d5
                    - id: d32a45d6-40fb-4c7c-9964-65c5a4d25c71
                - id: customUrl
                  data: 'http://php.net'
                - id: internalExternal
                  data: 1
                - id: nameOfProvider
                  data: PHP University
                - id: countryOfProvider
                  data: pol
                - id: providerPlace
                  data: null
                - id: targetScore
                  data: 3
                - id: currentScore
                  data: 1
                - id: expiryDate
                  data: '2021-07-09T00:00:00+00:00'
                - id: plannedCompletedDate
                  data: '2021-03-31T00:00:00+00:00'
                - id: userDefinedNotificationDate
                  data: null
                - id: requirement
                  data: 1
                - id: criticality
                  data: 1
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - createdAt
                  - updatedAt
                  - employment
                  - status
                  - privacy
                  - programTemplateVersionId
                  - lessonVersionId
                  - skillType
                  - fields
                properties:
                  id:
                    type: string
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  metaFields:
                    type: object
                    required:
                      - administrator
                      - fixedUrl
                      - hoursOfDuration
                      - tags
                    properties:
                      administrator:
                        type: string
                        nullable: true
                      fixedUrl:
                        type: string
                        nullable: true
                      hoursOfDuration:
                        type: integer
                        nullable: true
                      tags:
                        type: array
                        nullable: true
                        items:
                          type: string
                  employment:
                    type: object
                    nullable: true
                    required:
                      - id
                      - jobTitle
                    properties:
                      id:
                        type: integer
                      jobTitle:
                        type: string
                  status:
                    type: string
                    enum:
                      - toBePlanned
                      - planned
                      - started
                      - toBeApproved
                      - approved
                  privacy:
                    type: string
                    enum:
                      - public
                      - myOrganization
                      - myManagers
                      - onlyMe
                  programTemplateVersionId:
                    type: integer
                    nullable: true
                  lessonVersionId:
                    type: integer
                    nullable: true
                  skillType:
                    type: object
                    required:
                      - id
                      - number
                      - name
                      - description
                      - categories
                    properties:
                      id:
                        type: string
                      number:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      privacy:
                        type: string
                      categories:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - name
                            - number
                            - color
                            - icon
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            number:
                              type: string
                            color:
                              type: string
                              nullable: true
                            icon:
                              type: object
                              nullable: true
                              required:
                                - prefix
                                - iconName
                              properties:
                                prefix:
                                  type: string
                                  enum:
                                    - fas
                                    - fab
                                    - far
                                    - fal
                                    - fad
                                iconName:
                                  type: string
                                  minLength: 1
                                  maxLength: 40
                  fields:
                    type: object
                    required:
                      - skillTitle
                      - startedDate
                      - completedDate
                      - comment
                      - lengthOfExperience
                      - educationalLevel
                      - writtenLanguageSkillLevel
                      - oralLanguageSkillLevel
                      - documents
                      - customUrl
                      - internalExternal
                      - nameOfProvider
                      - countryOfProvider
                      - providerPlace
                      - targetScore
                      - currentScore
                      - expiryDate
                      - plannedCompletedDate
                      - userDefinedNotificationDate
                      - requirement
                      - criticality
                    properties:
                      skillTitle:
                        type: string
                        nullable: true
                      startedDate:
                        type: string
                        nullable: true
                      completedDate:
                        type: string
                        nullable: true
                      comment:
                        type: string
                        nullable: true
                      lengthOfExperience:
                        type: string
                        nullable: true
                      educationalLevel:
                        type: integer
                        nullable: true
                      writtenLanguageSkillLevel:
                        type: integer
                        nullable: true
                      oralLanguageSkillLevel:
                        type: integer
                        nullable: true
                      documents:
                        type: array
                        nullable: true
                        items:
                          type: object
                          required:
                            - id
                            - originalName
                          properties:
                            id:
                              type: string
                            originalName:
                              type: string
                      customUrl:
                        type: string
                        nullable: true
                      internalExternal:
                        type: integer
                        nullable: true
                      nameOfProvider:
                        type: string
                        nullable: true
                      countryOfProvider:
                        type: string
                        nullable: true
                      providerPlace:
                        type: string
                        nullable: true
                      targetScore:
                        type: integer
                        nullable: true
                      currentScore:
                        type: integer
                        nullable: true
                      expiryDate:
                        type: string
                        nullable: true
                      plannedCompletedDate:
                        type: string
                        nullable: true
                      userDefinedNotificationDate:
                        type: string
                        nullable: true
                      requirement:
                        type: integer
                        nullable: true
              example:
                id: 0d97966e-a1b3-11ea-9c25-022ed6ba66f8
                createdAt: '2020-05-29T15:48:18+0000'
                updatedAt: '2020-05-29T15:48:18+0000'
                metaFields:
                  administrator: 'John Stine, Boss'
                  fixedUrl: 'http://www.google.com'
                  hoursOfDuration: null
                  tags:
                    - kawasaki
                    - honda
                employment:
                  id: 2
                  jobTitle: Big BOSS
                status: approved
                privacy: public
                programTemplateVersionId: null
                lessonVersionId: 4
                skillType:
                  id: fe8e0a40-968b-11ea-9c25-022ed6ba66f8
                  number: '234'
                  name: Industrial flower arrangement666
                  description: The best skill type
                  privacy: public
                  categories:
                    - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                      name: Cloud Developer
                      number: D0006
                      color: '#c44a30'
                      icon:
                        prefix: fas
                        iconName: book
                fields:
                  skillTitle: PHP
                  startedDate: '2021-03-01T00:00:00+00:00'
                  completedDate: '2021-03-31T00:00:00+00:00'
                  comment: PHP for beginners.
                  lengthOfExperience: 1m
                  educationalLevel: 2
                  writtenLanguageSkillLevel: 1
                  oralLanguageSkillLevel: 2
                  documents:
                    - id: 5ccb543e-b98c-43b0-8cdf-829bb710b6d5
                      originalName: manual.pdf
                    - id: d32a45d6-40fb-4c7c-9964-65c5a4d25c71
                      originalName: documentation.pdf
                  customUrl: 'http://php.net'
                  internalExternal: 1
                  nameOfProvider: PHP University
                  countryOfProvider: pol
                  providerPlace: null
                  targetScore: 3
                  currentScore: 1
                  expiryDate: '2021-07-09T00:00:00+00:00'
                  plannedCompletedDate: '2021-03-31T00:00:00+00:00'
                  userDefinedNotificationDate: null
                  requirement: 1
                  criticality: 1
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/competence/skills/{skillId}':
    get:
      summary: Get skill details.
      tags:
        - Skills
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - createdAt
                  - updatedAt
                  - employment
                  - status
                  - privacy
                  - programTemplateVersionId
                  - lessonVersionId
                  - skillType
                  - fields
                properties:
                  id:
                    type: string
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  metaFields:
                    type: object
                    required:
                      - administrator
                      - fixedUrl
                      - hoursOfDuration
                      - tags
                    properties:
                      administrator:
                        type: string
                        nullable: true
                      fixedUrl:
                        type: string
                        nullable: true
                      hoursOfDuration:
                        type: integer
                        nullable: true
                      tags:
                        type: array
                        nullable: true
                        items:
                          type: string
                  employment:
                    type: object
                    nullable: true
                    required:
                      - id
                      - jobTitle
                    properties:
                      id:
                        type: integer
                      jobTitle:
                        type: string
                  status:
                    type: string
                    enum:
                      - toBePlanned
                      - planned
                      - started
                      - toBeApproved
                      - approved
                  privacy:
                    type: string
                    enum:
                      - public
                      - myOrganization
                      - myManagers
                      - onlyMe
                  programTemplateVersionId:
                    type: integer
                    nullable: true
                  lessonVersionId:
                    type: integer
                    nullable: true
                  skillType:
                    type: object
                    required:
                      - id
                      - number
                      - name
                      - description
                      - categories
                    properties:
                      id:
                        type: string
                      number:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      privacy:
                        type: string
                      categories:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - name
                            - number
                            - color
                            - icon
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            number:
                              type: string
                            color:
                              type: string
                              nullable: true
                            icon:
                              type: object
                              nullable: true
                              required:
                                - prefix
                                - iconName
                              properties:
                                prefix:
                                  type: string
                                  enum:
                                    - fas
                                    - fab
                                    - far
                                    - fal
                                    - fad
                                iconName:
                                  type: string
                                  minLength: 1
                                  maxLength: 40
                  fields:
                    type: object
                    required:
                      - skillTitle
                      - startedDate
                      - completedDate
                      - comment
                      - lengthOfExperience
                      - educationalLevel
                      - writtenLanguageSkillLevel
                      - oralLanguageSkillLevel
                      - documents
                      - customUrl
                      - internalExternal
                      - nameOfProvider
                      - countryOfProvider
                      - providerPlace
                      - targetScore
                      - currentScore
                      - expiryDate
                      - plannedCompletedDate
                      - userDefinedNotificationDate
                      - requirement
                      - criticality
                    properties:
                      skillTitle:
                        type: string
                        nullable: true
                      startedDate:
                        type: string
                        nullable: true
                      completedDate:
                        type: string
                        nullable: true
                      comment:
                        type: string
                        nullable: true
                      lengthOfExperience:
                        type: string
                        nullable: true
                      educationalLevel:
                        type: integer
                        nullable: true
                      writtenLanguageSkillLevel:
                        type: integer
                        nullable: true
                      oralLanguageSkillLevel:
                        type: integer
                        nullable: true
                      documents:
                        type: array
                        nullable: true
                        items:
                          type: object
                          required:
                            - id
                            - originalName
                          properties:
                            id:
                              type: string
                            originalName:
                              type: string
                      customUrl:
                        type: string
                        nullable: true
                      internalExternal:
                        type: integer
                        nullable: true
                      nameOfProvider:
                        type: string
                        nullable: true
                      countryOfProvider:
                        type: string
                        nullable: true
                      providerPlace:
                        type: string
                        nullable: true
                      targetScore:
                        type: integer
                        nullable: true
                      currentScore:
                        type: integer
                        nullable: true
                      expiryDate:
                        type: string
                        nullable: true
                      plannedCompletedDate:
                        type: string
                        nullable: true
                      userDefinedNotificationDate:
                        type: string
                        nullable: true
                      requirement:
                        type: integer
                        nullable: true
              example:
                id: 0d97966e-a1b3-11ea-9c25-022ed6ba66f8
                createdAt: '2020-05-29T15:48:18+0000'
                updatedAt: '2020-05-29T15:48:18+0000'
                metaFields:
                  administrator: 'John Stine, Boss'
                  fixedUrl: 'http://www.google.com'
                  hoursOfDuration: null
                  tags:
                    - kawasaki
                    - honda
                employment:
                  id: 2
                  jobTitle: Big BOSS
                status: approved
                privacy: public
                programTemplateVersionId: null
                lessonVersionId: 4
                skillType:
                  id: fe8e0a40-968b-11ea-9c25-022ed6ba66f8
                  number: '234'
                  name: Industrial flower arrangement666
                  description: The best skill type
                  privacy: public
                  categories:
                    - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                      name: Cloud Developer
                      number: D0006
                      color: '#c44a30'
                      icon:
                        prefix: fas
                        iconName: book
                fields:
                  skillTitle: PHP
                  startedDate: '2021-03-01T00:00:00+00:00'
                  completedDate: '2021-03-31T00:00:00+00:00'
                  comment: PHP for beginners.
                  lengthOfExperience: 1m
                  educationalLevel: 2
                  writtenLanguageSkillLevel: 1
                  oralLanguageSkillLevel: 2
                  documents:
                    - id: 5ccb543e-b98c-43b0-8cdf-829bb710b6d5
                      originalName: manual.pdf
                    - id: d32a45d6-40fb-4c7c-9964-65c5a4d25c71
                      originalName: documentation.pdf
                  customUrl: 'http://php.net'
                  internalExternal: 1
                  nameOfProvider: PHP University
                  countryOfProvider: pol
                  providerPlace: null
                  targetScore: 3
                  currentScore: 1
                  expiryDate: '2021-07-09T00:00:00+00:00'
                  plannedCompletedDate: '2021-03-31T00:00:00+00:00'
                  userDefinedNotificationDate: null
                  requirement: 1
                  criticality: 1
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit skill details.
      tags:
        - Skills
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - employmentId
                - status
                - privacy
                - fields
              properties:
                employmentId:
                  type: integer
                  nullable: true
                status:
                  type: string
                  enum:
                    - toBePlanned
                    - planned
                    - started
                    - toBeApproved
                    - approved
                privacy:
                  type: string
                  enum:
                    - public
                    - myOrganization
                    - myManagers
                    - onlyMe
                fields:
                  type: array
                  description: >
                    * Fields set as visible in the skill type configuration must
                    be provided.

                    * Fields set as not visible in the skill type configuration
                    are not required, will be omitted and not updated.

                    * Fields set as mandatory in the skill type configuration
                    cannot be null.
                  items:
                    type: object
                    required:
                      - id
                      - data
                    properties:
                      id:
                        type: string
                        enum:
                          - skillTitle
                          - startedDate
                          - completedDate
                          - comment
                          - lengthOfExperience
                          - educationalLevel
                          - writtenLanguageSkillLevel
                          - oralLanguageSkillLevel
                          - documents
                          - customUrl
                          - internalExternal
                          - nameOfProvider
                          - countryOfProvider
                          - providerPlace
                          - targetScore
                          - currentScore
                          - expiryDate
                          - plannedCompletedDate
                          - userDefinedNotificationDate
                          - requirement
                          - criticality
                      data:
                        description: |
                          * Allowed values depending on `id` field:
                            * `lengthOfExperience`, available suffixes:
                              * `y` for year(s)
                              * `m` for month(s)
                              * `w` for week(s)
                              * `d` for day(s)
                              * `h` for hour(s)
                            * `educationalLevel`:
                              * `1` for Primary school
                              * `2` for High school
                              * `3` for Certificate of apprenticeship
                              * `4` for Technical College
                              * `5` for Higher apprenticeship
                              * `6` for Academic credit
                              * `7` for Year study University/College
                              * `8` for 2-year University/College
                              * `9` for 3-year University/College
                              * `10` for Bachelor's degree
                              * `11` for Master's degree
                              * `12` for Ph.D.
                            * `writtenLanguageSkillLevel` and `oralLanguageSkillLevel`:
                              * `1` for Elementary proficiency
                              * `2` for Limited working proficiency
                              * `3` for Professional working proficiency
                              * `4` for Full professional proficiency
                              * `5` for Native or bilingual proficiency
                            * `internalExternal`:
                              * `1` for Internal
                              * `2` for External
                            * `targetScore` and `currentScore`:
                              * `1` for Some knowledge
                              * `2` for Competent
                              * `3` for Highly competent
                              * `4` for Expert
                            * `requirement`:
                              * `1` for Legal requirement
                              * `2` for ISO-requirement
                              * `3` for Internal requirement
                              * `4` for Other
                              * `5` for Customer requirement
                            * `criticality`:
                              * `1` for Optional
                              * `2` for Required
                              * `3` for Recommended
                              * `4` for Critical
            example:
              employmentId: 123
              status: approved
              privacy: public
              fields:
                - id: skillTitle
                  data: PHP
                - id: startedDate
                  data: '2021-03-01T00:00:00+00:00'
                - id: completedDate
                  data: '2021-03-31T00:00:00+00:00'
                - id: comment
                  data: PHP for beginners.
                - id: lengthOfExperience
                  data: 1m
                - id: educationalLevel
                  data: 2
                - id: writtenLanguageSkillLevel
                  data: 1
                - id: oralLanguageSkillLevel
                  data: 2
                - id: documents
                  data:
                    - id: 5ccb543e-b98c-43b0-8cdf-829bb710b6d5
                    - id: d32a45d6-40fb-4c7c-9964-65c5a4d25c71
                - id: customUrl
                  data: 'http://php.net'
                - id: internalExternal
                  data: 1
                - id: nameOfProvider
                  data: PHP University
                - id: countryOfProvider
                  data: pol
                - id: providerPlace
                  data: null
                - id: targetScore
                  data: 3
                - id: currentScore
                  data: 1
                - id: expiryDate
                  data: '2021-07-09T00:00:00+00:00'
                - id: plannedCompletedDate
                  data: '2021-03-31T00:00:00+00:00'
                - id: userDefinedNotificationDate
                  data: null
                - id: requirement
                  data: 1
                - id: criticality
                  data: 1
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - createdAt
                  - updatedAt
                  - employment
                  - status
                  - privacy
                  - programTemplateVersionId
                  - lessonVersionId
                  - skillType
                  - fields
                properties:
                  id:
                    type: string
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  metaFields:
                    type: object
                    required:
                      - administrator
                      - fixedUrl
                      - hoursOfDuration
                      - tags
                    properties:
                      administrator:
                        type: string
                        nullable: true
                      fixedUrl:
                        type: string
                        nullable: true
                      hoursOfDuration:
                        type: integer
                        nullable: true
                      tags:
                        type: array
                        nullable: true
                        items:
                          type: string
                  employment:
                    type: object
                    nullable: true
                    required:
                      - id
                      - jobTitle
                    properties:
                      id:
                        type: integer
                      jobTitle:
                        type: string
                  status:
                    type: string
                    enum:
                      - toBePlanned
                      - planned
                      - started
                      - toBeApproved
                      - approved
                  privacy:
                    type: string
                    enum:
                      - public
                      - myOrganization
                      - myManagers
                      - onlyMe
                  programTemplateVersionId:
                    type: integer
                    nullable: true
                  lessonVersionId:
                    type: integer
                    nullable: true
                  skillType:
                    type: object
                    required:
                      - id
                      - number
                      - name
                      - description
                      - categories
                    properties:
                      id:
                        type: string
                      number:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      privacy:
                        type: string
                      categories:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - name
                            - number
                            - color
                            - icon
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            number:
                              type: string
                            color:
                              type: string
                              nullable: true
                            icon:
                              type: object
                              nullable: true
                              required:
                                - prefix
                                - iconName
                              properties:
                                prefix:
                                  type: string
                                  enum:
                                    - fas
                                    - fab
                                    - far
                                    - fal
                                    - fad
                                iconName:
                                  type: string
                                  minLength: 1
                                  maxLength: 40
                  fields:
                    type: object
                    required:
                      - skillTitle
                      - startedDate
                      - completedDate
                      - comment
                      - lengthOfExperience
                      - educationalLevel
                      - writtenLanguageSkillLevel
                      - oralLanguageSkillLevel
                      - documents
                      - customUrl
                      - internalExternal
                      - nameOfProvider
                      - countryOfProvider
                      - providerPlace
                      - targetScore
                      - currentScore
                      - expiryDate
                      - plannedCompletedDate
                      - userDefinedNotificationDate
                      - requirement
                      - criticality
                    properties:
                      skillTitle:
                        type: string
                        nullable: true
                      startedDate:
                        type: string
                        nullable: true
                      completedDate:
                        type: string
                        nullable: true
                      comment:
                        type: string
                        nullable: true
                      lengthOfExperience:
                        type: string
                        nullable: true
                      educationalLevel:
                        type: integer
                        nullable: true
                      writtenLanguageSkillLevel:
                        type: integer
                        nullable: true
                      oralLanguageSkillLevel:
                        type: integer
                        nullable: true
                      documents:
                        type: array
                        nullable: true
                        items:
                          type: object
                          required:
                            - id
                            - originalName
                          properties:
                            id:
                              type: string
                            originalName:
                              type: string
                      customUrl:
                        type: string
                        nullable: true
                      internalExternal:
                        type: integer
                        nullable: true
                      nameOfProvider:
                        type: string
                        nullable: true
                      countryOfProvider:
                        type: string
                        nullable: true
                      providerPlace:
                        type: string
                        nullable: true
                      targetScore:
                        type: integer
                        nullable: true
                      currentScore:
                        type: integer
                        nullable: true
                      expiryDate:
                        type: string
                        nullable: true
                      plannedCompletedDate:
                        type: string
                        nullable: true
                      userDefinedNotificationDate:
                        type: string
                        nullable: true
                      requirement:
                        type: integer
                        nullable: true
              example:
                id: 0d97966e-a1b3-11ea-9c25-022ed6ba66f8
                createdAt: '2020-05-29T15:48:18+0000'
                updatedAt: '2020-05-29T15:48:18+0000'
                metaFields:
                  administrator: 'John Stine, Boss'
                  fixedUrl: 'http://www.google.com'
                  hoursOfDuration: null
                  tags:
                    - kawasaki
                    - honda
                employment:
                  id: 2
                  jobTitle: Big BOSS
                status: approved
                privacy: public
                programTemplateVersionId: null
                lessonVersionId: 4
                skillType:
                  id: fe8e0a40-968b-11ea-9c25-022ed6ba66f8
                  number: '234'
                  name: Industrial flower arrangement666
                  description: The best skill type
                  privacy: public
                  categories:
                    - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                      name: Cloud Developer
                      number: D0006
                      color: '#c44a30'
                      icon:
                        prefix: fas
                        iconName: book
                fields:
                  skillTitle: PHP
                  startedDate: '2021-03-01T00:00:00+00:00'
                  completedDate: '2021-03-31T00:00:00+00:00'
                  comment: PHP for beginners.
                  lengthOfExperience: 1m
                  educationalLevel: 2
                  writtenLanguageSkillLevel: 1
                  oralLanguageSkillLevel: 2
                  documents:
                    - id: 5ccb543e-b98c-43b0-8cdf-829bb710b6d5
                      originalName: manual.pdf
                    - id: d32a45d6-40fb-4c7c-9964-65c5a4d25c71
                      originalName: documentation.pdf
                  customUrl: 'http://php.net'
                  internalExternal: 1
                  nameOfProvider: PHP University
                  countryOfProvider: pol
                  providerPlace: null
                  targetScore: 3
                  currentScore: 1
                  expiryDate: '2021-07-09T00:00:00+00:00'
                  plannedCompletedDate: '2021-03-31T00:00:00+00:00'
                  userDefinedNotificationDate: null
                  requirement: 1
                  criticality: 1
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit field in skill details.
      tags:
        - Skills
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                employmentId:
                  type: integer
                  nullable: true
                status:
                  type: string
                  enum:
                    - toBePlanned
                    - planned
                    - started
                    - toBeApproved
                    - approved
                privacy:
                  type: string
                  enum:
                    - public
                    - myOrganization
                    - myManagers
                    - onlyMe
                fields:
                  type: array
                  description: >
                    * Fields set as not visible in the skill type configuration
                    will be omitted and not updated.
                  items:
                    type: object
                    required:
                      - id
                      - data
                    properties:
                      id:
                        type: string
                        enum:
                          - skillTitle
                          - startedDate
                          - completedDate
                          - comment
                          - lengthOfExperience
                          - educationalLevel
                          - writtenLanguageSkillLevel
                          - oralLanguageSkillLevel
                          - documents
                          - customUrl
                          - internalExternal
                          - nameOfProvider
                          - countryOfProvider
                          - providerPlace
                          - targetScore
                          - currentScore
                          - expiryDate
                          - plannedCompletedDate
                          - userDefinedNotificationDate
                          - requirement
                          - criticality
                      data:
                        description: |
                          * Allowed values depending on `id` field:
                            * `lengthOfExperience`, available suffixes:
                              * `y` for year(s)
                              * `m` for month(s)
                              * `w` for week(s)
                              * `d` for day(s)
                              * `h` for hour(s)
                            * `educationalLevel`:
                              * `1` for Primary school
                              * `2` for High school
                              * `3` for Certificate of apprenticeship
                              * `4` for Technical College
                              * `5` for Higher apprenticeship
                              * `6` for Academic credit
                              * `7` for Year study University/College
                              * `8` for 2-year University/College
                              * `9` for 3-year University/College
                              * `10` for Bachelor's degree
                              * `11` for Master's degree
                              * `12` for Ph.D.
                            * `writtenLanguageSkillLevel` and `oralLanguageSkillLevel`:
                              * `1` for Elementary proficiency
                              * `2` for Limited working proficiency
                              * `3` for Professional working proficiency
                              * `4` for Full professional proficiency
                              * `5` for Native or bilingual proficiency
                            * `internalExternal`:
                              * `1` for Internal
                              * `2` for External
                            * `targetScore` and `currentScore`:
                              * `1` for Some knowledge
                              * `2` for Competent
                              * `3` for Highly competent
                              * `4` for Expert
                            * `requirement`:
                              * `1` for Legal requirement
                              * `2` for ISO-requirement
                              * `3` for Internal requirement
                              * `4` for Other
                              * `5` for Customer requirement
                            * `criticality`:
                              * `1` for Optional
                              * `2` for Required
                              * `3` for Recommended
                              * `4` for Critical
              additionalProperties: false
            example:
              employmentId: 123
              status: approved
              privacy: public
              fields:
                - id: skillTitle
                  data: PHP
                - id: startedDate
                  data: '2021-03-01T00:00:00+00:00'
                - id: completedDate
                  data: '2021-03-31T00:00:00+00:00'
                - id: comment
                  data: PHP for beginners.
                - id: lengthOfExperience
                  data: 1m
                - id: educationalLevel
                  data: 2
                - id: writtenLanguageSkillLevel
                  data: 1
                - id: oralLanguageSkillLevel
                  data: 2
                - id: documents
                  data:
                    - id: 5ccb543e-b98c-43b0-8cdf-829bb710b6d5
                    - id: d32a45d6-40fb-4c7c-9964-65c5a4d25c71
                - id: customUrl
                  data: 'http://php.net'
                - id: internalExternal
                  data: 1
                - id: nameOfProvider
                  data: PHP University
                - id: countryOfProvider
                  data: pol
                - id: providerPlace
                  data: null
                - id: targetScore
                  data: 3
                - id: currentScore
                  data: 1
                - id: expiryDate
                  data: '2021-07-09T00:00:00+00:00'
                - id: plannedCompletedDate
                  data: '2021-03-31T00:00:00+00:00'
                - id: userDefinedNotificationDate
                  data: null
                - id: requirement
                  data: 1
                - id: criticality
                  data: 1
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - createdAt
                  - updatedAt
                  - employment
                  - status
                  - privacy
                  - programTemplateVersionId
                  - lessonVersionId
                  - skillType
                  - fields
                properties:
                  id:
                    type: string
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  metaFields:
                    type: object
                    required:
                      - administrator
                      - fixedUrl
                      - hoursOfDuration
                      - tags
                    properties:
                      administrator:
                        type: string
                        nullable: true
                      fixedUrl:
                        type: string
                        nullable: true
                      hoursOfDuration:
                        type: integer
                        nullable: true
                      tags:
                        type: array
                        nullable: true
                        items:
                          type: string
                  employment:
                    type: object
                    nullable: true
                    required:
                      - id
                      - jobTitle
                    properties:
                      id:
                        type: integer
                      jobTitle:
                        type: string
                  status:
                    type: string
                    enum:
                      - toBePlanned
                      - planned
                      - started
                      - toBeApproved
                      - approved
                  privacy:
                    type: string
                    enum:
                      - public
                      - myOrganization
                      - myManagers
                      - onlyMe
                  programTemplateVersionId:
                    type: integer
                    nullable: true
                  lessonVersionId:
                    type: integer
                    nullable: true
                  skillType:
                    type: object
                    required:
                      - id
                      - number
                      - name
                      - description
                      - categories
                    properties:
                      id:
                        type: string
                      number:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      privacy:
                        type: string
                      categories:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - name
                            - number
                            - color
                            - icon
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            number:
                              type: string
                            color:
                              type: string
                              nullable: true
                            icon:
                              type: object
                              nullable: true
                              required:
                                - prefix
                                - iconName
                              properties:
                                prefix:
                                  type: string
                                  enum:
                                    - fas
                                    - fab
                                    - far
                                    - fal
                                    - fad
                                iconName:
                                  type: string
                                  minLength: 1
                                  maxLength: 40
                  fields:
                    type: object
                    required:
                      - skillTitle
                      - startedDate
                      - completedDate
                      - comment
                      - lengthOfExperience
                      - educationalLevel
                      - writtenLanguageSkillLevel
                      - oralLanguageSkillLevel
                      - documents
                      - customUrl
                      - internalExternal
                      - nameOfProvider
                      - countryOfProvider
                      - providerPlace
                      - targetScore
                      - currentScore
                      - expiryDate
                      - plannedCompletedDate
                      - userDefinedNotificationDate
                      - requirement
                      - criticality
                    properties:
                      skillTitle:
                        type: string
                        nullable: true
                      startedDate:
                        type: string
                        nullable: true
                      completedDate:
                        type: string
                        nullable: true
                      comment:
                        type: string
                        nullable: true
                      lengthOfExperience:
                        type: string
                        nullable: true
                      educationalLevel:
                        type: integer
                        nullable: true
                      writtenLanguageSkillLevel:
                        type: integer
                        nullable: true
                      oralLanguageSkillLevel:
                        type: integer
                        nullable: true
                      documents:
                        type: array
                        nullable: true
                        items:
                          type: object
                          required:
                            - id
                            - originalName
                          properties:
                            id:
                              type: string
                            originalName:
                              type: string
                      customUrl:
                        type: string
                        nullable: true
                      internalExternal:
                        type: integer
                        nullable: true
                      nameOfProvider:
                        type: string
                        nullable: true
                      countryOfProvider:
                        type: string
                        nullable: true
                      providerPlace:
                        type: string
                        nullable: true
                      targetScore:
                        type: integer
                        nullable: true
                      currentScore:
                        type: integer
                        nullable: true
                      expiryDate:
                        type: string
                        nullable: true
                      plannedCompletedDate:
                        type: string
                        nullable: true
                      userDefinedNotificationDate:
                        type: string
                        nullable: true
                      requirement:
                        type: integer
                        nullable: true
              example:
                id: 0d97966e-a1b3-11ea-9c25-022ed6ba66f8
                createdAt: '2020-05-29T15:48:18+0000'
                updatedAt: '2020-05-29T15:48:18+0000'
                metaFields:
                  administrator: 'John Stine, Boss'
                  fixedUrl: 'http://www.google.com'
                  hoursOfDuration: null
                  tags:
                    - kawasaki
                    - honda
                employment:
                  id: 2
                  jobTitle: Big BOSS
                status: approved
                privacy: public
                programTemplateVersionId: null
                lessonVersionId: 4
                skillType:
                  id: fe8e0a40-968b-11ea-9c25-022ed6ba66f8
                  number: '234'
                  name: Industrial flower arrangement666
                  description: The best skill type
                  privacy: public
                  categories:
                    - id: a5751d2d-edba-11ea-bd25-0242ac15001f
                      name: Cloud Developer
                      number: D0006
                      color: '#c44a30'
                      icon:
                        prefix: fas
                        iconName: book
                fields:
                  skillTitle: PHP
                  startedDate: '2021-03-01T00:00:00+00:00'
                  completedDate: '2021-03-31T00:00:00+00:00'
                  comment: PHP for beginners.
                  lengthOfExperience: 1m
                  educationalLevel: 2
                  writtenLanguageSkillLevel: 1
                  oralLanguageSkillLevel: 2
                  documents:
                    - id: 5ccb543e-b98c-43b0-8cdf-829bb710b6d5
                      originalName: manual.pdf
                    - id: d32a45d6-40fb-4c7c-9964-65c5a4d25c71
                      originalName: documentation.pdf
                  customUrl: 'http://php.net'
                  internalExternal: 1
                  nameOfProvider: PHP University
                  countryOfProvider: pol
                  providerPlace: null
                  targetScore: 3
                  currentScore: 1
                  expiryDate: '2021-07-09T00:00:00+00:00'
                  plannedCompletedDate: '2021-03-31T00:00:00+00:00'
                  userDefinedNotificationDate: null
                  requirement: 1
                  criticality: 1
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/profiles/{userId}':
    get:
      summary: Get user profile data.
      tags:
        - User profile
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  instanceEmployeeId:
                    type: string
                    nullable: true
                  firstName:
                    type: string
                  surname:
                    type: string
                  dateOfBirth:
                    type: string
                  gender:
                    type: string
                    nullable: true
                  nationality:
                    type: string
                    nullable: true
                  addressLine1:
                    type: string
                  addressLine2:
                    type: string
                  zipCode:
                    type: string
                  city:
                    type: string
                  country:
                    type: string
                    nullable: true
                  emailPrivate:
                    type: string
                  phoneNumberPrivate:
                    type: string
                  alias:
                    type: string
                    nullable: true
                  maritalStatus:
                    type: string
                    nullable: true
                  userPhoto:
                    type: string
                    nullable: true
                  personalIdentification:
                    type: object
                    properties:
                      idType:
                        type: string
                        enum:
                          - ssn
                          - alternative_id
                          - none
                      idNumber:
                        type: string
                      idCountry:
                        type: string
                      passportCountry:
                        type: string
                      passportNumber:
                        type: string
                  paymentDetails:
                    type: object
                    properties:
                      countryOfBank:
                        type: string
                      accountNumber:
                        type: string
                  nextOfKin:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - firstname
                        - surname
                        - comment
                        - relationshipType
                        - address
                      properties:
                        id:
                          type: string
                          format: uuid
                        firstname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        surname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        comment:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 255
                        relationshipType:
                          type: string
                          enum:
                            - notDefined
                            - children
                            - parent
                            - partner
                            - family
                            - friend
                            - other
                            - cohabitant
                            - mother
                            - father
                            - married
                        address:
                          type: object
                          nullable: true
                          required:
                            - email
                            - phone
                            - country
                            - city
                            - addressLine1
                            - addressLine2
                            - zipCode
                          properties:
                            email:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 255
                              format: email
                            phone:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 30
                            country:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            city:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            addressLine1:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            addressLine2:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            zipCode:
                              type: string
                              nullable: true
                              pattern: (^$|\S)
                              minLength: 1
                              maxLength: 40
                  children:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - firstname
                        - surname
                        - chronicallySick
                        - birthDate
                        - singleParent
                        - phoneNumber
                      properties:
                        id:
                          type: string
                          format: uuid
                        firstname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        surname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        chronicallySick:
                          type: object
                          properties:
                            from:
                              type: string
                              nullable: true
                            to:
                              type: string
                              nullable: true
                        birthDate:
                          type: string
                        singleParent:
                          type: boolean
                        phoneNumber:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 30
                  connectedEmployeeData:
                    type: array
                    items:
                      type: object
                      properties:
                        employeeId:
                          type: string
                        organizationNumber:
                          type: string
                  integrations:
                    type: object
                    properties:
                      v4:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                  loginMethod:
                    type: object
                    properties:
                      loginMethod:
                        type: string
                        enum:
                          - NO_USER
                          - AUTH0
                          - ACTIVE_DIRECTORY
                      activeDirectoryLogin:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                  userCalculatedStatus:
                    type: object
                    properties:
                      status:
                        type: string
                      remainingDays:
                        type: integer
                        nullable: true
              example:
                id: a345b774-388e-4c0b-8b2c-906d84cf3ac6
                instanceEmployeeId: '1'
                firstName: John
                surname: Doe
                dateOfBirth: '1990-01-01T00:00:00+0100'
                gender: M
                nationality: Norwegian
                addressLine1: Sverres Gate 73
                addressLine2: ''
                zipCode: '0652'
                city: Oslo
                country: Norway
                emailPrivate: example@email.com
                phoneNumberPrivate: '123456789'
                alias: ''
                maritalStatus: null
                userPhoto: >-
                  https://s.gravatar.com/avatar/123131313/12/312/31/23/12/312/3.png
                personalIdentification:
                  idType: ssn
                  idNumber: '19117578967'
                  idCountry: NOR
                  passportCountry: NOR
                  passportNumber: '987654321'
                paymentDetails:
                  countryOfBank: NOR
                  accountNumber: 8601.11.17947
                nextOfKin:
                  - id: da1af222-c2ff-41c1-bd02-2c16b80a890f
                    firstname: John
                    surname: Doe
                    comment: comment
                    relationshipType: partner
                    address:
                      email: example@email.com
                      phone: +48 888 999 888
                      country: PL
                      city: Warsaw
                      addressLine1: ul. Dzielna 7B
                      addressLine2: null
                      zipCode: 00-154
                children:
                  - id: 67d42500-4f8a-4c35-8139-056873ca2876
                    firstname: Anne
                    surname: Doe
                    chronicallySick:
                      from: '2010-01-16T00:00:00+0000'
                      to: '2020-01-16T00:00:00+0000'
                    birthDate: '1980-01-01T00:00:00+00:00'
                    singleParent: false
                    phoneNumber: '800800801'
                connectedEmployeeData:
                  - employeeId: '9'
                    organizationNumber: '1337'
                integrations:
                  v4:
                    enabled: false
                loginMethod:
                  loginMethod: ACTIVE_DIRECTORY
                  activeDirectoryLogin: jdoe
                  email: jdoe@company.com
                userCalculatedStatus:
                  status: active
                  remainingDays: null
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/next-of-kin/user/{userId}':
    get:
      summary: Get list of next of kin by user.
      tags:
        - User profile
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                    - id
                    - firstname
                    - surname
                    - comment
                    - relationshipType
                    - address
                  properties:
                    id:
                      type: string
                      format: uuid
                    firstname:
                      type: string
                      minLength: 1
                      maxLength: 50
                    surname:
                      type: string
                      minLength: 1
                      maxLength: 50
                    comment:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                    relationshipType:
                      type: string
                      enum:
                        - notDefined
                        - children
                        - parent
                        - partner
                        - family
                        - friend
                        - other
                        - cohabitant
                        - mother
                        - father
                        - married
                    address:
                      type: object
                      nullable: true
                      required:
                        - email
                        - phone
                        - country
                        - city
                        - addressLine1
                        - addressLine2
                        - zipCode
                      properties:
                        email:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 255
                          format: email
                        phone:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 30
                        country:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 40
                          pattern: (^$|\S)
                        city:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 40
                          pattern: (^$|\S)
                        addressLine1:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 40
                          pattern: (^$|\S)
                        addressLine2:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 40
                          pattern: (^$|\S)
                        zipCode:
                          type: string
                          nullable: true
                          pattern: (^$|\S)
                          minLength: 1
                          maxLength: 40
              example:
                - id: da1af222-c2ff-41c1-bd02-2c16b80a890f
                  firstname: John
                  surname: Doe
                  comment: comment
                  relationshipType: partner
                  address:
                    email: example@email.com
                    phone: +48 888 999 888
                    country: PL
                    city: Warsaw
                    addressLine1: ul. Dzielna 7B
                    addressLine2: null
                    zipCode: 00-154
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create next of kin for user.
      tags:
        - User profile
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - firstname
                - surname
                - comment
                - relationshipType
                - address
              properties:
                firstname:
                  type: string
                  minLength: 1
                  maxLength: 50
                surname:
                  type: string
                  minLength: 1
                  maxLength: 50
                comment:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                relationshipType:
                  type: string
                  enum:
                    - notDefined
                    - children
                    - parent
                    - partner
                    - family
                    - friend
                    - other
                    - cohabitant
                    - mother
                    - father
                    - married
                address:
                  type: object
                  required:
                    - email
                    - phone
                    - country
                    - city
                    - addressLine1
                    - addressLine2
                    - zipCode
                  properties:
                    email:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      format: email
                    phone:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 30
                    country:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    city:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    addressLine1:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    addressLine2:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    zipCode:
                      type: string
                      nullable: true
                      pattern: (^$|\S)
                      minLength: 1
                      maxLength: 40
              additionalProperties: false
            example:
              firstname: John
              surname: Doe
              comment: comment
              relationshipType: partner
              address:
                email: example@email.com
                phone: +48 888 999 888
                country: PL
                city: Warsaw
                addressLine1: ul. Dzielna 7B
                addressLine2: null
                zipCode: 00-154
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - firstname
                  - surname
                  - comment
                  - relationshipType
                  - address
                properties:
                  id:
                    type: string
                    format: uuid
                  firstname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  surname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  comment:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                  relationshipType:
                    type: string
                    enum:
                      - notDefined
                      - children
                      - parent
                      - partner
                      - family
                      - friend
                      - other
                      - cohabitant
                      - mother
                      - father
                      - married
                  address:
                    type: object
                    nullable: true
                    required:
                      - email
                      - phone
                      - country
                      - city
                      - addressLine1
                      - addressLine2
                      - zipCode
                    properties:
                      email:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 255
                        format: email
                      phone:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 30
                      country:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      city:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      addressLine1:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      addressLine2:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      zipCode:
                        type: string
                        nullable: true
                        pattern: (^$|\S)
                        minLength: 1
                        maxLength: 40
              example:
                id: da1af222-c2ff-41c1-bd02-2c16b80a890f
                firstname: John
                surname: Doe
                comment: comment
                relationshipType: partner
                address:
                  email: example@email.com
                  phone: +48 888 999 888
                  country: PL
                  city: Warsaw
                  addressLine1: ul. Dzielna 7B
                  addressLine2: null
                  zipCode: 00-154
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/next-of-kin/{nextOfKinId}':
    put:
      summary: Edit next of kin.
      tags:
        - User profile
      parameters:
        - name: nextOfKinId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - firstname
                - surname
                - comment
                - relationshipType
                - address
              properties:
                firstname:
                  type: string
                  minLength: 1
                  maxLength: 50
                surname:
                  type: string
                  minLength: 1
                  maxLength: 50
                comment:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                relationshipType:
                  type: string
                  enum:
                    - notDefined
                    - children
                    - parent
                    - partner
                    - family
                    - friend
                    - other
                    - cohabitant
                    - mother
                    - father
                    - married
                address:
                  type: object
                  required:
                    - email
                    - phone
                    - country
                    - city
                    - addressLine1
                    - addressLine2
                    - zipCode
                  properties:
                    email:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      format: email
                    phone:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 30
                    country:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    city:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    addressLine1:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    addressLine2:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    zipCode:
                      type: string
                      nullable: true
                      pattern: (^$|\S)
                      minLength: 1
                      maxLength: 40
              additionalProperties: false
            example:
              firstname: John
              surname: Doe
              comment: comment
              relationshipType: partner
              address:
                email: example@email.com
                phone: +48 888 999 888
                country: PL
                city: Warsaw
                addressLine1: ul. Dzielna 7B
                addressLine2: null
                zipCode: 00-154
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - firstname
                  - surname
                  - comment
                  - relationshipType
                  - address
                properties:
                  id:
                    type: string
                    format: uuid
                  firstname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  surname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  comment:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                  relationshipType:
                    type: string
                    enum:
                      - notDefined
                      - children
                      - parent
                      - partner
                      - family
                      - friend
                      - other
                      - cohabitant
                      - mother
                      - father
                      - married
                  address:
                    type: object
                    nullable: true
                    required:
                      - email
                      - phone
                      - country
                      - city
                      - addressLine1
                      - addressLine2
                      - zipCode
                    properties:
                      email:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 255
                        format: email
                      phone:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 30
                      country:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      city:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      addressLine1:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      addressLine2:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      zipCode:
                        type: string
                        nullable: true
                        pattern: (^$|\S)
                        minLength: 1
                        maxLength: 40
              example:
                id: da1af222-c2ff-41c1-bd02-2c16b80a890f
                firstname: John
                surname: Doe
                comment: comment
                relationshipType: partner
                address:
                  email: example@email.com
                  phone: +48 888 999 888
                  country: PL
                  city: Warsaw
                  addressLine1: ul. Dzielna 7B
                  addressLine2: null
                  zipCode: 00-154
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of next of kin.
      tags:
        - User profile
      parameters:
        - name: nextOfKinId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                firstname:
                  type: string
                  minLength: 1
                  maxLength: 50
                surname:
                  type: string
                  minLength: 1
                  maxLength: 50
                comment:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                relationshipType:
                  type: string
                  enum:
                    - notDefined
                    - children
                    - parent
                    - partner
                    - family
                    - friend
                    - other
                    - cohabitant
                    - mother
                    - father
                    - married
                address:
                  type: object
                  properties:
                    email:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 255
                      format: email
                    phone:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 30
                    country:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    city:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    addressLine1:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    addressLine2:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 40
                      pattern: (^$|\S)
                    zipCode:
                      type: string
                      nullable: true
                      pattern: (^$|\S)
                      minLength: 1
                      maxLength: 40
              additionalProperties: false
            example:
              firstname: John
              surname: Doe
              comment: comment
              relationshipType: partner
              address:
                email: example@email.com
                phone: +48 888 999 888
                country: PL
                city: Warsaw
                addressLine1: ul. Dzielna 7B
                addressLine2: null
                zipCode: 00-154
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - firstname
                  - surname
                  - comment
                  - relationshipType
                  - address
                properties:
                  id:
                    type: string
                    format: uuid
                  firstname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  surname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  comment:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                  relationshipType:
                    type: string
                    enum:
                      - notDefined
                      - children
                      - parent
                      - partner
                      - family
                      - friend
                      - other
                      - cohabitant
                      - mother
                      - father
                      - married
                  address:
                    type: object
                    nullable: true
                    required:
                      - email
                      - phone
                      - country
                      - city
                      - addressLine1
                      - addressLine2
                      - zipCode
                    properties:
                      email:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 255
                        format: email
                      phone:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 30
                      country:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      city:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      addressLine1:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      addressLine2:
                        type: string
                        nullable: true
                        minLength: 1
                        maxLength: 40
                        pattern: (^$|\S)
                      zipCode:
                        type: string
                        nullable: true
                        pattern: (^$|\S)
                        minLength: 1
                        maxLength: 40
              example:
                id: da1af222-c2ff-41c1-bd02-2c16b80a890f
                firstname: John
                surname: Doe
                comment: comment
                relationshipType: partner
                address:
                  email: example@email.com
                  phone: +48 888 999 888
                  country: PL
                  city: Warsaw
                  addressLine1: ul. Dzielna 7B
                  addressLine2: null
                  zipCode: 00-154
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/children/user/{userId}':
    get:
      summary: Get list of children by user.
      tags:
        - User profile
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                    - id
                    - firstname
                    - surname
                    - chronicallySick
                    - birthDate
                    - singleParent
                    - phoneNumber
                  properties:
                    id:
                      type: string
                      format: uuid
                    firstname:
                      type: string
                      minLength: 1
                      maxLength: 50
                    surname:
                      type: string
                      minLength: 1
                      maxLength: 50
                    chronicallySick:
                      type: object
                      required:
                        - from
                        - to
                      properties:
                        from:
                          type: string
                          nullable: true
                        to:
                          type: string
                          nullable: true
                    birthDate:
                      type: string
                    singleParent:
                      type: boolean
                    phoneNumber:
                      type: string
                      nullable: true
                      minLength: 1
                      maxLength: 30
                  additionalProperties: false
              example:
                - id: 67d42500-4f8a-4c35-8139-056873ca2876
                  firstname: Anne
                  surname: Doe
                  chronicallySick:
                    from: '2010-01-16T00:00:00+0000'
                    to: '2020-01-16T00:00:00+0000'
                  birthDate: '1980-01-01T00:00:00+00:00'
                  singleParent: false
                  phoneNumber: '800800801'
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create child for user.
      tags:
        - User profile
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - firstname
                - surname
                - chronicallySick
                - birthDate
                - singleParent
                - phoneNumber
              properties:
                firstname:
                  type: string
                  minLength: 1
                  maxLength: 50
                surname:
                  type: string
                  minLength: 1
                  maxLength: 50
                chronicallySick:
                  type: object
                  required:
                    - from
                    - to
                  properties:
                    from:
                      type: string
                      nullable: true
                    to:
                      type: string
                      nullable: true
                birthDate:
                  type: string
                singleParent:
                  type: boolean
                phoneNumber:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 30
              additionalProperties: false
            example:
              firstname: Anne
              surname: Doe
              chronicallySick:
                from: '2010-01-16T00:00:00+0000'
                to: '2020-01-16T00:00:00+0000'
              birthDate: '1980-01-01T00:00:00+00:00'
              singleParent: true
              phoneNumber: '800800801'
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - firstname
                  - surname
                  - chronicallySick
                  - birthDate
                  - singleParent
                  - phoneNumber
                properties:
                  id:
                    type: string
                    format: uuid
                  firstname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  surname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  chronicallySick:
                    type: object
                    required:
                      - from
                      - to
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  birthDate:
                    type: string
                  singleParent:
                    type: boolean
                  phoneNumber:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 30
                additionalProperties: false
              example:
                id: 67d42500-4f8a-4c35-8139-056873ca2876
                firstname: Anne
                surname: Doe
                chronicallySick:
                  from: '2010-01-16T00:00:00+0000'
                  to: '2020-01-16T00:00:00+0000'
                birthDate: '1980-01-01T00:00:00+00:00'
                singleParent: true
                phoneNumber: '800800801'
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/children/{childId}':
    put:
      summary: Edit child.
      tags:
        - User profile
      parameters:
        - name: childId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - firstname
                - surname
                - chronicallySick
                - birthDate
                - singleParent
                - phoneNumber
              properties:
                firstname:
                  type: string
                  minLength: 1
                  maxLength: 50
                surname:
                  type: string
                  minLength: 1
                  maxLength: 50
                chronicallySick:
                  type: object
                  required:
                    - from
                    - to
                  properties:
                    from:
                      type: string
                      nullable: true
                    to:
                      type: string
                      nullable: true
                birthDate:
                  type: string
                singleParent:
                  type: boolean
                phoneNumber:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 30
              additionalProperties: false
            example:
              firstname: Anne
              surname: Doe
              chronicallySick:
                from: '2010-01-16T00:00:00+0000'
                to: '2020-01-16T00:00:00+0000'
              birthDate: '1980-01-01T00:00:00+00:00'
              singleParent: true
              phoneNumber: '800800801'
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - firstname
                  - surname
                  - chronicallySick
                  - birthDate
                  - singleParent
                  - phoneNumber
                properties:
                  id:
                    type: string
                    format: uuid
                  firstname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  surname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  chronicallySick:
                    type: object
                    required:
                      - from
                      - to
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  birthDate:
                    type: string
                  singleParent:
                    type: boolean
                  phoneNumber:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 30
                additionalProperties: false
              example:
                id: 67d42500-4f8a-4c35-8139-056873ca2876
                firstname: Anne
                surname: Doe
                chronicallySick:
                  from: '2010-01-16T00:00:00+0000'
                  to: '2020-01-16T00:00:00+0000'
                birthDate: '1980-01-01T00:00:00+00:00'
                singleParent: true
                phoneNumber: '800800801'
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit single field of child.
      tags:
        - User profile
      parameters:
        - name: childId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                firstname:
                  type: string
                  minLength: 1
                  maxLength: 50
                surname:
                  type: string
                  minLength: 1
                  maxLength: 50
                chronicallySick:
                  type: object
                  required:
                    - from
                    - to
                  properties:
                    from:
                      type: string
                      nullable: true
                    to:
                      type: string
                      nullable: true
                birthDate:
                  type: string
                singleParent:
                  type: boolean
                phoneNumber:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 30
              additionalProperties: false
            example:
              firstname: Anne
              surname: Doe
              chronicallySick:
                from: '2010-01-16T00:00:00+0000'
                to: '2020-01-16T00:00:00+0000'
              birthDate: '1980-01-01T00:00:00+00:00'
              singleParent: true
              phoneNumber: '800800801'
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - firstname
                  - surname
                  - chronicallySick
                  - birthDate
                  - singleParent
                  - phoneNumber
                properties:
                  id:
                    type: string
                    format: uuid
                  firstname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  surname:
                    type: string
                    minLength: 1
                    maxLength: 50
                  chronicallySick:
                    type: object
                    required:
                      - from
                      - to
                    properties:
                      from:
                        type: string
                        nullable: true
                      to:
                        type: string
                        nullable: true
                  birthDate:
                    type: string
                  singleParent:
                    type: boolean
                  phoneNumber:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 30
                additionalProperties: false
              example:
                id: 67d42500-4f8a-4c35-8139-056873ca2876
                firstname: Anne
                surname: Doe
                chronicallySick:
                  from: '2010-01-16T00:00:00+0000'
                  to: '2020-01-16T00:00:00+0000'
                birthDate: '1980-01-01T00:00:00+00:00'
                singleParent: true
                phoneNumber: '800800801'
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/working-hours-arrangements:
    get:
      summary: Get working hours arrangements list.
      tags:
        - Personnel - Working hours arrangements.
      parameters:
        - name: limit
          in: query
          required: false
        - name: page
          in: query
          required: false
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        internalId:
                          type: string
                        externalId:
                          type: string
                          nullable: true
                        name:
                          type: string
                        workingHoursPerWeek:
                          type: number
                        description:
                          type: string
                          nullable: true
                        status:
                          type: string
                  total:
                    type: integer
                  limit:
                    type: integer
                  page:
                    type: integer
                  pages:
                    type: integer
              example:
                items:
                  - id: uuid
                    internalId: id
                    externalId: externalId
                    name: name
                    workingHoursPerWeek: 12
                    description: null
                    status: active
                total: 1
                limit: 50
                page: 1
                pages: 1
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    post:
      summary: Create working hours arrangement.
      tags:
        - Personnel - Working hours arrangements.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - internalId
                - name
                - externalId
                - workingHoursPerWeek
                - description
                - status
              properties:
                internalId:
                  type: string
                  minLength: 1
                  maxLength: 10
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                externalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 50
                workingHoursPerWeek:
                  type: number
                  minimum: 0
                  maximum: 168
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                status:
                  type: string
              additionalProperties: false
            example:
              internalId: id
              externalId: externalId
              name: name
              workingHoursPerWeek: 12
              description: null
              status: active
        required: true
      responses:
        '201':
          description: 201 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  internalId:
                    type: string
                    minLength: 1
                    maxLength: 10
                  externalId:
                    type: string
                    nullable: true
                  name:
                    type: string
                  workingHoursPerWeek:
                    type: number
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
              example:
                id: uuid
                internalId: id
                externalId: externalId
                name: name
                workingHoursPerWeek: 12
                description: null
                status: active
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/personnel/working-hours-arrangements/{id}':
    get:
      summary: Get working hours arrangement by identifier.
      tags:
        - Personnel - Working hours arrangements.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  internalId:
                    type: string
                    minLength: 1
                    maxLength: 10
                  externalId:
                    type: string
                    nullable: true
                  name:
                    type: string
                  workingHoursPerWeek:
                    type: number
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
              example:
                id: uuid
                internalId: id
                externalId: externalId
                name: name
                workingHoursPerWeek: 12
                description: null
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    put:
      summary: Edit working hours arrangement.
      tags:
        - Personnel - Working hours arrangements.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - internalId
                - name
                - externalId
                - workingHoursPerWeek
                - description
                - status
              properties:
                internalId:
                  type: string
                  minLength: 1
                  maxLength: 10
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                externalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 50
                workingHoursPerWeek:
                  type: number
                  minimum: 0
                  maximum: 168
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                status:
                  type: string
              additionalProperties: false
            example:
              internalId: id
              externalId: externalId
              name: name
              workingHoursPerWeek: 12
              description: null
              status: active
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  internalId:
                    type: string
                    minLength: 1
                    maxLength: 10
                  externalId:
                    type: string
                    nullable: true
                  name:
                    type: string
                  workingHoursPerWeek:
                    type: number
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
              example:
                id: uuid
                internalId: id
                externalId: externalId
                name: name
                workingHoursPerWeek: 12
                description: null
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
    patch:
      summary: Edit part of working hours arrangement.
      tags:
        - Personnel - Working hours arrangements.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                internalId:
                  type: string
                  minLength: 1
                  maxLength: 10
                name:
                  type: string
                  minLength: 1
                  maxLength: 50
                externalId:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 50
                workingHoursPerWeek:
                  type: number
                  minimum: 0
                  maximum: 168
                description:
                  type: string
                  nullable: true
                  minLength: 1
                  maxLength: 255
                status:
                  type: string
              additionalProperties: false
            example:
              internalId: id
              externalId: externalId
              name: name
              workingHoursPerWeek: 12
              description: null
              status: active
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  internalId:
                    type: string
                    minLength: 1
                    maxLength: 10
                  externalId:
                    type: string
                    nullable: true
                  name:
                    type: string
                  workingHoursPerWeek:
                    type: number
                  description:
                    type: string
                    nullable: true
                  status:
                    type: string
              example:
                id: uuid
                internalId: id
                externalId: externalId
                name: name
                workingHoursPerWeek: 12
                description: null
                status: active
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/users/active-directory-data/{userId}':
    patch:
      summary: Edit user active directory data.
      tags:
        - User
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                activeDirectoryUsername:
                  type: string
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                  nullable: true
                email:
                  type: string
                  minLength: 1
                  maxLength: 255
                  pattern: (^$|^\S$|^\S.*\S$)
                  nullable: true
              additionalProperties: false
            example:
              activeDirectoryUsername: ad-user
              email: example@email.com
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - userId
                  - activeDirectoryUsername
                  - email
                properties:
                  userId:
                    type: string
                  activeDirectoryUsername:
                    type: string
                    minLength: 1
                    maxLength: 255
                    pattern: (^$|^\S$|^\S.*\S$)
                    nullable: true
                  email:
                    type: string
                    minLength: 1
                    maxLength: 255
                    pattern: (^$|^\S$|^\S.*\S$)
                    nullable: true
                additionalProperties: false
              example:
                userId: f8f8bf26-4bb6-11e9-ab3d-02638e2cefcd
                activeDirectoryUsername: ad-user
                email: example@email.com
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/users/contact-details-data/{userId}':
    patch:
      summary: Edit user contact details.
      tags:
        - User
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                addressLine1:
                  type: string
                  maxLength: 40
                  pattern: (^$|\S)
                addressLine2:
                  type: string
                  maxLength: 40
                  pattern: (^$|\S)
                zipCode:
                  type: string
                  pattern: (^$|\S)
                  maxLength: 40
                city:
                  type: string
                  maxLength: 40
                  pattern: (^$|\S)
                country:
                  type: string
                  nullable: true
                  pattern: (^$|\S)
                phoneNumberPrivate:
                  type: string
                  nullable: true
                  maxLength: 30
                emailPrivate:
                  type: string
                  nullable: true
              additionalProperties: false
            example:
              addressLine1: Somewhere
              addressLine2: Else
              zipCode: '0000'
              city: Cityname
              country: Norway
              phoneNumberPrivate: '0202122'
              emailPrivate: john@doe.com
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  instanceEmployeeId:
                    type: string
                    nullable: true
                  firstName:
                    type: string
                  surname:
                    type: string
                  dateOfBirth:
                    type: string
                  gender:
                    type: string
                    nullable: true
                  nationality:
                    type: string
                    nullable: true
                  addressLine1:
                    type: string
                  addressLine2:
                    type: string
                  zipCode:
                    type: string
                  city:
                    type: string
                  country:
                    type: string
                    nullable: true
                  emailPrivate:
                    type: string
                  phoneNumberPrivate:
                    type: string
                  alias:
                    type: string
                    nullable: true
                  maritalStatus:
                    type: string
                    nullable: true
                  userPhoto:
                    type: string
                    nullable: true
                  personalIdentification:
                    type: object
                    properties:
                      idType:
                        type: string
                        enum:
                          - ssn
                          - alternative_id
                          - none
                      idNumber:
                        type: string
                      idCountry:
                        type: string
                      passportCountry:
                        type: string
                      passportNumber:
                        type: string
                  paymentDetails:
                    type: object
                    properties:
                      countryOfBank:
                        type: string
                      accountNumber:
                        type: string
                  nextOfKin:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - firstname
                        - surname
                        - comment
                        - relationshipType
                        - address
                      properties:
                        id:
                          type: string
                          format: uuid
                        firstname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        surname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        comment:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 255
                        relationshipType:
                          type: string
                          enum:
                            - notDefined
                            - children
                            - parent
                            - partner
                            - family
                            - friend
                            - other
                            - cohabitant
                            - mother
                            - father
                            - married
                        address:
                          type: object
                          nullable: true
                          required:
                            - email
                            - phone
                            - country
                            - city
                            - addressLine1
                            - addressLine2
                            - zipCode
                          properties:
                            email:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 255
                              format: email
                            phone:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 30
                            country:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            city:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            addressLine1:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            addressLine2:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            zipCode:
                              type: string
                              nullable: true
                              pattern: (^$|\S)
                              minLength: 1
                              maxLength: 40
                  children:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - firstname
                        - surname
                        - chronicallySick
                        - birthDate
                        - singleParent
                        - phoneNumber
                      properties:
                        id:
                          type: string
                          format: uuid
                        firstname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        surname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        chronicallySick:
                          type: object
                          properties:
                            from:
                              type: string
                              nullable: true
                            to:
                              type: string
                              nullable: true
                        birthDate:
                          type: string
                        singleParent:
                          type: boolean
                        phoneNumber:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 30
                  connectedEmployeeData:
                    type: array
                    items:
                      type: object
                      properties:
                        employeeId:
                          type: string
                        organizationNumber:
                          type: string
                  integrations:
                    type: object
                    properties:
                      v4:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                  loginMethod:
                    type: object
                    properties:
                      loginMethod:
                        type: string
                        enum:
                          - NO_USER
                          - AUTH0
                          - ACTIVE_DIRECTORY
                      activeDirectoryLogin:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                  userCalculatedStatus:
                    type: object
                    properties:
                      status:
                        type: string
                      remainingDays:
                        type: integer
                        nullable: true
              example:
                id: a345b774-388e-4c0b-8b2c-906d84cf3ac6
                instanceEmployeeId: '1'
                firstName: John
                surname: Doe
                dateOfBirth: '1990-01-01T00:00:00+0100'
                gender: M
                nationality: Norwegian
                addressLine1: Sverres Gate 73
                addressLine2: ''
                zipCode: '0652'
                city: Oslo
                country: Norway
                emailPrivate: example@email.com
                phoneNumberPrivate: '123456789'
                alias: ''
                maritalStatus: null
                userPhoto: >-
                  https://s.gravatar.com/avatar/123131313/12/312/31/23/12/312/3.png
                personalIdentification:
                  idType: ssn
                  idNumber: '19117578967'
                  idCountry: NOR
                  passportCountry: NOR
                  passportNumber: '987654321'
                paymentDetails:
                  countryOfBank: NOR
                  accountNumber: 8601.11.17947
                nextOfKin:
                  - id: da1af222-c2ff-41c1-bd02-2c16b80a890f
                    firstname: John
                    surname: Doe
                    comment: comment
                    relationshipType: partner
                    address:
                      email: example@email.com
                      phone: +48 888 999 888
                      country: PL
                      city: Warsaw
                      addressLine1: ul. Dzielna 7B
                      addressLine2: null
                      zipCode: 00-154
                children:
                  - id: 67d42500-4f8a-4c35-8139-056873ca2876
                    firstname: Anne
                    surname: Doe
                    chronicallySick:
                      from: '2010-01-16T00:00:00+0000'
                      to: '2020-01-16T00:00:00+0000'
                    birthDate: '1980-01-01T00:00:00+00:00'
                    singleParent: false
                    phoneNumber: '800800801'
                connectedEmployeeData:
                  - employeeId: '9'
                    organizationNumber: '1337'
                integrations:
                  v4:
                    enabled: false
                loginMethod:
                  loginMethod: ACTIVE_DIRECTORY
                  activeDirectoryLogin: jdoe
                  email: jdoe@company.com
                userCalculatedStatus:
                  status: active
                  remainingDays: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /users/logged-user/details:
    get:
      summary: Get logged user profile data.
      tags:
        - User profile
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  instanceEmployeeId:
                    type: string
                    nullable: true
                  firstName:
                    type: string
                  surname:
                    type: string
                  dateOfBirth:
                    type: string
                  gender:
                    type: string
                    nullable: true
                  nationality:
                    type: string
                    nullable: true
                  addressLine1:
                    type: string
                  addressLine2:
                    type: string
                  zipCode:
                    type: string
                  city:
                    type: string
                  country:
                    type: string
                    nullable: true
                  emailPrivate:
                    type: string
                  phoneNumberPrivate:
                    type: string
                  alias:
                    type: string
                    nullable: true
                  maritalStatus:
                    type: string
                    nullable: true
                  userPhoto:
                    type: string
                    nullable: true
                  personalIdentification:
                    type: object
                    properties:
                      idType:
                        type: string
                        enum:
                          - ssn
                          - alternative_id
                          - none
                      idNumber:
                        type: string
                      idCountry:
                        type: string
                      passportCountry:
                        type: string
                      passportNumber:
                        type: string
                  paymentDetails:
                    type: object
                    properties:
                      countryOfBank:
                        type: string
                      accountNumber:
                        type: string
                  nextOfKin:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - firstname
                        - surname
                        - comment
                        - relationshipType
                        - address
                      properties:
                        id:
                          type: string
                          format: uuid
                        firstname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        surname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        comment:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 255
                        relationshipType:
                          type: string
                          enum:
                            - notDefined
                            - children
                            - parent
                            - partner
                            - family
                            - friend
                            - other
                            - cohabitant
                            - mother
                            - father
                            - married
                        address:
                          type: object
                          nullable: true
                          required:
                            - email
                            - phone
                            - country
                            - city
                            - addressLine1
                            - addressLine2
                            - zipCode
                          properties:
                            email:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 255
                              format: email
                            phone:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 30
                            country:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            city:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            addressLine1:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            addressLine2:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            zipCode:
                              type: string
                              nullable: true
                              pattern: (^$|\S)
                              minLength: 1
                              maxLength: 40
                  children:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - firstname
                        - surname
                        - chronicallySick
                        - birthDate
                        - singleParent
                        - phoneNumber
                      properties:
                        id:
                          type: string
                          format: uuid
                        firstname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        surname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        chronicallySick:
                          type: object
                          properties:
                            from:
                              type: string
                              nullable: true
                            to:
                              type: string
                              nullable: true
                        birthDate:
                          type: string
                        singleParent:
                          type: boolean
                        phoneNumber:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 30
                  connectedEmployeeData:
                    type: array
                    items:
                      type: object
                      properties:
                        employeeId:
                          type: string
                        organizationNumber:
                          type: string
                  integrations:
                    type: object
                    properties:
                      v4:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                  loginMethod:
                    type: object
                    properties:
                      loginMethod:
                        type: string
                        enum:
                          - NO_USER
                          - AUTH0
                          - ACTIVE_DIRECTORY
                      activeDirectoryLogin:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                  userCalculatedStatus:
                    type: object
                    properties:
                      status:
                        type: string
                      remainingDays:
                        type: integer
                        nullable: true
              example:
                id: a345b774-388e-4c0b-8b2c-906d84cf3ac6
                instanceEmployeeId: '1'
                firstName: John
                surname: Doe
                dateOfBirth: '1990-01-01T00:00:00+0100'
                gender: M
                nationality: Norwegian
                addressLine1: Sverres Gate 73
                addressLine2: ''
                zipCode: '0652'
                city: Oslo
                country: Norway
                emailPrivate: example@email.com
                phoneNumberPrivate: '123456789'
                alias: ''
                maritalStatus: null
                userPhoto: >-
                  https://s.gravatar.com/avatar/123131313/12/312/31/23/12/312/3.png
                personalIdentification:
                  idType: ssn
                  idNumber: '19117578967'
                  idCountry: NOR
                  passportCountry: NOR
                  passportNumber: '987654321'
                paymentDetails:
                  countryOfBank: NOR
                  accountNumber: 8601.11.17947
                nextOfKin:
                  - id: da1af222-c2ff-41c1-bd02-2c16b80a890f
                    firstname: John
                    surname: Doe
                    comment: comment
                    relationshipType: partner
                    address:
                      email: example@email.com
                      phone: +48 888 999 888
                      country: PL
                      city: Warsaw
                      addressLine1: ul. Dzielna 7B
                      addressLine2: null
                      zipCode: 00-154
                children:
                  - id: 67d42500-4f8a-4c35-8139-056873ca2876
                    firstname: Anne
                    surname: Doe
                    chronicallySick:
                      from: '2010-01-16T00:00:00+0000'
                      to: '2020-01-16T00:00:00+0000'
                    birthDate: '1980-01-01T00:00:00+00:00'
                    singleParent: false
                    phoneNumber: '800800801'
                connectedEmployeeData:
                  - employeeId: '9'
                    organizationNumber: '1337'
                integrations:
                  v4:
                    enabled: false
                loginMethod:
                  loginMethod: ACTIVE_DIRECTORY
                  activeDirectoryLogin: jdoe
                  email: jdoe@company.com
                userCalculatedStatus:
                  status: active
                  remainingDays: null
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/users/payment-details-data/{userId}':
    patch:
      summary: Edit user bank account number.
      tags:
        - User
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - accountNumber
                - countryOfBank
              properties:
                accountNumber:
                  type: string
                  minLength: 1
                  maxLength: 255
                countryOfBank:
                  type: string
                  minLength: 1
                  maxLength: 50
                  pattern: \S
              additionalProperties: false
            example:
              countryOfBank: NOR
              accountNumber: 1111.11.11111
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  instanceEmployeeId:
                    type: string
                    nullable: true
                  firstName:
                    type: string
                  surname:
                    type: string
                  dateOfBirth:
                    type: string
                  gender:
                    type: string
                    nullable: true
                  nationality:
                    type: string
                    nullable: true
                  addressLine1:
                    type: string
                  addressLine2:
                    type: string
                  zipCode:
                    type: string
                  city:
                    type: string
                  country:
                    type: string
                    nullable: true
                  emailPrivate:
                    type: string
                  phoneNumberPrivate:
                    type: string
                  alias:
                    type: string
                    nullable: true
                  maritalStatus:
                    type: string
                    nullable: true
                  userPhoto:
                    type: string
                    nullable: true
                  personalIdentification:
                    type: object
                    properties:
                      idType:
                        type: string
                        enum:
                          - ssn
                          - alternative_id
                          - none
                      idNumber:
                        type: string
                      idCountry:
                        type: string
                      passportCountry:
                        type: string
                      passportNumber:
                        type: string
                  paymentDetails:
                    type: object
                    properties:
                      countryOfBank:
                        type: string
                      accountNumber:
                        type: string
                  nextOfKin:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - firstname
                        - surname
                        - comment
                        - relationshipType
                        - address
                      properties:
                        id:
                          type: string
                          format: uuid
                        firstname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        surname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        comment:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 255
                        relationshipType:
                          type: string
                          enum:
                            - notDefined
                            - children
                            - parent
                            - partner
                            - family
                            - friend
                            - other
                            - cohabitant
                            - mother
                            - father
                            - married
                        address:
                          type: object
                          nullable: true
                          required:
                            - email
                            - phone
                            - country
                            - city
                            - addressLine1
                            - addressLine2
                            - zipCode
                          properties:
                            email:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 255
                              format: email
                            phone:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 30
                            country:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            city:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            addressLine1:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            addressLine2:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            zipCode:
                              type: string
                              nullable: true
                              pattern: (^$|\S)
                              minLength: 1
                              maxLength: 40
                  children:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - firstname
                        - surname
                        - chronicallySick
                        - birthDate
                        - singleParent
                        - phoneNumber
                      properties:
                        id:
                          type: string
                          format: uuid
                        firstname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        surname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        chronicallySick:
                          type: object
                          properties:
                            from:
                              type: string
                              nullable: true
                            to:
                              type: string
                              nullable: true
                        birthDate:
                          type: string
                        singleParent:
                          type: boolean
                        phoneNumber:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 30
                  connectedEmployeeData:
                    type: array
                    items:
                      type: object
                      properties:
                        employeeId:
                          type: string
                        organizationNumber:
                          type: string
                  integrations:
                    type: object
                    properties:
                      v4:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                  loginMethod:
                    type: object
                    properties:
                      loginMethod:
                        type: string
                        enum:
                          - NO_USER
                          - AUTH0
                          - ACTIVE_DIRECTORY
                      activeDirectoryLogin:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                  userCalculatedStatus:
                    type: object
                    properties:
                      status:
                        type: string
                      remainingDays:
                        type: integer
                        nullable: true
              example:
                id: a345b774-388e-4c0b-8b2c-906d84cf3ac6
                instanceEmployeeId: '1'
                firstName: John
                surname: Doe
                dateOfBirth: '1990-01-01T00:00:00+0100'
                gender: M
                nationality: Norwegian
                addressLine1: Sverres Gate 73
                addressLine2: ''
                zipCode: '0652'
                city: Oslo
                country: Norway
                emailPrivate: example@email.com
                phoneNumberPrivate: '123456789'
                alias: ''
                maritalStatus: null
                userPhoto: >-
                  https://s.gravatar.com/avatar/123131313/12/312/31/23/12/312/3.png
                personalIdentification:
                  idType: ssn
                  idNumber: '19117578967'
                  idCountry: NOR
                  passportCountry: NOR
                  passportNumber: '987654321'
                paymentDetails:
                  countryOfBank: NOR
                  accountNumber: 8601.11.17947
                nextOfKin:
                  - id: da1af222-c2ff-41c1-bd02-2c16b80a890f
                    firstname: John
                    surname: Doe
                    comment: comment
                    relationshipType: partner
                    address:
                      email: example@email.com
                      phone: +48 888 999 888
                      country: PL
                      city: Warsaw
                      addressLine1: ul. Dzielna 7B
                      addressLine2: null
                      zipCode: 00-154
                children:
                  - id: 67d42500-4f8a-4c35-8139-056873ca2876
                    firstname: Anne
                    surname: Doe
                    chronicallySick:
                      from: '2010-01-16T00:00:00+0000'
                      to: '2020-01-16T00:00:00+0000'
                    birthDate: '1980-01-01T00:00:00+00:00'
                    singleParent: false
                    phoneNumber: '800800801'
                connectedEmployeeData:
                  - employeeId: '9'
                    organizationNumber: '1337'
                integrations:
                  v4:
                    enabled: false
                loginMethod:
                  loginMethod: ACTIVE_DIRECTORY
                  activeDirectoryLogin: jdoe
                  email: jdoe@company.com
                userCalculatedStatus:
                  status: active
                  remainingDays: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/users/personal-id/{userId}':
    patch:
      summary: Edit user personal id.
      tags:
        - User
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - idType
                - idCountry
                - idNumber
              properties:
                idType:
                  type: string
                  enum:
                    - none
                    - alternative_id
                    - ssn
                  nullable: true
                idCountry:
                  type: string
                  nullable: true
                idNumber:
                  type: string
                  nullable: true
                passportCountry:
                  type: string
                  nullable: true
                passportNumber:
                  type: string
                  nullable: true
                  maxLength: 9
              additionalProperties: false
            example:
              idType: none
              idCountry: null
              idNumber: null
              passportCountry: POL
              passportNumber: '987654321'
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  instanceEmployeeId:
                    type: string
                    nullable: true
                  firstName:
                    type: string
                  surname:
                    type: string
                  dateOfBirth:
                    type: string
                  gender:
                    type: string
                    nullable: true
                  nationality:
                    type: string
                    nullable: true
                  addressLine1:
                    type: string
                  addressLine2:
                    type: string
                  zipCode:
                    type: string
                  city:
                    type: string
                  country:
                    type: string
                    nullable: true
                  emailPrivate:
                    type: string
                  phoneNumberPrivate:
                    type: string
                  alias:
                    type: string
                    nullable: true
                  maritalStatus:
                    type: string
                    nullable: true
                  userPhoto:
                    type: string
                    nullable: true
                  personalIdentification:
                    type: object
                    properties:
                      idType:
                        type: string
                        enum:
                          - ssn
                          - alternative_id
                          - none
                      idNumber:
                        type: string
                      idCountry:
                        type: string
                      passportCountry:
                        type: string
                      passportNumber:
                        type: string
                  paymentDetails:
                    type: object
                    properties:
                      countryOfBank:
                        type: string
                      accountNumber:
                        type: string
                  nextOfKin:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - firstname
                        - surname
                        - comment
                        - relationshipType
                        - address
                      properties:
                        id:
                          type: string
                          format: uuid
                        firstname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        surname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        comment:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 255
                        relationshipType:
                          type: string
                          enum:
                            - notDefined
                            - children
                            - parent
                            - partner
                            - family
                            - friend
                            - other
                            - cohabitant
                            - mother
                            - father
                            - married
                        address:
                          type: object
                          nullable: true
                          required:
                            - email
                            - phone
                            - country
                            - city
                            - addressLine1
                            - addressLine2
                            - zipCode
                          properties:
                            email:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 255
                              format: email
                            phone:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 30
                            country:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            city:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            addressLine1:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            addressLine2:
                              type: string
                              nullable: true
                              minLength: 1
                              maxLength: 40
                              pattern: (^$|\S)
                            zipCode:
                              type: string
                              nullable: true
                              pattern: (^$|\S)
                              minLength: 1
                              maxLength: 40
                  children:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - firstname
                        - surname
                        - chronicallySick
                        - birthDate
                        - singleParent
                        - phoneNumber
                      properties:
                        id:
                          type: string
                          format: uuid
                        firstname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        surname:
                          type: string
                          minLength: 1
                          maxLength: 50
                        chronicallySick:
                          type: object
                          properties:
                            from:
                              type: string
                              nullable: true
                            to:
                              type: string
                              nullable: true
                        birthDate:
                          type: string
                        singleParent:
                          type: boolean
                        phoneNumber:
                          type: string
                          nullable: true
                          minLength: 1
                          maxLength: 30
                  connectedEmployeeData:
                    type: array
                    items:
                      type: object
                      properties:
                        employeeId:
                          type: string
                        organizationNumber:
                          type: string
                  integrations:
                    type: object
                    properties:
                      v4:
                        type: object
                        properties:
                          enabled:
                            type: boolean
                  loginMethod:
                    type: object
                    properties:
                      loginMethod:
                        type: string
                        enum:
                          - NO_USER
                          - AUTH0
                          - ACTIVE_DIRECTORY
                      activeDirectoryLogin:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                  userCalculatedStatus:
                    type: object
                    properties:
                      status:
                        type: string
                      remainingDays:
                        type: integer
                        nullable: true
              example:
                id: a345b774-388e-4c0b-8b2c-906d84cf3ac6
                instanceEmployeeId: '1'
                firstName: John
                surname: Doe
                dateOfBirth: '1990-01-01T00:00:00+0100'
                gender: M
                nationality: Norwegian
                addressLine1: Sverres Gate 73
                addressLine2: ''
                zipCode: '0652'
                city: Oslo
                country: Norway
                emailPrivate: example@email.com
                phoneNumberPrivate: '123456789'
                alias: ''
                maritalStatus: null
                userPhoto: >-
                  https://s.gravatar.com/avatar/123131313/12/312/31/23/12/312/3.png
                personalIdentification:
                  idType: ssn
                  idNumber: '19117578967'
                  idCountry: NOR
                  passportCountry: NOR
                  passportNumber: '987654321'
                paymentDetails:
                  countryOfBank: NOR
                  accountNumber: 8601.11.17947
                nextOfKin:
                  - id: da1af222-c2ff-41c1-bd02-2c16b80a890f
                    firstname: John
                    surname: Doe
                    comment: comment
                    relationshipType: partner
                    address:
                      email: example@email.com
                      phone: +48 888 999 888
                      country: PL
                      city: Warsaw
                      addressLine1: ul. Dzielna 7B
                      addressLine2: null
                      zipCode: 00-154
                children:
                  - id: 67d42500-4f8a-4c35-8139-056873ca2876
                    firstname: Anne
                    surname: Doe
                    chronicallySick:
                      from: '2010-01-16T00:00:00+0000'
                      to: '2020-01-16T00:00:00+0000'
                    birthDate: '1980-01-01T00:00:00+00:00'
                    singleParent: false
                    phoneNumber: '800800801'
                connectedEmployeeData:
                  - employeeId: '9'
                    organizationNumber: '1337'
                integrations:
                  v4:
                    enabled: false
                loginMethod:
                  loginMethod: ACTIVE_DIRECTORY
                  activeDirectoryLogin: jdoe
                  email: jdoe@company.com
                userCalculatedStatus:
                  status: active
                  remainingDays: null
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  '/users/send-invitation/{userId}':
    patch:
      summary: Send invitation link to existing user.
      tags:
        - User
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema: {}
            example: {}
        required: true
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  invitationLink:
                    type: string
              example:
                invitationLink: 15f0e95d99ee20ab81177f7d2678ffe0
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
  /personnel/changes:
    get:
      summary: 'Get changed employments, company employees and user profiles.'
      tags:
        - Changes
      parameters:
        - name: external
          description: Param determines if returned id is external or internal
          in: query
          schema:
            type: string
            enum:
              - true
              - false
            default: false
        - name: from
          in: query
          required: true
          schema:
            type: integer
            format: timestamp
        - name: to
          in: query
          required: true
          schema:
            type: integer
            format: timestamp
      responses:
        '200':
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    required:
                      - employments
                      - companyEmployees
                      - users
                    properties:
                      employments:
                        type: array
                        items:
                          type: integer
                      companyEmployees:
                        type: array
                        items:
                          type: integer
                      users:
                        type: array
                        items:
                          type: string
                  - type: object
                    required:
                      - employments
                      - companyEmployees
                      - users
                    properties:
                      employments:
                        type: array
                        items:
                          type: string
                      companyEmployees:
                        type: array
                        items:
                          type: string
                      users:
                        type: array
                        items:
                          type: string
              examples:
                external = false:
                  value:
                    employments:
                      - 123
                      - 244
                      - 333
                    companyEmployees:
                      - 33
                      - 22
                    users:
                      - a345b774-388e-4c0b-8b2c-906d84cf3ac6
                      - 1a8beda8-68f0-4b5a-8f08-eeb3ec8c8f4b
                external = true:
                  value:
                    employments:
                      - '123'
                      - '244'
                      - '333'
                    companyEmployees:
                      - '33'
                      - '22'
                    users:
                      - a345b774-388e-4c0b-8b2c-906d84cf3ac6
                      - 1a8beda8-68f0-4b5a-8f08-eeb3ec8c8f4b
        '400':
          description: 400 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 400
                message: Bad request
                errors:
                  - field: name
                    message: The property name is required
              schema:
                required:
                  - code
                  - errors
                  - message
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                        field:
                          type: string
        '401':
          description: 401 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 401
                message: Unauthorized
                errors: []
        '403':
          description: 403 response
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content:
            application/json:
              example:
                code: 403
                message: Missing Authentication Token
                errors: []
      security:
        - api_gateway_authorizer: []
components:
  schemas:
    getOrgUnitCompanyById:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        unitId:
          type: string
        company:
          type: boolean
        lastLocationsUpdate:
          type: string
          nullable: true
        managerId:
          type: integer
          nullable: true
        managerIdExt:
          type: string
          nullable: true
        parentId:
          type: integer
          nullable: true
        leaderId:
          type: integer
          nullable: true
        leader:
          type: object
          nullable: true
          properties:
            id:
              type: string
            displayName:
              type: string
            picture:
              type: string
        ancestorLeaderId:
          type: integer
          nullable: true
        ancestorLeader:
          type: object
          nullable: true
          properties:
            id:
              type: string
            displayName:
              type: string
            picture:
              type: string
        ancestorCompany:
          type: object
          nullable: true
          properties:
            companyCountry:
              type: string
              nullable: true
            organizationNumber:
              type: string
              nullable: true
            companyLogoUrl:
              type: string
              nullable: true
        ancestors:
          type: array
          items:
            type: integer
        descendants:
          type: array
          items:
            type: integer
        hasCompany:
          type: boolean
        fteSum:
          type: string
        employeeCount:
          type: integer
        companyId:
          type: integer
          nullable: true
        companyName:
          type: string
          nullable: true
        organizationNumber:
          type: string
          nullable: true
        companyCountry:
          type: string
          nullable: true
        companyLogoUrl:
          type: string
          nullable: true
        externalSource:
          type: boolean
        locations:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              companyNumber:
                type: string
                nullable: true
              name:
                type: string
                nullable: true
              visitAddress:
                type: object
                nullable: true
                properties:
                  address:
                    type: string
                    nullable: true
                  zipCode:
                    type: string
                    nullable: true
                  city:
                    type: string
                    nullable: true
                  municipality:
                    type: string
                    nullable: true
              postAddress:
                type: object
                nullable: true
                properties:
                  address:
                    type: string
                    nullable: true
                  zipCode:
                    type: string
                    nullable: true
                  city:
                    type: string
                    nullable: true
                  municipality:
                    type: string
                    nullable: true
              externalId:
                type: string
                minLength: 1
                maxLength: 40
                nullable: true
        removedLocations:
          type: array
          items:
            type: object
            properties:
              companyNumber:
                type: string
              id:
                type: integer
              name:
                type: string
              status:
                type: string
                enum:
                  - removed
        selectedCompanyNumber:
          type: string
          nullable: true
        status:
          type: string
        companyLocation:
          type: object
          nullable: true
          properties:
            companyNumber:
              type: string
              nullable: true
            id:
              type: integer
            name:
              type: string
              nullable: true
            visitAddress:
              type: object
              nullable: true
              properties:
                address:
                  type: string
                  nullable: true
                zipCode:
                  type: string
                  nullable: true
                city:
                  type: string
                  nullable: true
                municipality:
                  type: string
                  nullable: true
            postAddress:
              type: object
              nullable: true
              properties:
                address:
                  type: string
                  nullable: true
                zipCode:
                  type: string
                  nullable: true
                city:
                  type: string
                  nullable: true
                municipality:
                  type: string
                  nullable: true
            externalId:
              type: string
              nullable: true
        evolutionId:
          type: integer
          nullable: true
        visitAddress:
          type: object
          nullable: true
          properties:
            address:
              type: string
              nullable: true
            zipCode:
              type: string
              nullable: true
            city:
              type: string
              nullable: true
            municipality:
              type: string
              nullable: true
        postAddress:
          type: object
          nullable: true
          properties:
            address:
              type: string
              nullable: true
            zipCode:
              type: string
              nullable: true
            city:
              type: string
              nullable: true
            municipality:
              type: string
              nullable: true
        salarySystemCompanyId:
          type: string
          nullable: true
          maxLength: 30
        readyForPaymentMessage:
          type: string
          nullable: true
        customFields:
          type: array
          items:
            type: object
            properties:
              fieldId:
                type: string
                format: uuid
              valueId:
                type: string
                nullable: true
                format: uuid
              fieldTemplateId:
                type: string
                nullable: true
                format: uuid
              field:
                type: string
              value:
                type: string
                nullable: true
              fieldTemplateName:
                type: string
                nullable: true
                maxLength: 40
              fieldExternalId:
                type: string
                maxLength: 40
              valueExternalId:
                type: string
                maxLength: 40
                nullable: true
              fieldTemplateExternalId:
                type: string
                nullable: true
                maxLength: 40
              fieldExternalName:
                type: string
                maxLength: 40
              valueExternalName:
                type: string
                maxLength: 40
                nullable: true
              fieldTemplateExternalName:
                type: string
                nullable: true
                maxLength: 40
              fieldCreatedAt:
                type: string
              fieldUpdatedAt:
                type: string
                nullable: true
              valueCreatedAt:
                type: string
              valueUpdatedAt:
                type: string
              createdAt:
                type: string
                nullable: true
              updatedAt:
                type: string
                nullable: true
              hasCustomFields:
                type: boolean
        unitTypeId:
          type: string
          format: uuid
    getSkillTypesConfiguration:
      required:
        - createdAt
        - defaultSkillStatus
        - description
        - id
        - metaFields
        - name
        - number
        - privacy
        - status
      type: object
      properties:
        id:
          type: string
        number:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - active
            - draft
            - archived
        categories:
          type: array
          items:
            required:
              - color
              - icon
              - id
              - name
              - number
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              number:
                type: string
              color:
                type: string
              icon:
                required:
                  - iconName
                  - prefix
                type: object
                properties:
                  prefix:
                    type: string
                    enum:
                      - fas
                      - fab
                      - far
                      - fal
                      - fad
                  iconName:
                    maxLength: 40
                    minLength: 1
                    type: string
                nullable: true
        privacy:
          type: string
          enum:
            - public
            - myOrganization
            - myManagers
            - onlyMe
        defaultSkillStatus:
          type: string
          enum:
            - toBePlanned
            - planned
            - started
            - toBeApproved
            - approved
            - expired
        createdAt:
          type: string
        uploadedAt:
          type: string
        metaFields:
          type: array
          items:
            required:
              - descriptionTranslation
              - id
              - nameTranslation
              - visibility
            type: object
            properties:
              id:
                type: string
              nameTranslation:
                type: string
              descriptionTranslation:
                type: string
              visibility:
                type: string
                enum:
                  - none
                  - visible
        sections:
          type: array
          items:
            required:
              - descriptionTranslation
              - fields
              - id
              - nameTranslation
            type: object
            properties:
              id:
                type: string
              nameTranslation:
                type: string
              descriptionTranslation:
                type: string
              fields:
                type: array
                items:
                  required:
                    - id
                    - nameTranslation
                    - descriptionTranslation
                    - visibility
                    - value
                    - options
                  type: object
                  properties:
                    id:
                      type: string
                    nameTranslation:
                      type: string
                    descriptionTranslation:
                      type: string
                    visibility:
                      type: string
                      enum:
                        - none
                        - visible
                        - mandatory
                    value:
                      nullable: true
                    options:
                      type: object
                      nullable: true
    getPersonnelEmploymentsConfiguration:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              value:
                nullable: true
    getPersonnelEmploymentById:
      type: object
      required:
        - id
        - number
        - documentStatus
        - country
        - phoneNumberWork
        - emailWork
        - startDate
        - endDate
        - fteFactor
        - salaryDefinition
        - salaryValue
        - salarySeniorityDate
        - salaryCurrency
        - salaryType
        - noticePeriod
        - probationPeriod
        - employeeType
        - comment
        - positionTitle
        - personalJobDescription
        - userId
        - firstWorkingDay
        - lastWorkingDay
        - mainWorkplaceId
        - managerForUnit
        - effectiveStatus
        - referenceId
        - hasEmploymentLocation
        - locationCompanyNumber
        - locationName
        - locationAddress
        - locationZipCode
        - locationCity
        - locationMunicipality
        - costPlace
        - workRelationType
        - workingHoursArrangement
        - workingHoursPerWeek
        - occupationalCode
        - hasOccupationalCode
        - externalId
        - validFrom
        - validTo
        - effectiveStatusDate
        - previousSnapshotId
        - nextSnapshotId
        - userName
        - userPhoto
        - seniorityDate
        - employmentStatus
        - employmentCalculatedStatus
        - statusDate
        - terminationOrOffboardingDate
        - terminateReason
        - isLastEmployment
        - manager
        - managerPhoto
        - managerJobTitle
        - managerId
        - hasEmploymentManager
        - orgUnitId
        - orgUnitName
        - companyId
        - hrRoleTitle
        - hrRoleId
        - customFields
        - reasonForEmployment
        - substituteForEmployment
        - overtimeAllowance
      properties:
        id:
          type: integer
        number:
          type: string
        documentStatus:
          type: object
          nullable: true
          properties:
            status:
              type: string
              enum:
                - COVERED_BY_EXISTING_DOCUMENT
                - LEAVE_IT_FOR_LATER
                - WORK_AGREEMENT_COVERED_BY_EXISTING_DOCUMENT
                - WORK_AGREEMENT_LEAVE_IT_FOR_LATER
                - CANDIDATE_EXISTING_AGREEMENT
                - CANDIDATE_OTHER_DOCUMENTS
                - CANDIDATE_WITHOUT_AGREEMENT
                - DOCUMENT_STATUS_IN_PROGRESS
                - DOCUMENT_STATUS_FOR_SIGNING
                - DOCUMENT_STATUS_CANDIDATE_APPROVAL
                - CANDIDATE_REJECT
            statusDate:
              type: string
              format: date-time
        country:
          type: string
          nullable: true
        phoneNumberWork:
          type: string
          nullable: true
        emailWork:
          type: string
          nullable: true
        startDate:
          type: string
          nullable: true
        endDate:
          type: string
          nullable: true
        fteFactor:
          type: number
          nullable: true
          minimum: 0.00001
          maximum: 1
        presentFteFactor:
          type: number
          nullable: true
          minimum: 0.00001
          maximum: 1
        salaryDefinition:
          type: string
          nullable: true
        salarySystemCompanyId:
          type: string
          nullable: true
          maxLength: 30
        salaryValue:
          type: string
          nullable: true
        salarySeniorityDate:
          type: string
          nullable: true
        salaryCurrency:
          type: string
          nullable: true
        salaryType:
          type: string
          nullable: true
        noticePeriod:
          type: string
          nullable: true
        probationPeriod:
          type: string
          nullable: true
        employeeType:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            typeId:
              type: string
            employeeType:
              type: string
            employmentType:
              type: string
            employmentTypeId:
              type: string
              format: uuid
            status:
              type: string
              enum:
                - active
                - archived
        comment:
          type: string
          nullable: true
        job:
          type: object
          required:
            - title
            - number
            - description
            - evolutionId
            - status
            - occupationalCodes
          properties:
            id:
              type: integer
            title:
              type: string
            number:
              type: string
            description:
              type: string
              nullable: true
            evolutionId:
              type: integer
              nullable: true
            status:
              type: string
            createdAt:
              type: string
            occupationalCodes:
              type: array
              items:
                type: object
                required:
                  - country
                  - code
                  - name
                properties:
                  country:
                    type: string
                  code:
                    type: string
                  name:
                    type: string
        positionTitle:
          type: string
          nullable: true
        personalJobDescription:
          type: string
          nullable: true
        userId:
          type: string
          nullable: true
        firstWorkingDay:
          type: string
          nullable: true
        lastWorkingDay:
          type: string
          nullable: true
        mainWorkplaceId:
          type: string
          nullable: true
        managerForUnit:
          type: string
          nullable: true
        effectiveStatus:
          type: string
          nullable: true
        referenceId:
          type: integer
          nullable: true
        hasEmploymentLocation:
          type: boolean
        locationCompanyNumber:
          type: string
          nullable: true
        locationName:
          type: string
          nullable: true
        locationAddress:
          type: string
          nullable: true
        locationZipCode:
          type: string
          nullable: true
        locationCity:
          type: string
          nullable: true
        locationMunicipality:
          type: string
          nullable: true
        costPlace:
          type: string
          nullable: true
        workRelationType:
          type: string
          nullable: true
        workingHoursArrangement:
          type: string
          nullable: true
        workingHoursPerWeek:
          type: number
          nullable: true
        occupationalCode:
          type: string
          nullable: true
        hasOccupationalCode:
          type: boolean
        externalId:
          type: string
          nullable: true
        validFrom:
          type: string
          nullable: true
        validTo:
          type: string
          nullable: true
        effectiveStatusDate:
          type: string
          nullable: true
        previousSnapshotId:
          type: string
          nullable: true
        nextSnapshotId:
          type: string
          nullable: true
        userName:
          type: string
          nullable: true
        userPhoto:
          type: string
          nullable: true
        seniorityDate:
          type: string
          nullable: true
        employmentStatus:
          type: string
          nullable: true
        employmentCalculatedStatus:
          type: string
          nullable: true
        statusDate:
          type: string
          nullable: true
        terminationOrOffboardingDate:
          type: string
          nullable: true
        terminateReason:
          type: string
          nullable: true
        isLastEmployment:
          type: string
          nullable: true
        manager:
          type: string
          nullable: true
        managerPhoto:
          type: string
          nullable: true
        managerJobTitle:
          type: string
          nullable: true
        managerId:
          type: integer
          nullable: true
        hasEmploymentManager:
          type: boolean
        orgUnitId:
          type: integer
        orgUnitName:
          type: string
          nullable: true
        companyId:
          type: integer
          nullable: true
        hrRoleTitle:
          type: string
          nullable: true
        hrRoleId:
          type: string
        customFields:
          type: array
          items:
            type: object
            properties:
              fieldId:
                type: string
                format: uuid
              valueId:
                type: string
                nullable: true
                format: uuid
              fieldTemplateId:
                type: string
                nullable: true
                format: uuid
              field:
                type: string
              value:
                type: string
                nullable: true
              fieldTemplateName:
                type: string
                nullable: true
                maxLength: 40
              fieldExternalId:
                type: string
                maxLength: 40
              valueExternalId:
                type: string
                maxLength: 40
                nullable: true
              fieldTemplateExternalId:
                type: string
                nullable: true
                maxLength: 40
              fieldExternalName:
                type: string
                maxLength: 40
              valueExternalName:
                type: string
                maxLength: 40
                nullable: true
              fieldTemplateExternalName:
                type: string
                nullable: true
                maxLength: 40
              hasCustomFields:
                type: boolean
        reasonForEmployment:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
        substituteForEmployment:
          type: array
          nullable: true
          items:
            type: integer
        overtimeAllowance:
          type: string
          nullable: true
          enum:
            - FIELD_OVERTIME_ALLOWANCE_YES
            - FIELD_OVERTIME_ALLOWANCE_NO
            - null
    getPersonnelEmploymentHistoryById:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              number:
                type: string
              documentStatus:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - COVERED_BY_EXISTING_DOCUMENT
                      - LEAVE_IT_FOR_LATER
                      - WORK_AGREEMENT_COVERED_BY_EXISTING_DOCUMENT
                      - WORK_AGREEMENT_LEAVE_IT_FOR_LATER
                      - CANDIDATE_EXISTING_AGREEMENT
                      - CANDIDATE_OTHER_DOCUMENTS
                      - CANDIDATE_WITHOUT_AGREEMENT
                      - DOCUMENT_STATUS_IN_PROGRESS
                      - DOCUMENT_STATUS_FOR_SIGNING
                      - DOCUMENT_STATUS_CANDIDATE_APPROVAL
                      - CANDIDATE_REJECT
                  statusDate:
                    type: string
                    format: date-time
              country:
                type: string
                nullable: true
              phoneNumberWork:
                type: string
                nullable: true
              emailWork:
                type: string
                nullable: true
              startDate:
                type: string
                nullable: true
              endDate:
                type: string
                nullable: true
              fteFactor:
                type: number
                nullable: true
              presentFteFactor:
                type: number
                nullable: true
              salaryDefinition:
                type: string
                nullable: true
              salarySystemCompanyId:
                type: string
                nullable: true
                maxLength: 30
              salaryValue:
                type: string
                nullable: true
              salarySeniorityDate:
                type: string
                nullable: true
              salaryCurrency:
                type: string
                nullable: true
              salaryType:
                type: string
                nullable: true
              noticePeriod:
                type: string
                nullable: true
              probationPeriod:
                type: string
                nullable: true
              employeeType:
                type: object
                nullable: true
                properties:
                  id:
                    type: string
                    format: uuid
                  typeId:
                    type: string
                  employeeType:
                    type: string
                  employmentType:
                    type: string
                  employmentTypeId:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - active
                      - archived
              comment:
                type: string
                nullable: true
              job:
                type: object
                required:
                  - title
                  - number
                  - description
                  - evolutionId
                  - status
                  - occupationalCodes
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  number:
                    type: string
                  description:
                    type: string
                    nullable: true
                  evolutionId:
                    type: integer
                    nullable: true
                  status:
                    type: string
                  createdAt:
                    type: string
                  occupationalCodes:
                    type: array
                    items:
                      type: object
                      required:
                        - country
                        - code
                        - name
                      properties:
                        country:
                          type: string
                        code:
                          type: string
                        name:
                          type: string
              positionTitle:
                type: string
                nullable: true
              personalJobDescription:
                type: string
                nullable: true
              userId:
                type: string
                nullable: true
              firstWorkingDay:
                type: string
                nullable: true
              lastWorkingDay:
                type: string
                nullable: true
              mainWorkplaceId:
                type: string
                nullable: true
              managerForUnit:
                type: string
                nullable: true
              effectiveStatus:
                type: string
                enum:
                  - past
                  - current
                  - future
                  - replaced
                  - canceled
                  - effected
                  - approved
                  - for_approval
                  - for_confirmation
                  - rejected
                nullable: true
              referenceId:
                type: integer
                nullable: true
              hasEmploymentLocation:
                type: boolean
              locationCompanyNumber:
                type: string
                nullable: true
              locationName:
                type: string
                nullable: true
              locationAddress:
                type: string
                nullable: true
              locationZipCode:
                type: string
                nullable: true
              locationCity:
                type: string
                nullable: true
              locationMunicipality:
                type: string
                nullable: true
              costPlace:
                type: string
                nullable: true
              workRelationType:
                type: string
                nullable: true
              workingHoursArrangement:
                type: string
                nullable: true
              workingHoursPerWeek:
                type: number
                nullable: true
              occupationalCode:
                type: string
                nullable: true
              hasOccupationalCode:
                type: boolean
              externalId:
                type: string
                nullable: true
              validFrom:
                type: string
                nullable: true
              validTo:
                type: string
                nullable: true
              effectiveStatusDate:
                type: string
                nullable: true
              previousSnapshotId:
                type: string
                nullable: true
              nextSnapshotId:
                type: string
                nullable: true
              userName:
                type: string
                nullable: true
              userPhoto:
                type: string
                nullable: true
              seniorityDate:
                type: string
                nullable: true
              employmentStatus:
                type: string
                nullable: true
              employmentCalculatedStatus:
                type: string
                nullable: true
              statusDate:
                type: string
                nullable: true
              terminationOrOffboardingDate:
                type: string
                nullable: true
              terminateReason:
                type: string
                nullable: true
              isLastEmployment:
                type: string
                nullable: true
              manager:
                type: string
                nullable: true
              managerPhoto:
                type: string
                nullable: true
              managerJobTitle:
                type: string
                nullable: true
              managerId:
                type: integer
                nullable: true
              hasEmploymentManager:
                type: boolean
              orgUnitId:
                type: integer
              orgUnitName:
                type: string
                nullable: true
              companyId:
                type: integer
                nullable: true
              hrRoleTitle:
                type: string
                nullable: true
              hrRoleId:
                type: string
              customFields:
                type: array
                items:
                  type: object
                  properties:
                    fieldId:
                      type: string
                      format: uuid
                    valueId:
                      type: string
                      nullable: true
                      format: uuid
                    fieldTemplateId:
                      type: string
                      nullable: true
                      format: uuid
                    field:
                      type: string
                    value:
                      type: string
                      nullable: true
                    fieldTemplateName:
                      type: string
                      nullable: true
                      maxLength: 40
                    fieldExternalId:
                      type: string
                      maxLength: 40
                    valueExternalId:
                      type: string
                      maxLength: 40
                      nullable: true
                    fieldTemplateExternalId:
                      type: string
                      nullable: true
                      maxLength: 40
                    fieldExternalName:
                      type: string
                      maxLength: 40
                    valueExternalName:
                      type: string
                      maxLength: 40
                      nullable: true
                    fieldTemplateExternalName:
                      type: string
                      nullable: true
                      maxLength: 40
                    hasCustomFields:
                      type: boolean
              reasonForEmployment:
                type: string
                nullable: true
                minLength: 1
                maxLength: 255
              substituteForEmployment:
                type: array
                nullable: true
                items:
                  type: integer
              overtimeAllowance:
                type: string
                nullable: true
                enum:
                  - FIELD_OVERTIME_ALLOWANCE_YES
                  - FIELD_OVERTIME_ALLOWANCE_NO
                  - null
        page:
          type: integer
        pages:
          type: integer
        limit:
          type: integer
        total:
          type: integer
    putOrgstructureUnit:
      required:
        - name
        - unitId
        - unitTypeId
      type: object
      properties:
        name:
          maxLength: 255
          minLength: 1
          pattern: (^$|^\S$|^\S.*\S$)
          type: string
        parentId:
          type: integer
          nullable: true
        unitId:
          maxLength: 40
          minLength: 1
          pattern: (^$|^\S$|^\S.*\S$)
          type: string
        managerId:
          type: integer
          nullable: true
        customFields:
          type: array
          items:
            type: object
            required:
              - fieldId
              - valueId
            properties:
              fieldId:
                type: string
                format: uuid
              valueId:
                type: string
                format: uuid
        unitTypeId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
    getTerminateReasons:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
    putPersonnelEmployment:
      type: object
      required:
        - number
        - phoneNumberWork
        - emailWork
        - startDate
        - endDate
        - fteFactor
        - presentFteFactor
        - salaryDefinition
        - salaryType
        - noticePeriod
        - probationPeriod
        - salaryValue
        - salarySeniorityDate
        - employeeTypeId
        - comment
        - jobId
        - positionTitle
        - personalJobDescription
        - hrRoleId
        - salaryCurrency
        - firstWorkingDay
        - lastWorkingDay
        - mainWorkplaceId
        - managerId
        - orgUnitId
        - costPlace
        - workRelationType
        - workingHoursArrangement
        - workingHoursPerWeek
        - occupationalCode
        - externalId
        - customFields
        - effectiveDates
      properties:
        number:
          type: string
          minLength: 1
          maxLength: 40
          pattern: \S
        phoneNumberWork:
          type: string
          nullable: true
          minLength: 1
          maxLength: 40
          pattern: \S
        emailWork:
          type: string
          nullable: true
          format: email
        startDate:
          type: string
        endDate:
          type: string
          nullable: true
        fteFactor:
          type: number
          nullable: true
          minimum: 0.00001
          maximum: 1
        presentFteFactor:
          type: number
          nullable: true
          minimum: 0.00001
          maximum: 1
        salaryDefinition:
          type: string
          nullable: true
        salaryType:
          type: string
          nullable: true
        noticePeriod:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
          pattern: '^[0-9]+[wmy]$'
        probationPeriod:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
          pattern: '^[0-9]+[wmy]$'
        salaryValue:
          type: string
          nullable: true
          minimum: 0
          maximum: 100000000000000000000
        salarySeniorityDate:
          type: string
          nullable: true
          format: date-time
        employeeTypeId:
          type: string
          format: uuid
          nullable: true
          minLength: 1
          maxLength: 255
          pattern: \S
        comment:
          type: string
          nullable: true
          maxLength: 1000
        jobId:
          type: integer
        positionTitle:
          type: string
          nullable: true
          maxLength: 40
        personalJobDescription:
          type: string
          nullable: true
          maxLength: 1000
        hrRoleId:
          type: string
        salaryCurrency:
          type: string
          nullable: true
          minLength: 3
          maxLength: 3
          pattern: \S
        firstWorkingDay:
          type: string
          nullable: true
          format: date-time
        lastWorkingDay:
          type: string
          nullable: true
          format: date-time
        mainWorkplaceId:
          type: string
          nullable: true
          minLength: 1
          maxLength: 36
          pattern: \S
        managerId:
          type: integer
          nullable: true
        orgUnitId:
          type: integer
          minimum: 1
        costPlace:
          type: string
          nullable: true
          minLength: 1
          maxLength: 40
        workRelationType:
          type: string
          nullable: true
          minLength: 1
          maxLength: 64
        workingHoursArrangement:
          type: string
          format: uuid
          nullable: true
          minLength: 1
          maxLength: 64
        workingHoursPerWeek:
          type: number
          nullable: true
          minimum: 0
          maximum: 168
        occupationalCode:
          type: string
          description: Use code only without name
          nullable: true
          minLength: 1
          maxLength: 64
        externalId:
          type: string
          nullable: true
          minLength: 1
          maxLength: 40
        customFields:
          type: array
          items:
            type: object
            required:
              - fieldId
              - valueId
            properties:
              fieldId:
                type: string
                format: uuid
              valueId:
                type: string
                format: uuid
            additionalProperties: false
        effectiveDates:
          type: object
          required:
            - immediate
            - comment
            - startValidityDate
            - endValidityDate
          properties:
            comment:
              type: string
              nullable: true
            startValidityDate:
              type: string
              nullable: true
            endValidityDate:
              type: string
              nullable: true
            immediate:
              type: boolean
              nullable: true
        reasonForEmployment:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
        substituteForEmployment:
          type: array
          nullable: true
          items:
            type: integer
        overtimeAllowance:
          type: string
          nullable: true
          enum:
            - FIELD_OVERTIME_ALLOWANCE_YES
            - FIELD_OVERTIME_ALLOWANCE_NO
            - null
    getEmploymentTypeFlatList:
      type: object
      properties:
        items:
          type: array
          items:
            required:
              - id
              - title
            type: object
            properties:
              id:
                type: string
              title:
                type: string
    postSkillType:
      type: object
      required:
        - number
        - name
        - description
        - privacy
        - defaultSkillStatus
        - categories
        - cvCategories
        - metaFields
        - sections
      properties:
        number:
          type: string
          minLength: 1
          maxLength: 40
        name:
          type: string
          minLength: 1
          maxLength: 40
        description:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
        privacy:
          type: string
          enum:
            - public
            - myOrganization
            - myManagers
            - onlyMe
        defaultSkillStatus:
          type: string
          enum:
            - toBePlanned
            - planned
            - started
            - toBeApproved
            - approved
        categories:
          type: array
          items:
            type: string
            format: uuid
        cvCategories:
          type: array
          items:
            type: string
            format: uuid
        metaFields:
          type: array
          items:
            type: object
            required:
              - id
              - visibility
              - value
            properties:
              id:
                type: string
                enum:
                  - administrator
                  - fixedUrl
                  - hoursOfDuration
                  - tags
              visibility:
                type: string
                enum:
                  - none
                  - visible
              value:
                oneOf:
                  - type: integer
                  - type: string
                    maxLength: 255
                  - type: array
                    items:
                      type: string
                  - type: 'null'
        sections:
          type: array
          items:
            type: object
            required:
              - id
              - fields
            properties:
              id:
                type: string
                enum:
                  - details
                  - skillProvider
                  - expiryPlanningAndScore
                  - attachmentsAndLinks
              fields:
                type: array
                items:
                  type: object
                  required:
                    - id
                    - visibility
                  properties:
                    id:
                      type: string
                      enum:
                        - skillTitle
                        - startedDate
                        - completedDate
                        - comment
                        - lengthOfExperience
                        - educationalLevel
                        - writtenLanguageSkillLevel
                        - oralLanguageSkillLevel
                        - internalExternal
                        - nameOfProvider
                        - countryOfProvider
                        - providerPlace
                        - targetScore
                        - currentScore
                        - expiryDate
                        - plannedCompletedDate
                        - requirement
                        - criticality
                        - userDefinedNotificationDate
                        - documents
                        - customUrl
                    visibility:
                      type: string
                      enum:
                        - none
                        - visible
                        - mandatory
                    value:
                      oneOf:
                        - type: integer
                        - type: string
                          maxLength: 255
                        - type: array
                          items: {}
                        - type: object
                        - type: 'null'
    postPersonnelJob:
      type: object
      required:
        - title
        - number
        - acl
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 40
          pattern: (^$|^\S$|^\S.*\S$)
        number:
          type: string
          minLength: 1
          maxLength: 40
          pattern: (^$|^\S$|^\S.*\S$)
        description:
          type: string
          nullable: true
          maxLength: 1000
          pattern: '(^$|^\S$|^\S[\s\S]*\S$)'
        categoryId:
          type: string
          format: uuid
          nullable: true
        status:
          type: string
          enum:
            - active
            - inactive
        occupationalCodes:
          type: array
          items:
            type: object
            required:
              - country
              - code
            properties:
              country:
                type: string
                minLength: 1
                maxLength: 3
              code:
                type: string
                minLength: 1
                maxLength: 64
                description: Use only code number the without name
        acl:
          type: array
          minItems: 1
          items:
            type: object
            required:
              - subjectType
              - subjectId
              - setting
            properties:
              subjectType:
                type: string
              subjectId:
                type: string
              setting:
                type: string
                enum:
                  - allow
                  - deny
    getSkillTypeList:
      type: object
      required:
        - items
        - total
        - limit
        - page
        - pages
      properties:
        items:
          type: array
          items:
            type: object
            required:
              - id
              - number
              - name
              - description
              - privacy
              - defaultSkillStatus
              - status
              - tags
              - createdAt
              - updatedAt
            properties:
              id:
                type: string
                format: uuid
              number:
                type: string
              name:
                type: string
              description:
                type: string
                nullable: true
              privacy:
                type: string
                enum:
                  - public
                  - myOrganization
                  - myManagers
                  - onlyMe
              defaultSkillStatus:
                type: string
                enum:
                  - toBePlanned
                  - planned
                  - started
                  - toBeApproved
                  - approved
                  - expired
              status:
                type: string
                enum:
                  - active
                  - draft
                  - archived
              tags:
                type: array
                nullable: true
                items:
                  type: string
              categories:
                type: array
                items:
                  type: object
                  required:
                    - id
                    - name
                    - number
                    - color
                    - icon
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    number:
                      type: string
                    color:
                      type: string
                      nullable: true
                    icon:
                      type: object
                      nullable: true
                      required:
                        - prefix
                        - iconName
                      properties:
                        prefix:
                          type: string
                          enum:
                            - fas
                            - fab
                            - far
                            - fal
                            - fad
                        iconName:
                          type: string
                          minLength: 1
                          maxLength: 40
              createdAt:
                type: string
              updatedAt:
                type: string
        total:
          type: integer
        limit:
          type: integer
        page:
          type: integer
        pages:
          type: integer
    postEmployments:
      type: object
      required:
        - user
        - employment
        - personalIdentification
      properties:
        user:
          type: object
          required:
            - firstName
            - lastName
          properties:
            id:
              type: string
              nullable: true
            firstName:
              type: string
              nullable: true
              maxLength: 50
              pattern: '(\S|(^(?![\s\S])))'
            lastName:
              type: string
              nullable: true
              maxLength: 40
              pattern: '(\S|(^(?![\s\S])))'
            email:
              type: string
              nullable: true
              format: email
              maxLength: 254
            language:
              type: string
              nullable: true
              minLength: 2
            dateOfBirth:
              type: string
              nullable: true
              format: date-time
            gender:
              type: string
              nullable: true
            activeDirectoryLogin:
              type: string
              nullable: true
            loginMethod:
              type: string
              enum:
                - AUTH0
                - ACTIVE_DIRECTORY
                - NO_USER
            phoneNumberPrivate:
              type: string
              nullable: true
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
            accountNumber:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
            countryOfBank:
              type: string
              nullable: true
              minLength: 1
              maxLength: 50
              pattern: (^$|^\S$|^\S.*\S$)
        personalIdentification:
          type: object
          properties:
            idType:
              type: string
              nullable: true
            idCountry:
              type: string
              nullable: true
            idNumber:
              type: string
              nullable: true
            passportCountry:
              type: string
              nullable: true
            passportNumber:
              type: string
              nullable: true
        employment:
          type: object
          required:
            - hrRoleId
            - jobId
            - startDate
            - orgUnitsWithAdvancedAccess
          properties:
            id:
              type: integer
              nullable: true
            number:
              type: string
              nullable: true
            phoneNumberWork:
              type: string
              nullable: true
              maxLength: 40
            emailWork:
              type: string
              nullable: true
              format: email
            startDate:
              type: string
            endDate:
              type: string
              nullable: true
            firstWorkingDay:
              type: string
              nullable: true
            lastWorkingDay:
              type: string
              nullable: true
            hrRoleId:
              type: string
            seniorityDate:
              type: string
              nullable: true
            salaryDefinition:
              type: string
              nullable: true
            salaryValue:
              type: string
              nullable: true
              minimum: 0
              maximum: 100000000000000000000
            fteFactor:
              type: number
              nullable: true
              minimum: 0.00001
              maximum: 1
            presentFteFactor:
              type: number
              nullable: true
              minimum: 0
              maximum: 1
            salarySeniorityDate:
              type: string
              nullable: true
            salaryType:
              type: string
              nullable: true
            noticePeriod:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: '^[0-9]+[wmy]$'
            probationPeriod:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: '^[0-9]+[wmy]$'
            employeeType:
              type: string
              description: EmployeeType id
              format: uuid
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: \S
            comment:
              type: string
              nullable: true
              maxLength: 1000
            salaryCurrency:
              type: string
              nullable: true
              minLength: 3
              maxLength: 3
              pattern: \S
            mainWorkplace:
              type: string
              nullable: true
              minLength: 1
              maxLength: 36
              pattern: \S
            managerId:
              type: integer
              nullable: true
            orgUnitId:
              type: integer
              minimum: 1
            jobId:
              type: integer
            positionTitle:
              type: string
              nullable: true
              maxLength: 40
            personalJobDescription:
              type: string
              nullable: true
              maxLength: 1000
            costPlace:
              type: string
              nullable: true
              minLength: 1
              maxLength: 40
            location:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
            workRelationType:
              type: string
              nullable: true
              minLength: 1
              maxLength: 64
            workingHoursArrangement:
              type: string
              format: uuid
              nullable: true
              minLength: 1
              maxLength: 64
            workingHoursPerWeek:
              type: number
              nullable: true
              minimum: 0
              maximum: 168
            occupationalCode:
              type: string
              description: Use code only without name
              nullable: true
              minLength: 1
              maxLength: 64
            externalId:
              type: string
              nullable: true
              minLength: 1
              maxLength: 40
            customFields:
              type: array
              items:
                type: object
                required:
                  - fieldId
                  - valueId
                properties:
                  fieldId:
                    type: string
                    format: uuid
                  valueId:
                    type: string
                    format: uuid
                additionalProperties: false
            orgUnitsWithAdvancedAccess:
              type: array
              nullable: true
              minItems: 1
              items:
                type: integer
            reasonForEmployment:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
            substituteForEmployment:
              type: array
              nullable: true
              items:
                type: integer
            overtimeAllowance:
              type: string
              nullable: true
              enum:
                - FIELD_OVERTIME_ALLOWANCE_YES
                - FIELD_OVERTIME_ALLOWANCE_NO
                - null
        programTemplateId:
          type: integer
          nullable: true
        personalGreetings:
          type: string
          maxLength: 1024
        taskTemplateChanges:
          type: array
          nullable: true
          required:
            - taskTemplateId
            - actorEmploymentId
          items:
            type: object
            properties:
              taskTemplateId:
                type: integer
              actorEmploymentId:
                type: integer
        referenceDate:
          type: string
          nullable: true
        companyEmployee:
          type: object
          nullable: true
          properties:
            seniorityDate:
              type: string
              nullable: true
            employeeId:
              type: string
              nullable: true
            mainEmployer:
              type: boolean
              nullable: true
            salaryNumber:
              type: string
              nullable: true
              maxLength: 40
            selfSickness:
              type: string
              nullable: true
            freeEmployer:
              type: object
              nullable: true
              properties:
                from:
                  type: string
                  nullable: true
                to:
                  type: string
                  nullable: true
            workPermit:
              type: object
              nullable: true
              properties:
                from:
                  type: string
                  nullable: true
                to:
                  type: string
                  nullable: true
            terminationSeniorityDate:
              type: string
              nullable: true
            residencePermit:
              type: object
              nullable: true
              properties:
                from:
                  type: string
                  nullable: true
                to:
                  type: string
                  nullable: true
            readyForPayment:
              type: boolean
            customFields:
              type: array
              items:
                type: object
                required:
                  - fieldId
                  - valueId
                properties:
                  fieldId:
                    type: string
                    format: uuid
                  valueId:
                    type: string
                    format: uuid
                additionalProperties: false
            resourceType:
              type: integer
              nullable: true
    postSkill:
      required:
        - userId
        - companyId
        - employmentId
        - parentId
        - fields
        - privacy
        - skillTypeId
        - status
      type: object
      properties:
        userId:
          type: string
        companyId:
          type: integer
        employeeId:
          type: string
          nullable: true
        organizationNumber:
          type: string
          nullable: true
        skillTypeId:
          type: string
        parentId:
          type: integer
          description: Id of parent skill used in renewed process.
          nullable: true
        employmentId:
          type: integer
          nullable: true
        status:
          type: string
          enum:
            - toBePlanned
            - planned
            - started
            - toBeApproved
            - approved
        privacy:
          type: string
          enum:
            - public
            - myOrganization
            - myManagers
            - onlyMe
        fields:
          type: array
          items:
            type: object
            required:
              - id
              - data
            properties:
              id:
                type: string
                enum:
                  - skillTitle
                  - startedDate
                  - completedDate
                  - comment
                  - lengthOfExperience
                  - educationalLevel
                  - writtenLanguageSkillLevel
                  - oralLanguageSkillLevel
                  - documents
                  - customUrl
                  - internalExternal
                  - nameOfProvider
                  - countryOfProvider
                  - providerPlace
                  - targetScore
                  - currentScore
                  - expiryDate
                  - plannedCompletedDate
                  - userDefinedNotificationDate
                  - requirement
                  - criticality
              data:
                description: |
                  * Allowed values depending on `id` field:
                    * `lengthOfExperience`, available suffixes:
                      * `y` for year(s)
                      * `m` for month(s)
                      * `w` for week(s)
                      * `d` for day(s)
                      * `h` for hour(s)
                    * `educationalLevel`:
                      * `1` for Primary school
                      * `2` for High school
                      * `3` for Certificate of apprenticeship
                      * `4` for Technical College
                      * `5` for Higher apprenticeship
                      * `6` for Academic credit
                      * `7` for Year study University/College
                      * `8` for 2-year University/College
                      * `9` for 3-year University/College
                      * `10` for Bachelor's degree
                      * `11` for Master's degree
                      * `12` for Ph.D.
                    * `writtenLanguageSkillLevel` and `oralLanguageSkillLevel`:
                      * `1` for Elementary proficiency
                      * `2` for Limited working proficiency
                      * `3` for Professional working proficiency
                      * `4` for Full professional proficiency
                      * `5` for Native or bilingual proficiency
                    * `internalExternal`:
                      * `1` for Internal
                      * `2` for External
                    * `targetScore` and `currentScore`:
                      * `1` for Some knowledge
                      * `2` for Competent
                      * `3` for Highly competent
                      * `4` for Expert
                    * `requirement`:
                      * `1` for Legal requirement
                      * `2` for ISO-requirement
                      * `3` for Internal requirement
                      * `4` for Other
                      * `5` for Customer requirement
                    * `criticality`:
                      * `1` for Optional
                      * `2` for Required
                      * `3` for Recommended
                      * `4` for Critical
    getOrgstructure:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
              unitId:
                type: string
              level:
                type: integer
              company:
                type: boolean
              leaderId:
                type: integer
              parentId:
                type: integer
                nullable: true
              manager:
                type: object
                properties:
                  id:
                    type: integer
                    nullable: true
                  orgUnitName:
                    type: string
                  inherited:
                    type: boolean
              location:
                type: object
                properties:
                  id:
                    type: integer
                    nullable: true
                  orgUnitName:
                    type: string
                    nullable: true
                  inherited:
                    type: boolean
                  externalId:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 40
              hasCompany:
                type: boolean
              companyId:
                type: integer
                nullable: true
              companyName:
                type: string
                nullable: true
              companyCountry:
                type: string
                nullable: true
              ancestors:
                type: array
                items:
                  type: integer
              descendants:
                type: array
                items:
                  type: integer
              children:
                type: array
                items:
                  type: object
              status:
                type: string
                enum:
                  - ACTIVE
                  - INACTIVE
              salarySystemCompanyId:
                type: string
                nullable: true
                maxLength: 30
        total:
          type: integer
    getPersonnelOccupationalCode:
      type: array
      default: []
      items:
        title: Items
        type: object
        required:
          - code
          - name
        properties:
          code:
            type: string
          name:
            type: string
    getSkillOverviewList:
      required:
        - items
        - limit
        - page
        - pages
        - total
      type: object
      properties:
        items:
          type: array
          items:
            required:
              - categories
              - companyId
              - createdAt
              - currentScore
              - employment
              - expiryDate
              - id
              - primaryEmploymentId
              - privacy
              - skillType
              - status
              - targetScore
              - updatedAt
              - user
            type: object
            properties:
              id:
                type: string
              user:
                required:
                  - displayName
                  - id
                  - photo
                type: object
                properties:
                  id:
                    type: string
                  displayName:
                    type: string
                  photo:
                    type: string
              skillType:
                required:
                  - id
                  - name
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
              categories:
                type: array
                items:
                  required:
                    - id
                    - name
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
              employment:
                type: object
                nullable: true
                required:
                  - id
                  - jobTitle
                  - number
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  jobTitle:
                    type: string
              primaryEmploymentId:
                type: integer
              companyId:
                type: integer
              currentScore:
                type: integer
                nullable: true
              targetScore:
                type: integer
                nullable: true
              privacy:
                type: string
              hidden:
                type: boolean
              isRenewed:
                type: boolean
              status:
                type: string
              expiryDate:
                type: string
                nullable: true
              createdAt:
                type: string
              updatedAt:
                type: string
        page:
          type: integer
        pages:
          type: integer
        limit:
          type: integer
        total:
          type: integer
    postOrgUnitCompany:
      required:
        - managerId
        - organizationNumber
        - companyCountry
        - unitTypeId
      type: object
      properties:
        name:
          description: >-
            For NOR country passing name is not allowed as its fetched from
            Brreg
          type: string
          nullable: true
          maxLength: 255
          minLength: 1
          pattern: (^$|^\S$|^\S.*\S$)
        parentId:
          type: integer
          nullable: true
        unitId:
          type: string
          nullable: true
          maxLength: 40
          minLength: 1
          pattern: (^$|^\S$|^\S.*\S$)
        managerId:
          type: integer
        organizationNumber:
          maxLength: 255
          minLength: 1
          pattern: (^$|^\S$|^\S.*\S$)
          type: string
        companyCountry:
          maxLength: 3
          minLength: 3
          type: string
        companyLogoUrl:
          maxLength: 255
          pattern: (^$|^\S$|^\S.*\S$)
          type: string
          nullable: true
        selectedCompanyNumber:
          maxLength: 255
          minLength: 1
          pattern: (^$|^\S$|^\S.*\S$)
          type: string
          nullable: true
        visitAddress:
          type: object
          properties:
            address:
              maxLength: 255
              minLength: 1
              pattern: (^$|^\S$|^\S.*\S$)
              type: string
              nullable: true
            zipCode:
              maxLength: 255
              minLength: 1
              pattern: (^$|^\S$|^\S.*\S$)
              type: string
              nullable: true
            city:
              maxLength: 255
              minLength: 1
              pattern: (^$|^\S$|^\S.*\S$)
              type: string
              nullable: true
            municipality:
              maxLength: 255
              minLength: 1
              pattern: (^$|^\S$|^\S.*\S$)
              type: string
              nullable: true
        postAddress:
          description: >-
            For NOR country postAddress is not allowed as is fetched from Brreg
            and should be null.
          nullable: true
          type: object
          properties:
            address:
              maxLength: 255
              minLength: 1
              pattern: (^$|^\S$|^\S.*\S$)
              type: string
              nullable: true
            zipCode:
              maxLength: 255
              minLength: 1
              pattern: (^$|^\S$|^\S.*\S$)
              type: string
              nullable: true
            city:
              maxLength: 255
              minLength: 1
              pattern: (^$|^\S$|^\S.*\S$)
              type: string
              nullable: true
            municipality:
              maxLength: 255
              minLength: 1
              pattern: (^$|^\S$|^\S.*\S$)
              type: string
              nullable: true
        locations:
          description: >-
            For NOR country locations is not allowed as they are fetched from
            Brreg and should be null.
          type: array
          nullable: true
          items:
            type: object
            properties:
              id:
                type: integer
                nullable: true
              companyNumber:
                maxLength: 255
                minLength: 1
                pattern: (^$|^\S$|^\S.*\S$)
                type: string
                nullable: true
              name:
                maxLength: 255
                minLength: 1
                pattern: (^$|^\S$|^\S.*\S$)
                type: string
                nullable: true
              visitAddress:
                type: object
                properties:
                  address:
                    maxLength: 255
                    minLength: 1
                    pattern: (^$|^\S$|^\S.*\S$)
                    type: string
                    nullable: true
                  zipCode:
                    maxLength: 255
                    minLength: 1
                    pattern: (^$|^\S$|^\S.*\S$)
                    type: string
                    nullable: true
                  city:
                    maxLength: 255
                    minLength: 1
                    pattern: (^$|^\S$|^\S.*\S$)
                    type: string
                    nullable: true
                  municipality:
                    maxLength: 255
                    minLength: 1
                    pattern: (^$|^\S$|^\S.*\S$)
                    type: string
                    nullable: true
              postAddress:
                type: object
                properties:
                  address:
                    maxLength: 255
                    minLength: 1
                    pattern: (^$|^\S$|^\S.*\S$)
                    type: string
                    nullable: true
                  zipCode:
                    maxLength: 255
                    minLength: 1
                    pattern: (^$|^\S$|^\S.*\S$)
                    type: string
                    nullable: true
                  city:
                    maxLength: 255
                    minLength: 1
                    pattern: (^$|^\S$|^\S.*\S$)
                    type: string
                    nullable: true
                  municipality:
                    maxLength: 255
                    minLength: 1
                    pattern: (^$|^\S$|^\S.*\S$)
                    type: string
                    nullable: true
        salarySystemCompanyId:
          maxLength: 30
          minLength: 1
          pattern: (^$|^\S$|^\S.*\S$)
          type: string
          nullable: true
        unitTypeId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
    getOrgUnitLocationsList:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              companyNumber:
                type: string
              name:
                type: string
              visitAddress:
                type: object
                nullable: true
                properties:
                  address:
                    type: string
                    nullable: true
                  zipCode:
                    type: string
                    nullable: true
                  city:
                    type: string
                    nullable: true
                  municipality:
                    type: string
                    nullable: true
              postAddress:
                type: object
                nullable: true
                properties:
                  address:
                    type: string
                    nullable: true
                  zipCode:
                    type: string
                    nullable: true
                  city:
                    type: string
                    nullable: true
                  municipality:
                    type: string
                    nullable: true
              externalId:
                type: string
            selectedCompanyNumber:
              type: string
              nullable: true
    getSkillTypeById:
      type: object
      required:
        - id
        - number
        - name
        - description
        - status
        - categories
        - cvCategories
        - privacy
        - defaultSkillStatus
        - createdAt
        - updatedAt
        - metaFields
        - sections
      properties:
        id:
          type: string
          format: uuid
        number:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        privacy:
          type: string
          enum:
            - public
            - myOrganization
            - myManagers
            - onlyMe
        defaultSkillStatus:
          type: string
          enum:
            - toBePlanned
            - planned
            - started
            - toBeApproved
            - approved
            - expired
        status:
          type: string
          enum:
            - active
            - draft
            - archived
        categories:
          type: array
          items:
            type: object
            required:
              - id
              - name
              - number
              - color
              - icon
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
              number:
                type: string
              color:
                type: string
                nullable: true
              icon:
                type: object
                nullable: true
                required:
                  - prefix
                  - iconName
                properties:
                  prefix:
                    type: string
                    enum:
                      - fas
                      - fab
                      - far
                      - fal
                      - fad
                  iconName:
                    type: string
                    minLength: 1
                    maxLength: 40
        cvCategories:
          type: array
          items:
            type: object
            required:
              - id
              - name
              - color
              - icon
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
              color:
                type: string
                nullable: true
              icon:
                type: object
                nullable: true
                required:
                  - prefix
                  - iconName
                properties:
                  prefix:
                    type: string
                    enum:
                      - fas
                      - fab
                      - far
                      - fal
                      - fad
                  iconName:
                    type: string
                    minLength: 1
                    maxLength: 40
        createdAt:
          type: string
        updatedAt:
          type: string
        metaFields:
          type: array
          items:
            type: object
            required:
              - id
              - nameTranslation
              - descriptionTranslation
              - visibility
              - value
              - options
            properties:
              id:
                type: string
                enum:
                  - administrator
                  - fixedUrl
                  - hoursOfDuration
                  - tags
              nameTranslation:
                type: string
              descriptionTranslation:
                type: string
              visibility:
                type: string
                enum:
                  - none
                  - visible
              value:
                nullable: true
              options:
                nullable: true
        sections:
          type: array
          items:
            type: object
            required:
              - id
              - nameTranslation
              - descriptionTranslation
              - fields
            properties:
              id:
                type: string
                enum:
                  - details
                  - skillProvider
                  - expiryPlanningAndScore
                  - attachmentsAndLinks
              nameTranslation:
                type: string
              descriptionTranslation:
                type: string
              fields:
                type: array
                items:
                  type: object
                  required:
                    - id
                    - nameTranslation
                    - descriptionTranslation
                    - visibility
                    - value
                    - options
                  properties:
                    id:
                      type: string
                      enum:
                        - skillTitle
                        - startedDate
                        - completedDate
                        - comment
                        - lengthOfExperience
                        - educationalLevel
                        - writtenLanguageSkillLevel
                        - oralLanguageSkillLevel
                        - internalExternal
                        - nameOfProvider
                        - countryOfProvider
                        - providerPlace
                        - targetScore
                        - currentScore
                        - expiryDate
                        - plannedCompletedDate
                        - requirement
                        - criticality
                        - userDefinedNotificationDate
                        - documents
                        - customUrl
                    nameTranslation:
                      type: string
                    descriptionTranslation:
                      type: string
                    visibility:
                      type: string
                      enum:
                        - none
                        - visible
                        - mandatory
                    value:
                      nullable: true
                    options:
                      nullable: true
    getPersonnelEmploymentsList:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              createdAt:
                type: string
              terminationDate:
                type: string
                nullable: true
              effectiveStatus:
                type: string
                nullable: true
              effectiveStatusDate:
                type: string
                nullable: true
              userStatus:
                type: string
                nullable: true
                enum:
                  - null
                  - active
                  - invited
                  - inactive
              userCalculatedStatus:
                type: string
                nullable: true
                enum:
                  - null
                  - active
                  - invited
                  - offboarding
                  - offboardingSoon
                  - inactive
                  - expired
                  - uninvited
              invitationDateTimestamp:
                type: integer
                nullable: true
              managerId:
                type: integer
                nullable: true
              company:
                type: object
                properties:
                  id:
                    type: integer
                    nullable: true
                  name:
                    type: string
                    nullable: true
                required:
                  - id
                  - name
              statusDate:
                type: string
                nullable: true
              validFrom:
                type: string
                nullable: true
              validTo:
                type: string
                nullable: true
              uuid:
                type: string
              mainWorkplace:
                type: string
                nullable: true
              referenceId:
                type: integer
                nullable: true
              externalId:
                type: string
                nullable: true
              isLastEmployment:
                type: boolean
              orgUnitManagerId:
                type: integer
                nullable: true
              employmentManagerId:
                type: integer
                nullable: true
              occupationalCode:
                type: string
                nullable: true
              employmentComment:
                type: string
                nullable: true
              employeeType:
                type: object
                nullable: true
                properties:
                  id:
                    type: string
                    format: uuid
                  typeId:
                    type: string
                  employeeType:
                    type: string
                  employmentType:
                    type: string
                  employmentTypeId:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - active
                      - archived
              personalJobDescription:
                type: string
                nullable: true
              positionTitle:
                type: string
                nullable: true
              jobDescription:
                type: string
                nullable: true
              probationPeriod:
                type: string
                nullable: true
              noticePeriod:
                type: string
                nullable: true
              terminateReason:
                type: string
                nullable: true
              companyLocation:
                type: object
                nullable: true
                properties:
                  companyNumber:
                    type: string
                    nullable: true
                  id:
                    type: integer
                  name:
                    type: string
                    nullable: true
                  visitAddress:
                    type: object
                    nullable: true
                    properties:
                      address:
                        type: string
                        nullable: true
                      zipCode:
                        type: string
                        nullable: true
                      city:
                        type: string
                        nullable: true
                      municipality:
                        type: string
                        nullable: true
                  postAddress:
                    type: object
                    nullable: true
                    properties:
                      address:
                        type: string
                        nullable: true
                      zipCode:
                        type: string
                        nullable: true
                      city:
                        type: string
                        nullable: true
                      municipality:
                        type: string
                        nullable: true
                  externalId:
                    type: string
                    minLength: 1
                    maxLength: 40
              country:
                type: string
                nullable: true
              startDate:
                type: string
              endDate:
                type: string
                nullable: true
              hasEmploymentLocation:
                type: boolean
              costPlace:
                type: string
                nullable: true
              salaryCurrency:
                type: string
                nullable: true
              salaryDefinition:
                type: string
                nullable: true
              salarySystemCompanyId:
                type: string
                nullable: true
                maxLength: 30
              salaryValue:
                type: string
                nullable: true
              salaryType:
                type: string
                nullable: true
              workRelationType:
                type: string
                nullable: true
              workingHoursPerWeek:
                type: number
                nullable: true
              workingHoursArrangement:
                type: string
                format: uuid
                nullable: true
              hrRoleId:
                type: string
              fteFactor:
                type: number
                nullable: true
                minimum: 0.00001
                maximum: 1
              presentFteFactor:
                type: number
                nullable: true
                minimum: 0.00001
                maximum: 1
              number:
                type: string
              documentStatus:
                type: string
                nullable: true
              employeeId:
                type: string
                description: >-
                  This is an external identifier of company-employee (employeeId
                  field)
                nullable: true
              jobId:
                type: integer
                nullable: true
              jobTitle:
                type: string
                nullable: true
              userId:
                type: string
                nullable: true
              userName:
                type: string
                nullable: true
              userPhoto:
                type: string
                nullable: true
              emailWork:
                type: string
                nullable: true
              phoneNumberWork:
                type: string
                nullable: true
              employmentStatus:
                type: string
                nullable: true
              employmentCalculatedStatus:
                type: string
                nullable: true
                enum:
                  - vacant
                  - active
                  - terminating
                  - former
                  - dueForTermination
                  - pastDueTermination
                  - pending
              remainingDays:
                type: integer
                nullable: true
              salarySeniorityDate:
                type: string
                nullable: true
              orgUnitId:
                type: integer
              orgUnitName:
                type: string
                nullable: true
              firstWorkingDay:
                type: string
                nullable: true
              lastWorkingDay:
                type: string
                nullable: true
        page:
          type: integer
        pages:
          type: integer
        limit:
          type: integer
        total:
          type: integer
    BadRequestResponse:
      required:
        - code
        - errors
        - message
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              field:
                type: string
    getFieldTemplatesList:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              title:
                type: string
    getOrgUntiById:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        unitId:
          type: string
        company:
          type: boolean
        ancestors:
          type: array
          items:
            type: integer
        descendants:
          type: array
          items:
            type: integer
        leaderId:
          type: integer
          nullable: true
        managerId:
          type: integer
          nullable: true
        managerIdExt:
          type: string
          nullable: true
        leader:
          type: object
          nullable: true
          properties:
            id:
              type: string
            displayName:
              type: string
            picture:
              type: string
          required:
            - id
            - displayName
            - picture
        ancestorLeaderId:
          type: integer
        ancestorLeader:
          type: object
          properties:
            id:
              type: string
            displayName:
              type: string
            picture:
              type: string
          required:
            - id
            - displayName
            - picture
        hasCompany:
          type: boolean
        fteSum:
          type: string
        employeeCount:
          type: integer
        companyId:
          type: integer
          nullable: true
        companyName:
          type: string
          nullable: true
        organizationNumber:
          type: string
          nullable: true
        companyCountry:
          type: string
          nullable: true
        companyLogoUrl:
          type: string
          nullable: true
        ancestorCompany:
          type: object
          nullable: true
          properties:
            companyCountry:
              type: string
              nullable: true
            organizationNumber:
              type: string
              nullable: true
            companyLogoUrl:
              type: string
              nullable: true
        locations:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              companyNumber:
                type: string
                nullable: true
              name:
                type: string
                nullable: true
              visitAddress:
                type: object
                nullable: true
                properties:
                  address:
                    type: string
                    nullable: true
                  zipCode:
                    type: string
                    nullable: true
                  city:
                    type: string
                    nullable: true
                  municipality:
                    type: string
                    nullable: true
              postAddress:
                type: object
                nullable: true
                properties:
                  address:
                    type: string
                    nullable: true
                  zipCode:
                    type: string
                    nullable: true
                  city:
                    type: string
                    nullable: true
                  municipality:
                    type: string
                    nullable: true
              externalId:
                type: string
                minLength: 1
                maxLength: 40
        selectedCompanyNumber:
          type: string
          nullable: true
        readyForPaymentMessage:
          type: string
          nullable: true
        status:
          type: string
        companyLocation:
          type: object
          nullable: true
          properties:
            companyNumber:
              type: string
              nullable: true
            id:
              type: integer
            name:
              type: string
              nullable: true
            visitAddress:
              type: object
              nullable: true
              properties:
                address:
                  type: string
                  nullable: true
                zipCode:
                  type: string
                  nullable: true
                city:
                  type: string
                  nullable: true
                municipality:
                  type: string
                  nullable: true
            postAddress:
              type: object
              nullable: true
              properties:
                address:
                  type: string
                  nullable: true
                zipCode:
                  type: string
                  nullable: true
                city:
                  type: string
                  nullable: true
                municipality:
                  type: string
                  nullable: true
            externalId:
              type: string
              nullable: true
        evolutionId:
          type: integer
          nullable: true
        parentId:
          type: integer
          nullable: true
        customFields:
          type: array
          items:
            type: object
            properties:
              fieldId:
                type: string
                format: uuid
              valueId:
                type: string
                nullable: true
                format: uuid
              fieldTemplateId:
                type: string
                nullable: true
                format: uuid
              field:
                type: string
              value:
                type: string
                nullable: true
              fieldTemplateName:
                type: string
                nullable: true
                maxLength: 40
              fieldExternalId:
                type: string
                maxLength: 40
              valueExternalId:
                type: string
                maxLength: 40
                nullable: true
              fieldTemplateExternalId:
                type: string
                nullable: true
                maxLength: 40
              fieldExternalName:
                type: string
                maxLength: 40
              valueExternalName:
                type: string
                maxLength: 40
                nullable: true
              fieldTemplateExternalName:
                type: string
                nullable: true
                maxLength: 40
              fieldCreatedAt:
                type: string
              fieldUpdatedAt:
                type: string
                nullable: true
              valueCreatedAt:
                type: string
              valueUpdatedAt:
                type: string
              createdAt:
                type: string
                nullable: true
              updatedAt:
                type: string
                nullable: true
              hasCustomFields:
                type: boolean
        unitTypeId:
          type: string
          format: uuid
    putChild:
      type: object
      required:
        - firstname
        - surname
        - chronicallySick
        - birthDate
        - singleParent
        - phoneNumber
      properties:
        firstname:
          type: string
          minLength: 1
          maxLength: 50
        surname:
          type: string
          minLength: 1
          maxLength: 50
        chronicallySick:
          type: object
          required:
            - from
            - to
          properties:
            from:
              type: string
              nullable: true
            to:
              type: string
              nullable: true
        birthDate:
          type: string
        singleParent:
          type: boolean
        phoneNumber:
          type: string
          nullable: true
          minLength: 1
          maxLength: 30
      additionalProperties: false
    getSkillTypeCategoriesList:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            required:
              - ancestors
              - children
              - color
              - createdAt
              - description
              - icon
              - id
              - level
              - name
              - number
            type: object
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
              description:
                type: string
              parentId:
                type: string
                nullable: true
              ancestors:
                type: array
                items:
                  type: string
              number:
                type: string
              color:
                type: string
                nullable: true
              icon:
                required:
                  - prefix
                  - iconName
                type: object
                nullable: true
                properties:
                  prefix:
                    type: string
                    enum:
                      - fas
                      - fab
                      - far
                      - fal
                      - fad
                  iconName:
                    type: string
                    maxLength: 40
                    minLength: 1
              level:
                type: integer
              children:
                type: array
                items:
                  type: object
              createdAt:
                type: string
    getStringId:
      type: object
      properties:
        id:
          type: string
    getPersonnelProfileById:
      type: object
      properties:
        id:
          type: string
        instanceEmployeeId:
          type: string
          nullable: true
        firstName:
          type: string
        surname:
          type: string
        dateOfBirth:
          type: string
        gender:
          type: string
          nullable: true
        nationality:
          type: string
          nullable: true
        addressLine1:
          type: string
        addressLine2:
          type: string
        zipCode:
          type: string
        city:
          type: string
        country:
          type: string
          nullable: true
        emailPrivate:
          type: string
        phoneNumberPrivate:
          type: string
        alias:
          type: string
          nullable: true
        maritalStatus:
          type: string
          nullable: true
        userPhoto:
          type: string
          nullable: true
        personalIdentification:
          type: object
          properties:
            idType:
              type: string
              enum:
                - ssn
                - alternative_id
                - none
            idNumber:
              type: string
            idCountry:
              type: string
            passportCountry:
              type: string
            passportNumber:
              type: string
        paymentDetails:
          type: object
          properties:
            countryOfBank:
              type: string
            accountNumber:
              type: string
        nextOfKin:
          type: array
          items:
            type: object
            required:
              - id
              - firstname
              - surname
              - comment
              - relationshipType
              - address
            properties:
              id:
                type: string
                format: uuid
              firstname:
                type: string
                minLength: 1
                maxLength: 50
              surname:
                type: string
                minLength: 1
                maxLength: 50
              comment:
                type: string
                nullable: true
                minLength: 1
                maxLength: 255
              relationshipType:
                type: string
                enum:
                  - notDefined
                  - children
                  - parent
                  - partner
                  - family
                  - friend
                  - other
                  - cohabitant
                  - mother
                  - father
                  - married
              address:
                type: object
                nullable: true
                required:
                  - email
                  - phone
                  - country
                  - city
                  - addressLine1
                  - addressLine2
                  - zipCode
                properties:
                  email:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                    format: email
                  phone:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 30
                  country:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 40
                    pattern: (^$|\S)
                  city:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 40
                    pattern: (^$|\S)
                  addressLine1:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 40
                    pattern: (^$|\S)
                  addressLine2:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 40
                    pattern: (^$|\S)
                  zipCode:
                    type: string
                    nullable: true
                    pattern: (^$|\S)
                    minLength: 1
                    maxLength: 40
        children:
          type: array
          items:
            type: object
            required:
              - id
              - firstname
              - surname
              - chronicallySick
              - birthDate
              - singleParent
              - phoneNumber
            properties:
              id:
                type: string
                format: uuid
              firstname:
                type: string
                minLength: 1
                maxLength: 50
              surname:
                type: string
                minLength: 1
                maxLength: 50
              chronicallySick:
                type: object
                properties:
                  from:
                    type: string
                    nullable: true
                  to:
                    type: string
                    nullable: true
              birthDate:
                type: string
              singleParent:
                type: boolean
              phoneNumber:
                type: string
                nullable: true
                minLength: 1
                maxLength: 30
        connectedEmployeeData:
          type: array
          items:
            type: object
            properties:
              employeeId:
                type: string
              organizationNumber:
                type: string
        integrations:
          type: object
          properties:
            v4:
              type: object
              properties:
                enabled:
                  type: boolean
        loginMethod:
          type: object
          properties:
            loginMethod:
              type: string
              enum:
                - NO_USER
                - AUTH0
                - ACTIVE_DIRECTORY
            activeDirectoryLogin:
              type: string
              nullable: true
            email:
              type: string
              nullable: true
        userCalculatedStatus:
          type: object
          properties:
            status:
              type: string
            remainingDays:
              type: integer
              nullable: true
    getPersonnelJobsList:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              title:
                type: string
              number:
                type: string
              description:
                type: string
                nullable: true
              createdAt:
                type: string
        page:
          type: integer
        pages:
          type: integer
        limit:
          type: integer
        total:
          type: integer
    putPersonnelJob:
      type: object
      required:
        - title
        - number
        - acl
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 40
          pattern: (^$|^\S$|^\S.*\S$)
        number:
          type: string
          minLength: 1
          maxLength: 40
          pattern: (^$|^\S$|^\S.*\S$)
        description:
          type: string
          nullable: true
          maxLength: 1000
          pattern: '(^$|^\S$|^\S[\s\S]*\S$)'
        status:
          type: string
          enum:
            - active
            - inactive
        categoryId:
          type: string
          format: uuid
        occupationalCodes:
          type: array
          items:
            type: object
            required:
              - country
              - code
            properties:
              country:
                type: string
                minLength: 1
                maxLength: 3
              code:
                type: string
                minLength: 1
                maxLength: 64
                description: Use only code number the without name
        acl:
          type: array
          minItems: 1
          items:
            type: object
            required:
              - subjectType
              - subjectId
              - setting
            properties:
              subjectType:
                type: string
              subjectId:
                type: string
              setting:
                type: string
                enum:
                  - allow
                  - deny
      additionalProperties: false
    postOrgUnit:
      type: object
      required:
        - name
        - unitTypeId
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          pattern: (^$|^\S$|^\S.*\S$)
        parentId:
          type: integer
          nullable: true
        unitId:
          type: string
          nullable: true
          minLength: 1
          maxLength: 40
          pattern: (^$|^\S$|^\S.*\S$)
        managerId:
          nullable: true
          type:
            - integer
        selectedCompanyNumber:
          nullable: true
          type: string
          pattern: (^$|^\S$|^\S.*\S$)
        customFields:
          type: array
          items:
            type: object
            required:
              - fieldId
              - valueId
            properties:
              fieldId:
                type: string
                format: uuid
              valueId:
                type: string
                format: uuid
        unitTypeId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
      additionalProperties: false
    postUserDocuments:
      required:
        - originalName
      type: object
      properties:
        originalName:
          maxLength: 255
          minLength: 1
          type: string
    putSkillTypeCategory:
      type: object
      required:
        - name
        - description
        - parentId
        - number
        - color
      properties:
        number:
          type: string
          minLength: 1
          maxLength: 40
        name:
          type: string
          minLength: 1
          maxLength: 40
        description:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
        color:
          type: string
          nullable: true
        icon:
          type: object
          nullable: true
          required:
            - prefix
            - iconName
          properties:
            prefix:
              type: string
              enum:
                - fas
                - fab
                - far
                - fal
                - fad
            iconName:
              type: string
              minLength: 1
              maxLength: 40
        parentId:
          type: string
          nullable: true
    postSkillOverviewList:
      type: object
      properties:
        query:
          type: string
          nullable: true
    putNextOfKin:
      type: object
      required:
        - firstname
        - surname
        - comment
        - relationshipType
        - address
      properties:
        firstname:
          type: string
          minLength: 1
          maxLength: 50
        surname:
          type: string
          minLength: 1
          maxLength: 50
        comment:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
        relationshipType:
          type: string
          enum:
            - notDefined
            - children
            - parent
            - partner
            - family
            - friend
            - other
            - cohabitant
            - mother
            - father
            - married
        address:
          type: object
          required:
            - email
            - phone
            - country
            - city
            - addressLine1
            - addressLine2
            - zipCode
          properties:
            email:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              format: email
            phone:
              type: string
              nullable: true
              minLength: 1
              maxLength: 30
            country:
              type: string
              nullable: true
              minLength: 1
              maxLength: 40
              pattern: (^$|\S)
            city:
              type: string
              nullable: true
              minLength: 1
              maxLength: 40
              pattern: (^$|\S)
            addressLine1:
              type: string
              nullable: true
              minLength: 1
              maxLength: 40
              pattern: (^$|\S)
            addressLine2:
              type: string
              nullable: true
              minLength: 1
              maxLength: 40
              pattern: (^$|\S)
            zipCode:
              type: string
              nullable: true
              pattern: (^$|\S)
              minLength: 1
              maxLength: 40
      additionalProperties: false
    getSkillList:
      type: object
      required:
        - items
        - total
        - limit
        - page
        - pages
      properties:
        items:
          type: array
          items:
            type: object
            required:
              - id
              - createdAt
              - updatedAt
              - metaFields
              - employment
              - status
              - privacy
              - programTemplateVersionId
              - lessonVersionId
              - skillType
              - fields
            properties:
              id:
                type: string
              createdAt:
                type: string
              updatedAt:
                type: string
              metaFields:
                type: object
                required:
                  - administrator
                  - fixedUrl
                  - hoursOfDuration
                  - tags
                properties:
                  administrator:
                    type: string
                    nullable: true
                  fixedUrl:
                    type: string
                    nullable: true
                  hoursOfDuration:
                    type: integer
                    nullable: true
                  tags:
                    type: array
                    nullable: true
                    items:
                      type: string
              employment:
                type: object
                nullable: true
                required:
                  - id
                  - jobTitle
                properties:
                  id:
                    type: integer
                  jobTitle:
                    type: string
              status:
                type: string
                enum:
                  - toBePlanned
                  - planned
                  - started
                  - toBeApproved
                  - approved
              privacy:
                type: string
                enum:
                  - public
                  - myOrganization
                  - myManagers
                  - onlyMe
              programTemplateVersionId:
                type: integer
                nullable: true
              lessonVersionId:
                type: integer
                nullable: true
              skillType:
                type: object
                required:
                  - id
                  - number
                  - name
                  - description
                  - categories
                properties:
                  id:
                    type: string
                  number:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  privacy:
                    type: string
                  categories:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                        - number
                        - color
                        - icon
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        number:
                          type: string
                        color:
                          type: string
                          nullable: true
                        icon:
                          type: object
                          nullable: true
                          required:
                            - prefix
                            - iconName
                          properties:
                            prefix:
                              type: string
                              enum:
                                - fas
                                - fab
                                - far
                                - fal
                                - fad
                            iconName:
                              type: string
                              minLength: 1
                              maxLength: 40
              fields:
                type: object
                required:
                  - skillTitle
                  - startedDate
                  - completedDate
                  - comment
                  - lengthOfExperience
                  - educationalLevel
                  - writtenLanguageSkillLevel
                  - oralLanguageSkillLevel
                  - documents
                  - customUrl
                  - internalExternal
                  - nameOfProvider
                  - countryOfProvider
                  - providerPlace
                  - targetScore
                  - currentScore
                  - expiryDate
                  - plannedCompletedDate
                  - userDefinedNotificationDate
                  - requirement
                  - criticality
                properties:
                  skillTitle:
                    type: string
                    nullable: true
                  startedDate:
                    type: string
                    nullable: true
                  completedDate:
                    type: string
                    nullable: true
                  comment:
                    type: string
                    nullable: true
                  lengthOfExperience:
                    type: string
                    nullable: true
                  educationalLevel:
                    type: integer
                    nullable: true
                  writtenLanguageSkillLevel:
                    type: integer
                    nullable: true
                  oralLanguageSkillLevel:
                    type: integer
                    nullable: true
                  documents:
                    type: array
                    nullable: true
                    items:
                      type: object
                      required:
                        - id
                        - originalName
                      properties:
                        id:
                          type: string
                        originalName:
                          type: string
                  customUrl:
                    type: string
                    nullable: true
                  internalExternal:
                    type: integer
                    nullable: true
                  nameOfProvider:
                    type: string
                    nullable: true
                  countryOfProvider:
                    type: string
                    nullable: true
                  providerPlace:
                    type: string
                    nullable: true
                  targetScore:
                    type: integer
                    nullable: true
                  currentScore:
                    type: integer
                    nullable: true
                  expiryDate:
                    type: string
                    nullable: true
                  plannedCompletedDate:
                    type: string
                    nullable: true
                  userDefinedNotificationDate:
                    type: string
                    nullable: true
                  requirement:
                    type: integer
                    nullable: true
        total:
          type: integer
        limit:
          type: integer
        page:
          type: integer
        pages:
          type: integer
    getSkill:
      type: object
      required:
        - id
        - createdAt
        - updatedAt
        - employment
        - status
        - privacy
        - programTemplateVersionId
        - lessonVersionId
        - skillType
        - fields
      properties:
        id:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
        metaFields:
          type: object
          required:
            - administrator
            - fixedUrl
            - hoursOfDuration
            - tags
          properties:
            administrator:
              type: string
              nullable: true
            fixedUrl:
              type: string
              nullable: true
            hoursOfDuration:
              type: integer
              nullable: true
            tags:
              type: array
              nullable: true
              items:
                type: string
        employment:
          type: object
          nullable: true
          required:
            - id
            - jobTitle
          properties:
            id:
              type: integer
            jobTitle:
              type: string
        status:
          type: string
          enum:
            - toBePlanned
            - planned
            - started
            - toBeApproved
            - approved
        privacy:
          type: string
          enum:
            - public
            - myOrganization
            - myManagers
            - onlyMe
        programTemplateVersionId:
          type: integer
          nullable: true
        lessonVersionId:
          type: integer
          nullable: true
        skillType:
          type: object
          required:
            - id
            - number
            - name
            - description
            - categories
          properties:
            id:
              type: string
            number:
              type: string
            name:
              type: string
            description:
              type: string
              nullable: true
            privacy:
              type: string
            categories:
              type: array
              items:
                type: object
                required:
                  - id
                  - name
                  - number
                  - color
                  - icon
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  number:
                    type: string
                  color:
                    type: string
                    nullable: true
                  icon:
                    type: object
                    nullable: true
                    required:
                      - prefix
                      - iconName
                    properties:
                      prefix:
                        type: string
                        enum:
                          - fas
                          - fab
                          - far
                          - fal
                          - fad
                      iconName:
                        type: string
                        minLength: 1
                        maxLength: 40
        fields:
          type: object
          required:
            - skillTitle
            - startedDate
            - completedDate
            - comment
            - lengthOfExperience
            - educationalLevel
            - writtenLanguageSkillLevel
            - oralLanguageSkillLevel
            - documents
            - customUrl
            - internalExternal
            - nameOfProvider
            - countryOfProvider
            - providerPlace
            - targetScore
            - currentScore
            - expiryDate
            - plannedCompletedDate
            - userDefinedNotificationDate
            - requirement
            - criticality
          properties:
            skillTitle:
              type: string
              nullable: true
            startedDate:
              type: string
              nullable: true
            completedDate:
              type: string
              nullable: true
            comment:
              type: string
              nullable: true
            lengthOfExperience:
              type: string
              nullable: true
            educationalLevel:
              type: integer
              nullable: true
            writtenLanguageSkillLevel:
              type: integer
              nullable: true
            oralLanguageSkillLevel:
              type: integer
              nullable: true
            documents:
              type: array
              nullable: true
              items:
                type: object
                required:
                  - id
                  - originalName
                properties:
                  id:
                    type: string
                  originalName:
                    type: string
            customUrl:
              type: string
              nullable: true
            internalExternal:
              type: integer
              nullable: true
            nameOfProvider:
              type: string
              nullable: true
            countryOfProvider:
              type: string
              nullable: true
            providerPlace:
              type: string
              nullable: true
            targetScore:
              type: integer
              nullable: true
            currentScore:
              type: integer
              nullable: true
            expiryDate:
              type: string
              nullable: true
            plannedCompletedDate:
              type: string
              nullable: true
            userDefinedNotificationDate:
              type: string
              nullable: true
            requirement:
              type: integer
              nullable: true
    putSkill:
      type: object
      required:
        - employmentId
        - status
        - privacy
        - fields
      properties:
        employmentId:
          type: integer
          nullable: true
        status:
          type: string
          enum:
            - toBePlanned
            - planned
            - started
            - toBeApproved
            - approved
        privacy:
          type: string
          enum:
            - public
            - myOrganization
            - myManagers
            - onlyMe
        fields:
          type: array
          description: >
            * Fields set as visible in the skill type configuration must be
            provided.

            * Fields set as not visible in the skill type configuration are not
            required, will be omitted and not updated.

            * Fields set as mandatory in the skill type configuration cannot be
            null.
          items:
            type: object
            required:
              - id
              - data
            properties:
              id:
                type: string
                enum:
                  - skillTitle
                  - startedDate
                  - completedDate
                  - comment
                  - lengthOfExperience
                  - educationalLevel
                  - writtenLanguageSkillLevel
                  - oralLanguageSkillLevel
                  - documents
                  - customUrl
                  - internalExternal
                  - nameOfProvider
                  - countryOfProvider
                  - providerPlace
                  - targetScore
                  - currentScore
                  - expiryDate
                  - plannedCompletedDate
                  - userDefinedNotificationDate
                  - requirement
                  - criticality
              data:
                description: |
                  * Allowed values depending on `id` field:
                    * `lengthOfExperience`, available suffixes:
                      * `y` for year(s)
                      * `m` for month(s)
                      * `w` for week(s)
                      * `d` for day(s)
                      * `h` for hour(s)
                    * `educationalLevel`:
                      * `1` for Primary school
                      * `2` for High school
                      * `3` for Certificate of apprenticeship
                      * `4` for Technical College
                      * `5` for Higher apprenticeship
                      * `6` for Academic credit
                      * `7` for Year study University/College
                      * `8` for 2-year University/College
                      * `9` for 3-year University/College
                      * `10` for Bachelor's degree
                      * `11` for Master's degree
                      * `12` for Ph.D.
                    * `writtenLanguageSkillLevel` and `oralLanguageSkillLevel`:
                      * `1` for Elementary proficiency
                      * `2` for Limited working proficiency
                      * `3` for Professional working proficiency
                      * `4` for Full professional proficiency
                      * `5` for Native or bilingual proficiency
                    * `internalExternal`:
                      * `1` for Internal
                      * `2` for External
                    * `targetScore` and `currentScore`:
                      * `1` for Some knowledge
                      * `2` for Competent
                      * `3` for Highly competent
                      * `4` for Expert
                    * `requirement`:
                      * `1` for Legal requirement
                      * `2` for ISO-requirement
                      * `3` for Internal requirement
                      * `4` for Other
                      * `5` for Customer requirement
                    * `criticality`:
                      * `1` for Optional
                      * `2` for Required
                      * `3` for Recommended
                      * `4` for Critical
    patchSkill:
      type: object
      properties:
        employmentId:
          type: integer
          nullable: true
        status:
          type: string
          enum:
            - toBePlanned
            - planned
            - started
            - toBeApproved
            - approved
        privacy:
          type: string
          enum:
            - public
            - myOrganization
            - myManagers
            - onlyMe
        fields:
          type: array
          description: >
            * Fields set as not visible in the skill type configuration will be
            omitted and not updated.
          items:
            type: object
            required:
              - id
              - data
            properties:
              id:
                type: string
                enum:
                  - skillTitle
                  - startedDate
                  - completedDate
                  - comment
                  - lengthOfExperience
                  - educationalLevel
                  - writtenLanguageSkillLevel
                  - oralLanguageSkillLevel
                  - documents
                  - customUrl
                  - internalExternal
                  - nameOfProvider
                  - countryOfProvider
                  - providerPlace
                  - targetScore
                  - currentScore
                  - expiryDate
                  - plannedCompletedDate
                  - userDefinedNotificationDate
                  - requirement
                  - criticality
              data:
                description: |
                  * Allowed values depending on `id` field:
                    * `lengthOfExperience`, available suffixes:
                      * `y` for year(s)
                      * `m` for month(s)
                      * `w` for week(s)
                      * `d` for day(s)
                      * `h` for hour(s)
                    * `educationalLevel`:
                      * `1` for Primary school
                      * `2` for High school
                      * `3` for Certificate of apprenticeship
                      * `4` for Technical College
                      * `5` for Higher apprenticeship
                      * `6` for Academic credit
                      * `7` for Year study University/College
                      * `8` for 2-year University/College
                      * `9` for 3-year University/College
                      * `10` for Bachelor's degree
                      * `11` for Master's degree
                      * `12` for Ph.D.
                    * `writtenLanguageSkillLevel` and `oralLanguageSkillLevel`:
                      * `1` for Elementary proficiency
                      * `2` for Limited working proficiency
                      * `3` for Professional working proficiency
                      * `4` for Full professional proficiency
                      * `5` for Native or bilingual proficiency
                    * `internalExternal`:
                      * `1` for Internal
                      * `2` for External
                    * `targetScore` and `currentScore`:
                      * `1` for Some knowledge
                      * `2` for Competent
                      * `3` for Highly competent
                      * `4` for Expert
                    * `requirement`:
                      * `1` for Legal requirement
                      * `2` for ISO-requirement
                      * `3` for Internal requirement
                      * `4` for Other
                      * `5` for Customer requirement
                    * `criticality`:
                      * `1` for Optional
                      * `2` for Required
                      * `3` for Recommended
                      * `4` for Critical
      additionalProperties: false
    SkillList:
      required:
        - items
        - limit
        - page
        - pages
        - total
      type: object
      properties:
        items:
          type: array
          items:
            required:
              - categories
              - createdAt
              - id
              - privacy
              - skillTypeName
              - status
              - updatedAt
            type: object
            properties:
              id:
                type: string
              skillTypeName:
                type: string
              categories:
                type: array
                items:
                  required:
                    - color
                    - icon
                    - id
                    - name
                    - number
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    number:
                      type: string
                    color:
                      type: string
                    icon:
                      required:
                        - iconName
                        - prefix
                      type: object
                      properties:
                        prefix:
                          type: string
                          enum:
                            - fas
                            - fab
                            - far
                            - fal
                            - fad
                        iconName:
                          maxLength: 40
                          minLength: 1
                          type: string
              status:
                type: string
              privacy:
                type: string
              createdAt:
                type: string
              updatedAt:
                type: string
        page:
          type: integer
        pages:
          type: integer
        limit:
          type: integer
        total:
          type: integer
    postSkillTypeCategory:
      required:
        - color
        - description
        - name
        - number
        - parentId
      type: object
      properties:
        name:
          type: string
          maxLength: 40
          minLength: 1
        description:
          type: string
          nullable: true
          maxLength: 255
          minLength: 1
        parentId:
          type: string
          nullable: true
        number:
          type: string
          maxLength: 40
          minLength: 1
        color:
          type: string
          nullable: true
          maxLength: 50
          minLength: 1
        icon:
          type: object
          nullable: true
          required:
            - iconName
            - prefix
          properties:
            prefix:
              type: string
              enum:
                - fas
                - fab
                - far
                - fal
                - fad
            iconName:
              type: string
              maxLength: 40
              minLength: 1
    getUserDocument:
      type: object
      properties:
        fileUrl:
          type: string
        id:
          type: string
    getOnboardingUserData:
      type: object
      properties:
        id:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        language:
          type: string
        seniorityDate:
          type: string
          nullable: true
        employeeId:
          type: string
          nullable: true
        idType:
          type: string
          nullable: true
        idCountry:
          type: string
          nullable: true
        idNumber:
          type: string
          nullable: true
        roles:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              title:
                type: string
    getUsersListActive:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              firstName:
                type: string
                nullable: true
              lastName:
                type: string
                nullable: true
              email:
                maxLength: 254
                type: string
                format: email
              language:
                minLength: 2
                type: string
              roles:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    title:
                      type: string
    postOnboardUser:
      type: object
      required:
        - user
        - employment
        - personalIdentification
      properties:
        user:
          type: object
          required:
            - firstName
            - lastName
          properties:
            id:
              type: string
              nullable: true
            firstName:
              type: string
              nullable: true
              maxLength: 50
              pattern: '(\S|(^(?![\s\S])))'
            lastName:
              type: string
              nullable: true
              maxLength: 40
              pattern: '(\S|(^(?![\s\S])))'
            email:
              type: string
              nullable: true
              format: email
              maxLength: 254
            language:
              type: string
              nullable: true
              minLength: 2
            dateOfBirth:
              type: string
              nullable: true
              format: date-time
            gender:
              type: string
              nullable: true
            activeDirectoryLogin:
              type: string
              nullable: true
            loginMethod:
              type: string
              enum:
                - AUTH0
                - ACTIVE_DIRECTORY
                - NO_USER
            phoneNumberPrivate:
              type: string
              nullable: true
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
            accountNumber:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
            countryOfBank:
              type: string
              nullable: true
              minLength: 1
              maxLength: 50
              pattern: (^$|^\S$|^\S.*\S$)
        personalIdentification:
          type: object
          properties:
            idType:
              type: string
              nullable: true
            idCountry:
              type: string
              nullable: true
            idNumber:
              type: string
              nullable: true
            passportCountry:
              type: string
              nullable: true
            passportNumber:
              type: string
              nullable: true
        employment:
          type: object
          required:
            - hrRoleId
            - jobId
            - startDate
            - orgUnitsWithAdvancedAccess
          properties:
            id:
              type: integer
              nullable: true
            number:
              type: string
              nullable: true
            phoneNumberWork:
              type: string
              nullable: true
              maxLength: 40
            emailWork:
              type: string
              nullable: true
              format: email
            startDate:
              type: string
            endDate:
              type: string
              nullable: true
            firstWorkingDay:
              type: string
              nullable: true
            lastWorkingDay:
              type: string
              nullable: true
            hrRoleId:
              type: string
            seniorityDate:
              type: string
              nullable: true
            salaryDefinition:
              type: string
              nullable: true
            salaryValue:
              type: string
              nullable: true
              minimum: 0
              maximum: 100000000000000000000
            fteFactor:
              type: number
              nullable: true
              minimum: 0.00001
              maximum: 1
            presentFteFactor:
              type: number
              nullable: true
              minimum: 0
              maximum: 1
            salarySeniorityDate:
              type: string
              nullable: true
            noticePeriod:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: '^[0-9]+[wmy]$'
            probationPeriod:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: '^[0-9]+[wmy]$'
            employeeType:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: \S
            comment:
              type: string
              nullable: true
              maxLength: 1000
            salaryCurrency:
              type: string
              nullable: true
              minLength: 3
              maxLength: 3
              pattern: \S
            mainWorkplace:
              type: string
              nullable: true
              minLength: 1
              maxLength: 36
              pattern: \S
            managerId:
              type: integer
              nullable: true
            orgUnitId:
              type: integer
              minimum: 1
            jobId:
              type: integer
            positionTitle:
              type: string
              nullable: true
              maxLength: 40
            personalJobDescription:
              type: string
              nullable: true
              maxLength: 1000
            costPlace:
              type: string
              nullable: true
              minLength: 1
              maxLength: 40
            location:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
            workRelationType:
              type: string
              nullable: true
              minLength: 1
              maxLength: 64
            workingHoursArrangement:
              type: string
              nullable: true
              minLength: 1
              maxLength: 64
            workingHoursPerWeek:
              type: number
              nullable: true
              minimum: 0
              maximum: 168
            occupationalCode:
              type: string
              nullable: true
              minLength: 1
              maxLength: 64
            externalId:
              type: string
              nullable: true
              minLength: 1
              maxLength: 40
            customFields:
              type: array
              items:
                type: object
                required:
                  - fieldId
                  - valueId
                properties:
                  fieldId:
                    type: string
                    format: uuid
                  valueId:
                    type: string
                    format: uuid
                additionalProperties: false
            orgUnitsWithAdvancedAccess:
              type: array
              nullable: true
              minItems: 1
              items:
                type: integer
        programTemplateId:
          type: integer
          nullable: true
        personalGreetings:
          type: string
          maxLength: 1024
        taskTemplateChanges:
          type: array
          nullable: true
          required:
            - taskTemplateId
            - actorEmploymentId
          items:
            type: object
            properties:
              taskTemplateId:
                type: integer
              actorEmploymentId:
                type: integer
        referenceDate:
          type: string
          nullable: true
        companyEmployee:
          type: object
          nullable: true
          properties:
            seniorityDate:
              type: string
              nullable: true
            employeeId:
              type: string
              nullable: true
            mainEmployer:
              type: boolean
              nullable: true
            salaryNumber:
              type: string
              nullable: true
              maxLength: 40
            selfSickness:
              type: string
              nullable: true
            freeEmployer:
              type: object
              nullable: true
              properties:
                from:
                  type: string
                  nullable: true
                to:
                  type: string
                  nullable: true
            workPermit:
              type: object
              nullable: true
              properties:
                from:
                  type: string
                  nullable: true
                to:
                  type: string
                  nullable: true
            terminationSeniorityDate:
              type: string
              nullable: true
            residencePermit:
              type: object
              nullable: true
              properties:
                from:
                  type: string
                  nullable: true
                to:
                  type: string
                  nullable: true
            readyForPayment:
              type: boolean
            customFields:
              type: array
              items:
                type: object
                required:
                  - fieldId
                  - valueId
                properties:
                  fieldId:
                    type: string
                    format: uuid
                  valueId:
                    type: string
                    format: uuid
                additionalProperties: false
            resourceType:
              type: integer
              nullable: true
    getHrRbacRole:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              title:
                type: string
              accessGroup:
                type: array
                items:
                  type: string
              accessLevel:
                required:
                  - id
                  - levels
                type: object
                properties:
                  id:
                    type: string
                  levels:
                    type: array
                    nullable: true
                    items:
                      type: string
              internal:
                type: boolean
              evolutionRoleCodes:
                type: array
                items:
                  type: string
              externalMappings:
                type: array
                items:
                  type: object
                  properties:
                    externalId:
                      type: string
                      nullable: true
                    systemName:
                      type: string
              mappingEnabled:
                type: boolean
    patchOrgstructureUnitCompany:
      type: object
      properties:
        name:
          description: >-
            For NOR country passing name is not allowed as its fetched from
            Brreg
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
          pattern: (^$|^\S$|^\S.*\S$)
        unitId:
          type: string
          minLength: 1
          maxLength: 40
          pattern: (^$|^\S$|^\S.*\S$)
        parentId:
          type: integer
          nullable: true
        managerId:
          type: integer
        organizationNumber:
          type: string
          minLength: 1
          maxLength: 255
          pattern: (^$|^\S$|^\S.*\S$)
        companyLogoUrl:
          type: string
          nullable: true
          maxLength: 255
          pattern: (^$|^\S$|^\S.*\S$)
        selectedCompanyNumber:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
          pattern: (^$|^\S$|^\S.*\S$)
        visitAddress:
          description: >-
            For NOR country visitAddress is not allowed as is fetched from Brreg
            and should be null.
          type: object
          nullable: true
          properties:
            address:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
            zipCode:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
            city:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
            municipality:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
        postAddress:
          description: >-
            For NOR country passing postAddress is not allowed as is fetched
            from Brreg.
          type: object
          nullable: true
          properties:
            address:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
            zipCode:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
            city:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
            municipality:
              type: string
              nullable: true
              minLength: 1
              maxLength: 255
              pattern: (^$|^\S$|^\S.*\S$)
        locations:
          description: >-
            For NOR country passing locations is not allowed as they are fetched
            from Brreg.
          type: array
          nullable: true
          items:
            type: object
            properties:
              id:
                type: integer
                nullable: true
              companyNumber:
                type: string
                nullable: true
                minLength: 1
                maxLength: 255
                pattern: (^$|^\S$|^\S.*\S$)
              name:
                type: string
                nullable: true
                minLength: 1
                maxLength: 255
                pattern: (^$|^\S$|^\S.*\S$)
              visitAddress:
                type: object
                properties:
                  address:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                    pattern: (^$|^\S$|^\S.*\S$)
                  zipCode:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                    pattern: (^$|^\S$|^\S.*\S$)
                  city:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                    pattern: (^$|^\S$|^\S.*\S$)
                  municipality:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                    pattern: (^$|^\S$|^\S.*\S$)
              postAddress:
                type: object
                properties:
                  address:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                    pattern: (^$|^\S$|^\S.*\S$)
                  zipCode:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                    pattern: (^$|^\S$|^\S.*\S$)
                  city:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                    pattern: (^$|^\S$|^\S.*\S$)
                  municipality:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 255
                    pattern: (^$|^\S$|^\S.*\S$)
        salarySystemCompanyId:
          type: string
          nullable: true
          minLength: 1
          maxLength: 30
          pattern: (^$|^\S$|^\S.*\S$)
        readyForPaymentMessage:
          type: string
          nullable: true
          maxLength: 1000
          pattern: (^$|^\S$|^\S.*\S$)
        customFields:
          type: array
          items:
            type: object
            required:
              - fieldId
              - valueId
            properties:
              fieldId:
                type: string
                format: uuid
              valueId:
                type: string
                format: uuid
                nullable: true
            additionalProperties: false
        unitTypeId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
      additionalProperties: false
    getPersonnelPeople:
      required:
        - items
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              userName:
                type: string
              userPhoto:
                type: string
              jobTitle:
                type: string
                nullable: true
              emailWork:
                type: string
                nullable: true
              phoneNumberWork:
                type: string
                nullable: true
              instanceUserId:
                type: integer
              employed:
                type: boolean
              employmentCount:
                type: integer
              employmentStatus:
                type: string
                nullable: true
                enum:
                  - offboarding
              employmentCalculatedStatus:
                type: string
                nullable: true
                enum:
                  - vacant
                  - active
                  - terminating
                  - former
                  - dueForTermination
                  - pastDueTermination
                  - pending
              remainingDays:
                type: integer
                nullable: true
              userStatus:
                type: string
                nullable: true
                enum:
                  - active
                  - invited
              userCalculatedStatus:
                type: string
                nullable: true
                enum:
                  - active
                  - invited
                  - invitedOffboarding
                  - offboarding
                  - offboardingSoon
                  - expired
              invitationDateTimestamp:
                type: integer
                nullable: true
              identityProvider:
                type: string
              hasUserEmail:
                type: boolean
              companyId:
                type: integer
                nullable: true
              primaryEmploymentId:
                type: integer
                nullable: true
              loginMethod:
                type: string
                enum:
                  - AUTH0
                  - NO_USER
                  - ACTIVE_DIRECTORY
              hasActiveDirectoryLogin:
                type: string
        total:
          type: integer
        limit:
          type: integer
        page:
          type: integer
        pages:
          type: integer
    patchSkillTypeStatus:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum:
            - active
            - draft
            - archived
    patchSkillType:
      type: object
      properties:
        number:
          type: string
          minLength: 1
          maxLength: 40
        name:
          type: string
          minLength: 1
          maxLength: 40
        description:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
        privacy:
          type: string
          enum:
            - public
            - myOrganization
            - myManagers
            - onlyMe
        defaultSkillStatus:
          type: string
          enum:
            - toBePlanned
            - planned
            - started
            - toBeApproved
            - approved
        categories:
          type: array
          items:
            type: string
            format: uuid
        cvCategories:
          type: array
          items:
            type: string
            format: uuid
        metaFields:
          type: array
          items:
            type: object
            required:
              - id
              - visibility
              - value
            properties:
              id:
                type: string
                enum:
                  - administrator
                  - fixedUrl
                  - hoursOfDuration
                  - tags
              visibility:
                type: string
                enum:
                  - none
                  - visible
              value:
                oneOf:
                  - type: integer
                  - type: string
                    maxLength: 255
                  - type: array
                    items:
                      type: string
                  - type: 'null'
        sections:
          type: array
          items:
            type: object
            required:
              - id
              - fields
            properties:
              id:
                type: string
                enum:
                  - details
                  - skillProvider
                  - expiryPlanningAndScore
                  - attachmentsAndLinks
              fields:
                type: array
                items:
                  type: object
                  required:
                    - id
                    - visibility
                  properties:
                    id:
                      type: string
                      enum:
                        - skillTitle
                        - startedDate
                        - completedDate
                        - comment
                        - lengthOfExperience
                        - educationalLevel
                        - writtenLanguageSkillLevel
                        - oralLanguageSkillLevel
                        - internalExternal
                        - nameOfProvider
                        - countryOfProvider
                        - providerPlace
                        - targetScore
                        - currentScore
                        - expiryDate
                        - plannedCompletedDate
                        - requirement
                        - criticality
                        - userDefinedNotificationDate
                        - documents
                        - customUrl
                    visibility:
                      type: string
                      enum:
                        - none
                        - visible
                        - mandatory
                    value:
                      oneOf:
                        - type: integer
                        - type: string
                          maxLength: 255
                        - type: array
                          items: {}
                        - type: object
                        - type: 'null'
    patchOrgstructureUnit:
      type: object
      required:
        - unitId
        - name
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          pattern: (^$|^\S$|^\S.*\S$)
        unitId:
          type: string
          minLength: 1
          maxLength: 40
          pattern: (^$|^\S$|^\S.*\S$)
        managerId:
          type: integer
          nullable: true
        parentId:
          type: integer
          nullable: true
        selectedCompanyNumber:
          type: string
          nullable: true
          pattern: (^$|^\S$|^\S.*\S$)
        customFields:
          type: array
          items:
            type: object
            properties:
              fieldId:
                type: string
                format: uuid
              valueId:
                type: string
                format: uuid
                nullable: true
            additionalProperties: false
        unitTypeId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
      additionalProperties: false
    patchPersonnelJob:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 40
          pattern: (^$|^\S$|^\S.*\S$)
        number:
          type: string
          minLength: 1
          maxLength: 40
          pattern: (^$|^\S$|^\S.*\S$)
        description:
          type: string
          nullable: true
          maxLength: 1000
          pattern: '(^$|^\S$|^\S[\s\S]*\S$)'
        status:
          type: string
          enum:
            - active
            - inactive
        categoryId:
          type: string
          format: uuid
        occupationalCodes:
          type: array
          items:
            type: object
            required:
              - country
              - code
            properties:
              country:
                type: string
              code:
                type: string
        acl:
          type: array
          minItems: 1
          items:
            type: object
            required:
              - subjectType
              - subjectId
              - setting
            properties:
              subjectType:
                type: string
              subjectId:
                type: string
              setting:
                type: string
                enum:
                  - allow
                  - deny
      additionalProperties: false
    postCreateUser:
      type: object
      required:
        - firstName
        - lastName
        - email
        - language
      properties:
        firstName:
          type: string
          nullable: true
          maxLength: 50
          pattern: \S
        lastName:
          type: string
          nullable: true
          maxLength: 40
          pattern: \S
        email:
          type: string
          format: email
          maxLength: 254
        language:
          type: string
          enum:
            - en
            - 'no'
          minLength: 2
      additionalProperties: false
  securitySchemes:
    api_gateway_authorizer:
      type: http
      scheme: bearer
      bearerFormat: JWT
