{
 "openapi": "3.1.0",
 "info": {
  "title": "Employees (HRMS)",
  "version": "20261030b",
  "description": "Open a worker for their work relationships, right to work, compliance, talent profile, goals, reviews and offboarding. A rehire is a new relationship and the same person, which is what keeps continuous service right."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "employees": {
    "type": "object",
    "required": [
     "employee_no",
     "first_name",
     "last_name",
     "hire_date"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "employee_no": {
      "type": "string",
      "description": "Employee number"
     },
     "user_id": {
      "type": "string",
      "format": "uuid",
      "description": "Signs in as"
     },
     "first_name": {
      "type": "string",
      "description": "First name"
     },
     "last_name": {
      "type": "string",
      "description": "Last name"
     },
     "email": {
      "type": "string",
      "description": "Email"
     },
     "worker_type": {
      "type": "string",
      "description": "Worker type"
     },
     "position_id": {
      "type": "string",
      "format": "uuid",
      "description": "Position"
     },
     "manager_id": {
      "type": "string",
      "format": "uuid",
      "description": "Manager"
     },
     "hire_date": {
      "type": "string",
      "format": "date",
      "description": "Hire date"
     },
     "termination_date": {
      "type": "string",
      "format": "date",
      "description": "Termination date",
      "readOnly": true
     },
     "pay_type": {
      "type": "string",
      "description": "Pay type",
      "enum": [
       "salary",
       "hourly"
      ]
     },
     "base_pay": {
      "type": "string",
      "format": "decimal",
      "description": "Base pay (annual salary or hourly rate)"
     },
     "currency": {
      "type": "string",
      "description": "Pay currency"
     },
     "work_state": {
      "type": "string",
      "description": "Work region"
     },
     "status": {
      "type": "string",
      "description": "Status"
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "person_id": {
      "type": "string",
      "format": "uuid",
      "description": "Same person as (rehire)"
     },
     "employment_type": {
      "type": "string",
      "description": "Employment type",
      "readOnly": true
     },
     "is_primary": {
      "type": "boolean",
      "description": "Is primary",
      "readOnly": true
     },
     "fte": {
      "type": "string",
      "format": "decimal",
      "description": "Fte",
      "readOnly": true
     },
     "standard_hours_week": {
      "type": "string",
      "format": "decimal",
      "description": "Standard hours week",
      "readOnly": true
     },
     "pay_frequency": {
      "type": "string",
      "description": "Paid"
     },
     "original_hire_date": {
      "type": "string",
      "format": "date",
      "description": "Original hire date",
      "readOnly": true
     },
     "seniority_date": {
      "type": "string",
      "format": "date",
      "description": "Seniority date",
      "readOnly": true
     },
     "probation_end_date": {
      "type": "string",
      "format": "date",
      "description": "Probation end date",
      "readOnly": true
     },
     "contract_end_date": {
      "type": "string",
      "format": "date",
      "description": "Contract end date",
      "readOnly": true
     },
     "notice_days": {
      "type": "integer",
      "description": "Notice days",
      "readOnly": true
     },
     "work_country": {
      "type": "string",
      "description": "Work country"
     },
     "work_location_id": {
      "type": "string",
      "format": "uuid",
      "description": "Work location"
     },
     "work_email": {
      "type": "string",
      "description": "Work email",
      "readOnly": true
     },
     "work_phone": {
      "type": "string",
      "description": "Work phone",
      "readOnly": true
     },
     "exempt": {
      "type": "boolean",
      "description": "Exempt",
      "readOnly": true
     },
     "union_code": {
      "type": "string",
      "description": "Union code",
      "readOnly": true
     },
     "termination_reason": {
      "type": "string",
      "description": "Termination reason",
      "readOnly": true
     },
     "termination_type": {
      "type": "string",
      "description": "Termination type",
      "readOnly": true
     },
     "eligible_for_rehire": {
      "type": "boolean",
      "description": "Eligible for rehire",
      "readOnly": true
     },
     "last_working_day": {
      "type": "string",
      "format": "date",
      "description": "Last working day",
      "readOnly": true
     },
     "grade_id": {
      "type": "string",
      "format": "uuid",
      "description": "Grade id",
      "readOnly": true
     },
     "agency_name": {
      "type": "string",
      "description": "Agency name",
      "readOnly": true
     },
     "agency_rate": {
      "type": "string",
      "format": "decimal",
      "description": "Agency rate",
      "readOnly": true
     },
     "purchase_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Purchase order id",
      "readOnly": true
     },
     "pay_group_id": {
      "type": "string",
      "format": "uuid",
      "description": "Pay group"
     },
     "resident_state": {
      "type": "string",
      "description": "State of residence"
     },
     "work_locality": {
      "type": "string",
      "description": "Work locality"
     },
     "resident_locality": {
      "type": "string",
      "description": "Home locality"
     },
     "holiday_calendar_id": {
      "type": "string",
      "format": "uuid",
      "description": "Holiday calendar"
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "pan": {
      "type": "string",
      "description": "Pan",
      "readOnly": true
     },
     "aadhaar_last4": {
      "type": "string",
      "description": "Aadhaar last4",
      "readOnly": true
     },
     "uan": {
      "type": "string",
      "description": "India statutory: UAN"
     },
     "pf_number": {
      "type": "string",
      "description": "Pf number",
      "readOnly": true
     },
     "esi_number": {
      "type": "string",
      "description": "Esi number",
      "readOnly": true
     },
     "basic_wage": {
      "type": "string",
      "format": "decimal",
      "description": "Statutory pay: basic wage (monthly)"
     },
     "dearness_allowance": {
      "type": "string",
      "format": "decimal",
      "description": "India statutory: dearness allowance (monthly)"
     },
     "hra": {
      "type": "string",
      "format": "decimal",
      "description": "India statutory: house rent allowance (monthly)"
     },
     "special_allowance": {
      "type": "string",
      "format": "decimal",
      "description": "India statutory: special allowance (monthly)"
     },
     "pt_state_code": {
      "type": "string",
      "description": "India statutory: professional tax state",
      "enum": [
       "01 Jammu and Kashmir",
       "02 Himachal Pradesh",
       "03 Punjab",
       "04 Chandigarh",
       "05 Uttarakhand",
       "06 Haryana",
       "07 Delhi",
       "08 Rajasthan",
       "09 Uttar Pradesh",
       "10 Bihar",
       "11 Sikkim",
       "12 Arunachal Pradesh",
       "13 Nagaland",
       "14 Manipur",
       "15 Mizoram",
       "16 Tripura",
       "17 Meghalaya",
       "18 Assam",
       "19 West Bengal",
       "20 Jharkhand",
       "21 Odisha",
       "22 Chhattisgarh",
       "23 Madhya Pradesh",
       "24 Gujarat",
       "26 Dadra and Nagar Haveli and Daman and Diu",
       "27 Maharashtra",
       "29 Karnataka",
       "30 Goa",
       "31 Lakshadweep",
       "32 Kerala",
       "33 Tamil Nadu",
       "34 Puducherry",
       "35 Andaman and Nicobar Islands",
       "36 Telangana",
       "37 Andhra Pradesh",
       "38 Ladakh",
       "97 Other Territory"
      ]
     },
     "is_pf_applicable": {
      "type": "boolean",
      "description": "India statutory: EPF applies"
     },
     "is_esi_applicable": {
      "type": "boolean",
      "description": "India statutory: ESI applies"
     },
     "tax_regime": {
      "type": "string",
      "description": "India statutory: income tax regime",
      "enum": [
       "new",
       "old"
      ]
     },
     "ifsc": {
      "type": "string",
      "description": "Ifsc",
      "readOnly": true
     },
     "housing_allowance": {
      "type": "string",
      "format": "decimal",
      "description": "Saudi payroll: housing allowance (monthly)"
     },
     "transport_allowance": {
      "type": "string",
      "format": "decimal",
      "description": "Saudi payroll: transport allowance (monthly)"
     },
     "gosi_number": {
      "type": "string",
      "description": "Saudi payroll: GOSI number"
     },
     "gosi_category": {
      "type": "string",
      "description": "Saudi payroll: GOSI category",
      "enum": [
       "Saudi national",
       "Non-Saudi"
      ]
     },
     "gosi_registered_on": {
      "type": "string",
      "format": "date",
      "description": "Saudi payroll: first registered with GOSI"
     },
     "iqama_number": {
      "type": "string",
      "description": "Saudi payroll: iqama or national ID"
     },
     "merged_into_id": {
      "type": "string",
      "format": "uuid",
      "description": "Merged into id",
      "readOnly": true
     },
     "overtime_rule_id": {
      "type": "string",
      "format": "uuid",
      "description": "Overtime rule"
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/employees": {
   "get": {
    "summary": "list employees",
    "operationId": "list_employees_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create employees",
    "operationId": "create_employees_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}": {
   "get": {
    "summary": "get employees",
    "operationId": "get_employees_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change employees",
    "operationId": "change_employees_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete employees",
    "operationId": "delete_employees_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "patch": {
    "summary": "Patch employees",
    "operationId": "action_employees_3_5",
    "description": "Body keys: currency",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}/wps-account": {
   "post": {
    "summary": "Wps account",
    "operationId": "action_employees_0_6",
    "description": "Body keys: iban, bankCode*, accountName, reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}/home-address": {
   "put": {
    "summary": "Home address",
    "operationId": "action_employees_0_6",
    "description": "Body keys: address_line1, reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Home address",
    "operationId": "action_employees_1_6",
    "description": "Body keys: address_line1, reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}/ssn": {
   "get": {
    "summary": "Ssn",
    "operationId": "action_employees_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Ssn",
    "operationId": "action_employees_1_6",
    "description": "Body keys: ssn",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}/clearance": {
   "get": {
    "summary": "Clearance",
    "operationId": "action_employees_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}/worker-profile": {
   "get": {
    "summary": "Worker profile",
    "operationId": "action_employees_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}/offboard": {
   "post": {
    "summary": "Offboard",
    "operationId": "action_employees_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_employees_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}/terminate": {
   "post": {
    "summary": "Terminate",
    "operationId": "action_employees_0_6",
    "description": "Body keys: effectiveDate*, reason, separationType",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}/plan-separation": {
   "post": {
    "summary": "Plan separation",
    "operationId": "action_employees_0_6",
    "description": "Body keys: effectiveDate*, reason, separationType",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}/change-status": {
   "post": {
    "summary": "Change status",
    "operationId": "action_employees_0_6",
    "description": "Body keys: status, effectiveDate, reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employees/{id}/cancel-scheduled-change": {
   "post": {
    "summary": "Cancel scheduled change",
    "operationId": "action_employees_0_6",
    "description": "Body keys: actionId, reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}