{
 "openapi": "3.1.0",
 "info": {
  "title": "Exit Interviews (Employee Self Service)",
  "version": "20261030b",
  "description": "What leavers said. Confidential: read by HR, never shown to the manager."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "exit-interviews": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "interview_no": {
      "type": "string",
      "description": "Interview no",
      "readOnly": true
     },
     "employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Employee id",
      "readOnly": true
     },
     "employee_no": {
      "type": "string",
      "description": "Employee no",
      "readOnly": true
     },
     "employee_name": {
      "type": "string",
      "description": "Employee name",
      "readOnly": true
     },
     "department": {
      "type": "string",
      "description": "Department",
      "readOnly": true
     },
     "questionnaire": {
      "type": "string",
      "description": "Questionnaire",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "reason": {
      "type": "string",
      "description": "Reason",
      "readOnly": true
     },
     "would_recommend": {
      "type": "boolean",
      "description": "Would recommend",
      "readOnly": true
     },
     "would_return": {
      "type": "boolean",
      "description": "Would return",
      "readOnly": true
     },
     "comments": {
      "type": "string",
      "description": "Comments",
      "readOnly": true
     },
     "submitted_at": {
      "type": "string",
      "format": "date-time",
      "description": "Submitted at",
      "readOnly": true
     },
     "resignation_no": {
      "type": "string",
      "description": "Resignation no",
      "readOnly": true
     },
     "last_working_day": {
      "type": "string",
      "format": "date",
      "description": "Last working day",
      "readOnly": true
     },
     "average_rating": {
      "type": "string",
      "format": "decimal",
      "description": "Average rating",
      "readOnly": true
     },
     "answers": {
      "type": "string",
      "description": "Answers",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/ess/exit-interviews": {
   "get": {
    "summary": "list exit-interviews",
    "operationId": "list_exit_interviews_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post exit interviews",
    "operationId": "action_exit_interviews_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/ess/exit-interviews/{id}": {
   "get": {
    "summary": "get exit-interviews",
    "operationId": "get_exit_interviews_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put exit interviews",
    "operationId": "action_exit_interviews_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete exit interviews",
    "operationId": "action_exit_interviews_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/ess/exit-interviews/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_exit_interviews_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"
     }
    }
   }
  }
 }
}