{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/avetta/main/json-schema/avetta-3-29-14-integrate-employee-resource-schema.json",
  "title": "3.29.14_IntegrateEmployeeResource",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/avetta-pegasus-openapi.yml#/components/schemas/3.29.14_IntegrateEmployeeResource",
  "required": [
    "extSysKey",
    "firstName",
    "idKey",
    "lastName"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32"
    },
    "extSysKey": {
      "maxLength": 255,
      "minLength": 0,
      "type": "string"
    },
    "idKey": {
      "maxLength": 255,
      "minLength": 0,
      "type": "string"
    },
    "companyId": {
      "type": "integer",
      "format": "int32"
    },
    "firstName": {
      "maxLength": 35,
      "minLength": 0,
      "type": "string"
    },
    "lastName": {
      "maxLength": 45,
      "minLength": 0,
      "type": "string"
    },
    "dob": {
      "type": "string"
    },
    "email": {
      "maxLength": 255,
      "minLength": 0,
      "type": "string"
    },
    "locale": {
      "maxLength": 5,
      "minLength": 0,
      "type": "string"
    },
    "address": {
      "$ref": "#/$defs/3.29.14_AddressResource"
    },
    "active": {
      "type": "boolean"
    },
    "department": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string"
    },
    "employeeNumber": {
      "maxLength": 30,
      "minLength": 0,
      "type": "string"
    },
    "requestId": {
      "type": "string"
    },
    "middleName": {
      "type": "string"
    },
    "gender": {
      "type": "string",
      "enum": [
        "UNSET",
        "F",
        "M",
        "OTHER",
        "PREFER_NOT_TO_SAY"
      ]
    },
    "pendingStatus": {
      "type": "string",
      "enum": [
        "started",
        "submitted",
        "forAssessment",
        "forEndorsement",
        "approved",
        "returned",
        "rejected",
        "terminated"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "APPROVED",
        "ARCHIVED"
      ]
    },
    "phone": {
      "maxLength": 50,
      "minLength": 0,
      "type": "string"
    },
    "phone2": {
      "maxLength": 50,
      "minLength": 0,
      "type": "string"
    },
    "licenseResource": {
      "$ref": "#/$defs/3.29.14_DriversLicenseResource"
    },
    "nextOfKin": {
      "$ref": "#/$defs/3.29.14_NextOfKinResource"
    },
    "previousAddress": {
      "$ref": "#/$defs/3.29.14_PreviousAddressResource"
    },
    "previousPhone": {
      "maxLength": 50,
      "minLength": 0,
      "type": "string"
    },
    "previousEmail": {
      "maxLength": 255,
      "minLength": 0,
      "type": "string"
    },
    "alternativeEmail": {
      "maxLength": 255,
      "minLength": 0,
      "type": "string"
    },
    "trainingEmail": {
      "maxLength": 255,
      "minLength": 0,
      "type": "string"
    },
    "employmentStatus": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string"
    },
    "businessUnit": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string"
    },
    "division": {
      "maxLength": 100,
      "minLength": 0,
      "type": "string"
    },
    "position": {
      "maxLength": 128,
      "minLength": 0,
      "type": "string"
    },
    "authoriser": {
      "maxLength": 40,
      "minLength": 0,
      "type": "string"
    },
    "comment": {
      "type": "string"
    },
    "personTypes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "SITE_CONTACT",
          "PERSONAL_CONTACT",
          "USER",
          "EMPLOYEE",
          "CONTRACTOR",
          "VISITOR",
          "SUPERUSER",
          "UNICORN_USER",
          "INVALID_PERSON",
          "MASTERKEY",
          "CARDHOLDER",
          "PAST_CARDHOLDER",
          "INVISIBLE",
          "IMPOSSIBLE"
        ]
      }
    },
    "universalStudentIdentifier": {
      "maxLength": 50,
      "minLength": 0,
      "type": "string"
    },
    "personId": {
      "type": "integer",
      "format": "int32"
    },
    "firstLastName": {
      "type": "string"
    },
    "lastFirstName": {
      "type": "string"
    }
  },
  "$defs": {
    "3.29.14_AddressResource": {
      "required": [
        "country"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "address": {
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "town": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "state": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "postcode": {
          "maxLength": 15,
          "minLength": 0,
          "type": "string"
        },
        "country": {
          "maxLength": 2,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "3.29.14_DriversLicenseResource": {
      "required": [
        "driversLicenseClass",
        "driversLicenseNumber",
        "driversLicenseState"
      ],
      "type": "object",
      "properties": {
        "driversLicenseNumber": {
          "maxLength": 20,
          "minLength": 0,
          "type": "string"
        },
        "driversLicenseState": {
          "maxLength": 20,
          "minLength": 0,
          "type": "string"
        },
        "driversLicenseClass": {
          "maxLength": 40,
          "minLength": 0,
          "type": "string"
        },
        "driversLicenseExpiry": {
          "type": "string"
        }
      }
    },
    "3.29.14_NextOfKinResource": {
      "type": "object",
      "properties": {
        "firstName": {
          "maxLength": 35,
          "minLength": 0,
          "type": "string"
        },
        "lastName": {
          "maxLength": 45,
          "minLength": 0,
          "type": "string"
        },
        "phone": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "email": {
          "maxLength": 255,
          "minLength": 0,
          "type": "string"
        },
        "relationship": {
          "type": "string",
          "enum": [
            "SPOUSE",
            "PARTNER",
            "MOTHER",
            "FATHER",
            "BROTHER",
            "SISTER",
            "SON",
            "DAUGHTER",
            "BOYFRIEND",
            "GIRLFRIEND",
            "SON_IN_LAW",
            "DAUGHTER_IN_LAW",
            "MOTHER_IN_LAW",
            "FATHER_IN_LAW",
            "OTHER",
            "DOCTOR"
          ]
        },
        "updateTime": {
          "type": "string"
        }
      }
    },
    "3.29.14_PreviousAddressResource": {
      "required": [
        "country"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "address": {
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        },
        "town": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "state": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "postcode": {
          "maxLength": 15,
          "minLength": 0,
          "type": "string"
        },
        "country": {
          "maxLength": 2,
          "minLength": 0,
          "type": "string"
        }
      }
    }
  }
}