{
  "$schema": "https://json-structure.org/draft/2025/schema",
  "title": "Paychex Worker Structure",
  "description": "JSON Structure documentation of the Paychex Flex Worker resource exposed by the Workers API.",
  "type": "object",
  "properties": {
    "workerId": { "type": "string", "role": "identifier" },
    "companyId": { "type": "string", "role": "tenant-identifier" },
    "workerType": { "type": "string", "role": "classification" },
    "workerStatus": { "type": "string", "role": "lifecycle-status" },
    "name": {
      "type": "object",
      "properties": {
        "givenName": { "type": "string" },
        "middleName": { "type": "string" },
        "familyName": { "type": "string" },
        "preferredName": { "type": "string" }
      }
    },
    "employment": {
      "type": "object",
      "properties": {
        "hireDate": { "type": "string", "format": "date" },
        "terminationDate": { "type": "string", "format": "date" },
        "jobTitle": { "type": "string" },
        "departmentCode": { "type": "string" },
        "payFrequency": { "type": "string" },
        "payType": { "type": "string" },
        "baseRate": { "type": "number" }
      }
    }
  },
  "required": ["workerId", "companyId"]
}
