{
 "openapi": "3.1.0",
 "info": {
  "title": "Performance Reviews (HRMS)",
  "version": "20261030b",
  "description": "Performance and potential are different axes, and conflating them is what makes a nine-box impossible to build later."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "performance-reviews": {
    "type": "object",
    "required": [
     "cycle_id",
     "employee_id"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "cycle_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cycle"
     },
     "employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Employee"
     },
     "reviewer_id": {
      "type": "string",
      "format": "uuid",
      "description": "Reviewer"
     },
     "overall_rating": {
      "type": "string",
      "description": "Overall rating"
     },
     "rating_value": {
      "type": "string",
      "format": "decimal",
      "description": "Rating value"
     },
     "potential_rating": {
      "type": "string",
      "description": "Potential rating"
     },
     "self_rating": {
      "type": "string",
      "description": "Self rating"
     },
     "calibrated_rating": {
      "type": "string",
      "description": "Calibrated rating"
     },
     "calibrated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Calibrated by"
     },
     "strengths": {
      "type": "string",
      "description": "Strengths"
     },
     "development_areas": {
      "type": "string",
      "description": "Development areas"
     },
     "manager_comments": {
      "type": "string",
      "description": "Manager comments"
     },
     "employee_comments": {
      "type": "string",
      "description": "Employee comments"
     },
     "triggers_pip": {
      "type": "boolean",
      "description": "Triggers a performance plan"
     },
     "merit_eligible": {
      "type": "boolean",
      "description": "Merit eligible"
     },
     "promotion_recommended": {
      "type": "boolean",
      "description": "Promotion recommended"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "enum": [
       "draft",
       "self_review",
       "manager_review",
       "calibration",
       "approval",
       "shared",
       "acknowledged",
       "closed"
      ]
     },
     "submitted_at": {
      "type": "string",
      "format": "date-time",
      "description": "Submitted at"
     },
     "acknowledged_at": {
      "type": "string",
      "format": "date-time",
      "description": "Acknowledged at"
     },
     "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
     },
     "workflow_id": {
      "type": "string",
      "format": "uuid",
      "description": "Workflow id",
      "readOnly": true
     },
     "step_seq": {
      "type": "integer",
      "description": "Step seq",
      "readOnly": true
     },
     "step_due_on": {
      "type": "string",
      "format": "date",
      "description": "Step due on",
      "readOnly": true
     },
     "step_actor": {
      "type": "string",
      "description": "Step actor",
      "readOnly": true
     },
     "step_role_code": {
      "type": "string",
      "description": "Step role code",
      "readOnly": true
     },
     "approved_by": {
      "type": "string",
      "format": "uuid",
      "description": "Approved by",
      "readOnly": true
     },
     "approved_at": {
      "type": "string",
      "format": "date-time",
      "description": "Approved at",
      "readOnly": true
     },
     "last_reminded_on": {
      "type": "string",
      "format": "date",
      "description": "Last reminded on",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/performance-reviews": {
   "get": {
    "summary": "list performance-reviews",
    "operationId": "list_performance_reviews_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create performance-reviews",
    "operationId": "create_performance_reviews_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/performance-reviews/{id}": {
   "get": {
    "summary": "get performance-reviews",
    "operationId": "get_performance_reviews_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change performance-reviews",
    "operationId": "change_performance_reviews_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete performance-reviews",
    "operationId": "delete_performance_reviews_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/performance-reviews/{id}/calendar-invite": {
   "post": {
    "summary": "Calendar invite",
    "operationId": "action_performance_reviews_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/performance-reviews/{id}/calendar-invite/cancel": {
   "post": {
    "summary": "Calendar invite cancel",
    "operationId": "action_performance_reviews_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/performance-reviews/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_performance_reviews_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/performance-reviews/{id}/start": {
   "post": {
    "summary": "Start",
    "operationId": "action_performance_reviews_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/performance-reviews/{id}/decide": {
   "post": {
    "summary": "Decide",
    "operationId": "action_performance_reviews_0_6",
    "description": "Body keys: decision, comment",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/performance-reviews/{id}/steps": {
   "get": {
    "summary": "Steps",
    "operationId": "action_performance_reviews_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}