{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/peoplehr/main/json-schema/peoplehr-post-absence-request-schema.json",
  "title": "PostAbsenceRequest",
  "x-generated": "2026-10-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/peoplehr-openapi-generated.yml#/components/schemas/PostAbsenceRequest",
  "type": "object",
  "properties": {
    "APIKey": {
      "type": "string",
      "description": "API key for the Absence schema"
    },
    "Action": {
      "type": "string",
      "description": "Must be set to \"AddNewAbsence\""
    },
    "EmployeeId": {
      "type": "string",
      "description": "Employee identifier"
    },
    "DurationType": {
      "type": "string",
      "description": "1 = day or more, 2 = half day, 3 = quarter day"
    },
    "Reason": {
      "type": "string",
      "description": "Reason for the absence"
    },
    "StartDate": {
      "type": "string",
      "description": "Start date of the absence (YYYY‑MM‑DD)"
    },
    "EndDate": {
      "type": "string",
      "description": "End date of the absence (YYYY‑MM‑DD)"
    },
    "Duration": {
      "type": "string",
      "description": "Length of the absence in days"
    },
    "PartOfDay": {
      "type": "string",
      "description": "AM / PM for part‑day absences"
    },
    "AbsencePaidStatus": {
      "type": "string",
      "description": "1 = UNPAID, 2 = PAID, 3 = PAID_AT_OTHER_RATE"
    },
    "EmergencyLeave": {
      "type": "string",
      "description": "Boolean string indicating emergency leave"
    },
    "AddComments": {
      "type": "array",
      "description": "Optional collection of comment objects"
    },
    "AddFiles": {
      "type": "array",
      "description": "Optional collection of file objects (DocumentName, File, Description)"
    }
  },
  "required": [
    "APIKey",
    "Action",
    "EmployeeId",
    "DurationType",
    "Reason",
    "StartDate",
    "EndDate",
    "Duration",
    "AbsencePaidStatus",
    "EmergencyLeave"
  ]
}