{
 "openapi": "3.1.0",
 "info": {
  "title": "Offboarding (HRMS)",
  "version": "20261030b",
  "description": "Leaving, including retirement — the exit conversation, the final pay, the assets, the access, and the obligations that outlive the employment."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "offboarding": {
    "type": "object",
    "required": [
     "employee_id",
     "leaving_type",
     "termination_date"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Employee"
     },
     "work_relationship_id": {
      "type": "string",
      "format": "uuid",
      "description": "Work relationship id"
     },
     "offboarding_no": {
      "type": "string",
      "description": "Offboarding no",
      "readOnly": true
     },
     "leaving_type": {
      "type": "string",
      "description": "How it is ending",
      "enum": [
       "resignation",
       "dismissal",
       "redundancy",
       "retirement",
       "end_of_contract",
       "death",
       "mutual",
       "transfer",
       "tupe"
      ]
     },
     "reason": {
      "type": "string",
      "description": "Reason"
     },
     "is_retirement": {
      "type": "boolean",
      "description": "Retirement"
     },
     "retirement_type": {
      "type": "string",
      "description": "Retirement type",
      "enum": [
       "normal",
       "early",
       "ill_health",
       "phased",
       "deferred"
      ]
     },
     "pension_scheme": {
      "type": "string",
      "description": "Pension scheme"
     },
     "pension_start_date": {
      "type": "string",
      "format": "date",
      "description": "Pension starts"
     },
     "is_phased": {
      "type": "boolean",
      "description": "Phased"
     },
     "phased_hours_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Phased hours %"
     },
     "notified_on": {
      "type": "string",
      "format": "date",
      "description": "Notified on"
     },
     "last_working_day": {
      "type": "string",
      "format": "date",
      "description": "Last working day"
     },
     "termination_date": {
      "type": "string",
      "format": "date",
      "description": "Termination date"
     },
     "notice_worked": {
      "type": "boolean",
      "description": "Notice worked"
     },
     "notice_paid_in_lieu": {
      "type": "boolean",
      "description": "Paid in lieu of notice"
     },
     "garden_leave": {
      "type": "boolean",
      "description": "Garden leave"
     },
     "exit_interview_on": {
      "type": "string",
      "format": "date",
      "description": "Exit interview"
     },
     "exit_interview_by": {
      "type": "string",
      "format": "uuid",
      "description": "Exit interview by"
     },
     "exit_reason_category": {
      "type": "string",
      "description": "Exit reason category"
     },
     "would_recommend": {
      "type": "boolean",
      "description": "Would recommend us"
     },
     "would_return": {
      "type": "boolean",
      "description": "Would return"
     },
     "exit_feedback": {
      "type": "string",
      "description": "Exit feedback"
     },
     "final_pay_calculated": {
      "type": "boolean",
      "description": "Final pay calculated"
     },
     "final_pay_date": {
      "type": "string",
      "format": "date",
      "description": "Final pay date"
     },
     "accrued_leave_days": {
      "type": "string",
      "format": "decimal",
      "description": "Accrued leave (days)"
     },
     "accrued_leave_paid": {
      "type": "boolean",
      "description": "Accrued leave paid"
     },
     "severance_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Severance"
     },
     "assets_returned": {
      "type": "boolean",
      "description": "Assets returned"
     },
     "assets_outstanding": {
      "type": "string",
      "description": "Assets outstanding"
     },
     "system_access_revoked": {
      "type": "boolean",
      "description": "System access revoked"
     },
     "access_revoked_on": {
      "type": "string",
      "format": "date-time",
      "description": "Access revoked on"
     },
     "building_access_revoked": {
      "type": "boolean",
      "description": "Building access revoked"
     },
     "knowledge_transfer_done": {
      "type": "boolean",
      "description": "Knowledge transfer done"
     },
     "handover_to_id": {
      "type": "string",
      "format": "uuid",
      "description": "Handed over to"
     },
     "reference_policy": {
      "type": "string",
      "description": "Reference policy"
     },
     "has_restrictive_covenant": {
      "type": "boolean",
      "description": "Restrictive covenant"
     },
     "covenant_months": {
      "type": "integer",
      "description": "Covenant months"
     },
     "is_rehire_eligible": {
      "type": "boolean",
      "description": "Eligible for rehire"
     },
     "checklist_id": {
      "type": "string",
      "format": "uuid",
      "description": "Checklist id"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "enum": [
       "initiated",
       "in_progress",
       "pending_final_pay",
       "completed",
       "cancelled"
      ]
     },
     "completed_on": {
      "type": "string",
      "format": "date",
      "description": "Completed on"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit 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_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
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/offboarding": {
   "get": {
    "summary": "list offboarding",
    "operationId": "list_offboarding_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create offboarding",
    "operationId": "create_offboarding_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/offboarding/{id}": {
   "get": {
    "summary": "get offboarding",
    "operationId": "get_offboarding_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change offboarding",
    "operationId": "change_offboarding_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete offboarding",
    "operationId": "delete_offboarding_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/offboarding/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_offboarding_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"
     }
    }
   }
  }
 }
}