{
 "openapi": "3.1.0",
 "info": {
  "title": "Candidate Ranking (HRMS)",
  "version": "20261030b",
  "description": "Everybody who applied for a vacancy, in the order the interview panels put them. Candidates on the same score share a rank. Selecting anyone ranked below a candidate still in the running is allowed — with the reason kept on the record."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "panel-rankings": {
    "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
     },
     "requisition_id": {
      "type": "string",
      "format": "uuid",
      "description": "Requisition id",
      "readOnly": true
     },
     "requisition_no": {
      "type": "string",
      "description": "Requisition no",
      "readOnly": true
     },
     "role": {
      "type": "string",
      "description": "Role",
      "readOnly": true
     },
     "openings": {
      "type": "integer",
      "description": "Openings",
      "readOnly": true
     },
     "application_no": {
      "type": "string",
      "description": "Application no",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "applied_on": {
      "type": "string",
      "format": "date",
      "description": "Applied on",
      "readOnly": true
     },
     "candidate_no": {
      "type": "string",
      "description": "Candidate no",
      "readOnly": true
     },
     "candidate_name": {
      "type": "string",
      "description": "Candidate name",
      "readOnly": true
     },
     "stage": {
      "type": "string",
      "description": "Stage",
      "readOnly": true
     },
     "panel_score": {
      "type": "string",
      "format": "decimal",
      "description": "Panel score",
      "readOnly": true
     },
     "rank_no": {
      "type": "integer",
      "description": "Rank no",
      "readOnly": true
     },
     "interviews_scored": {
      "type": "integer",
      "description": "Interviews scored",
      "readOnly": true
     },
     "latest_outcome": {
      "type": "string",
      "description": "Latest outcome",
      "readOnly": true
     },
     "outlier_marks": {
      "type": "integer",
      "description": "Outlier marks",
      "readOnly": true
     },
     "is_selected": {
      "type": "boolean",
      "description": "Is selected",
      "readOnly": true
     },
     "selected_out_of_rank": {
      "type": "boolean",
      "description": "Selected out of rank",
      "readOnly": true
     },
     "selection_reason": {
      "type": "string",
      "description": "Selection reason",
      "readOnly": true
     },
     "selected_at": {
      "type": "string",
      "format": "date-time",
      "description": "Selected at",
      "readOnly": true
     },
     "selected_by_name": {
      "type": "string",
      "description": "Selected by name",
      "readOnly": true
     },
     "display_name": {
      "type": "string",
      "description": "Display name",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/panel-rankings": {
   "get": {
    "summary": "list panel-rankings",
    "operationId": "list_panel_rankings_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post candidate ranking",
    "operationId": "action_panel_rankings_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/panel-rankings/{id}": {
   "get": {
    "summary": "get panel-rankings",
    "operationId": "get_panel_rankings_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put candidate ranking",
    "operationId": "action_panel_rankings_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete candidate ranking",
    "operationId": "action_panel_rankings_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/panel-rankings/{id}/select": {
   "post": {
    "summary": "Select",
    "operationId": "action_panel_rankings_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/panel-rankings/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_panel_rankings_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"
     }
    }
   }
  }
 }
}