{
 "openapi": "3.1.0",
 "info": {
  "title": "Possible Duplicate Employees (HRMS)",
  "version": "20261030b",
  "description": "Every employee whose name matches another record together with an email, a national identifier (such as an Iqama number), the same position and hire date, or the same person record; every employee with the same email, or simply the same name, as another current employee (namesakes stay listed until somebody records that they are different people) -- and every current employee who looks like a FORMER employee held as a different person (a possible rehire). Open both to compare. The same person hired back: choose Same person -- link as rehire, and the employment joins the person of the former employee, keeping its own pay and records. Different people: choose Not a duplicate and say why (or say why when saving with Create anyway), and the pair leaves this list."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "employee-duplicates": {
    "type": "object",
    "required": [],
    "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 no",
      "readOnly": true
     },
     "user_id": {
      "type": "string",
      "format": "uuid",
      "description": "User id",
      "readOnly": true
     },
     "first_name": {
      "type": "string",
      "description": "First name",
      "readOnly": true
     },
     "last_name": {
      "type": "string",
      "description": "Last name",
      "readOnly": true
     },
     "email": {
      "type": "string",
      "description": "Email",
      "readOnly": true
     },
     "worker_type": {
      "type": "string",
      "description": "Worker type",
      "readOnly": true
     },
     "position_id": {
      "type": "string",
      "format": "uuid",
      "description": "Position id",
      "readOnly": true
     },
     "manager_id": {
      "type": "string",
      "format": "uuid",
      "description": "Manager id",
      "readOnly": true
     },
     "hire_date": {
      "type": "string",
      "format": "date",
      "description": "Hire date",
      "readOnly": true
     },
     "termination_date": {
      "type": "string",
      "format": "date",
      "description": "Termination date",
      "readOnly": true
     },
     "pay_type": {
      "type": "string",
      "description": "Pay type",
      "readOnly": true
     },
     "base_pay": {
      "type": "string",
      "format": "decimal",
      "description": "Base pay",
      "readOnly": true
     },
     "currency": {
      "type": "string",
      "description": "Currency",
      "readOnly": true
     },
     "work_state": {
      "type": "string",
      "description": "Work state",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "person_id": {
      "type": "string",
      "format": "uuid",
      "description": "Person id",
      "readOnly": true
     },
     "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": "Pay frequency",
      "readOnly": true
     },
     "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",
      "readOnly": true
     },
     "work_location_id": {
      "type": "string",
      "format": "uuid",
      "description": "Work location id",
      "readOnly": true
     },
     "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 id",
      "readOnly": true
     },
     "resident_state": {
      "type": "string",
      "description": "Resident state",
      "readOnly": true
     },
     "work_locality": {
      "type": "string",
      "description": "Work locality",
      "readOnly": true
     },
     "resident_locality": {
      "type": "string",
      "description": "Resident locality",
      "readOnly": true
     },
     "holiday_calendar_id": {
      "type": "string",
      "format": "uuid",
      "description": "Holiday calendar id",
      "readOnly": true
     },
     "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": "Uan",
      "readOnly": true
     },
     "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": "Basic wage",
      "readOnly": true
     },
     "dearness_allowance": {
      "type": "string",
      "format": "decimal",
      "description": "Dearness allowance",
      "readOnly": true
     },
     "hra": {
      "type": "string",
      "format": "decimal",
      "description": "Hra",
      "readOnly": true
     },
     "special_allowance": {
      "type": "string",
      "format": "decimal",
      "description": "Special allowance",
      "readOnly": true
     },
     "pt_state_code": {
      "type": "string",
      "description": "Pt state code",
      "readOnly": true
     },
     "is_pf_applicable": {
      "type": "boolean",
      "description": "Is pf applicable",
      "readOnly": true
     },
     "is_esi_applicable": {
      "type": "boolean",
      "description": "Is esi applicable",
      "readOnly": true
     },
     "tax_regime": {
      "type": "string",
      "description": "Tax regime",
      "readOnly": true
     },
     "ifsc": {
      "type": "string",
      "description": "Ifsc",
      "readOnly": true
     },
     "housing_allowance": {
      "type": "string",
      "format": "decimal",
      "description": "Housing allowance",
      "readOnly": true
     },
     "transport_allowance": {
      "type": "string",
      "format": "decimal",
      "description": "Transport allowance",
      "readOnly": true
     },
     "gosi_number": {
      "type": "string",
      "description": "Gosi number",
      "readOnly": true
     },
     "gosi_category": {
      "type": "string",
      "description": "Gosi category",
      "readOnly": true
     },
     "gosi_registered_on": {
      "type": "string",
      "format": "date",
      "description": "Gosi registered on",
      "readOnly": true
     },
     "iqama_number": {
      "type": "string",
      "description": "Iqama number",
      "readOnly": true
     },
     "merged_into_id": {
      "type": "string",
      "format": "uuid",
      "description": "Merged into id",
      "readOnly": true
     },
     "overtime_rule_id": {
      "type": "string",
      "format": "uuid",
      "description": "Overtime rule id",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/employee-duplicates": {
   "get": {
    "summary": "list employee-duplicates",
    "operationId": "list_employee_duplicates_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post possible duplicate employees",
    "operationId": "action_employee_duplicates_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employee-duplicates/{id}": {
   "get": {
    "summary": "get employee-duplicates",
    "operationId": "get_employee_duplicates_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put possible duplicate employees",
    "operationId": "action_employee_duplicates_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete possible duplicate employees",
    "operationId": "action_employee_duplicates_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employee-duplicates/{id}/not-duplicate": {
   "post": {
    "summary": "Not duplicate",
    "operationId": "action_employee_duplicates_0_6",
    "description": "Body keys: reason*",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/employee-duplicates/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_employee_duplicates_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"
     }
    }
   }
  }
 }
}