{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.workday.com/worker",
  "title": "Worker",
  "description": "Represents an employee or contingent worker within the Workday Human Capital Management system, including personal data, employment information, and organizational assignments.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique Workday identifier for the worker"
    },
    "descriptor": {
      "type": "string",
      "description": "The display name of the worker"
    },
    "workerID": {
      "type": "string",
      "description": "The employee or contingent worker ID (e.g., EMP-001)"
    },
    "workerType": {
      "$ref": "#/$defs/ResourceReference",
      "description": "The type of worker (Employee or Contingent Worker)"
    },
    "businessTitle": {
      "type": "string",
      "description": "The current business title of the worker"
    },
    "primaryWorkEmail": {
      "type": "string",
      "format": "email",
      "description": "The primary work email address"
    },
    "primaryWorkPhone": {
      "type": "string",
      "description": "The primary work phone number"
    },
    "supervisoryOrganization": {
      "$ref": "#/$defs/ResourceReference",
      "description": "The supervisory organization to which the worker belongs"
    },
    "managementLevel": {
      "$ref": "#/$defs/ResourceReference",
      "description": "The management level of the worker"
    },
    "location": {
      "$ref": "#/$defs/ResourceReference",
      "description": "The work location of the worker"
    },
    "hireDate": {
      "type": "string",
      "format": "date",
      "description": "The date the worker was hired"
    },
    "terminationDate": {
      "type": ["string", "null"],
      "format": "date",
      "description": "The date the worker was terminated, if applicable"
    },
    "position": {
      "$ref": "#/$defs/ResourceReference",
      "description": "The position the worker currently holds"
    },
    "jobProfile": {
      "$ref": "#/$defs/ResourceReference",
      "description": "The job profile associated with the worker's position"
    },
    "isActive": {
      "type": "boolean",
      "description": "Whether the worker is currently active"
    },
    "photo": {
      "type": "string",
      "format": "uri",
      "description": "URL to the worker's photo"
    }
  },
  "required": ["id", "descriptor"],
  "$defs": {
    "ResourceReference": {
      "type": "object",
      "description": "A reference to a Workday resource",
      "properties": {
        "id": {
          "type": "string",
          "description": "The Workday ID of the referenced resource"
        },
        "descriptor": {
          "type": "string",
          "description": "The display name of the referenced resource"
        },
        "href": {
          "type": "string",
          "format": "uri",
          "description": "The API resource URL"
        }
      },
      "required": ["id"]
    }
  }
}
