{
 "openapi": "3.1.0",
 "info": {
  "title": "Hiring Approvals (HRMS)",
  "version": "20261030b",
  "description": "Every signature a vacancy is waiting for, in the order they are collected. The level being waited on is the one whose earlier levels have all signed — nothing below it can be decided first."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "requisition-approvals": {
    "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
     },
     "level_no": {
      "type": "integer",
      "description": "Level no",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "approver_kind": {
      "type": "string",
      "description": "Approver kind",
      "readOnly": true
     },
     "approver_role": {
      "type": "string",
      "description": "Approver role",
      "readOnly": true
     },
     "approver_user_id": {
      "type": "string",
      "format": "uuid",
      "description": "Approver user id",
      "readOnly": true
     },
     "approver_employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Approver employee id",
      "readOnly": true
     },
     "routed_by": {
      "type": "string",
      "description": "Routed by",
      "readOnly": true
     },
     "amount": {
      "type": "string",
      "format": "decimal",
      "description": "Amount",
      "readOnly": true
     },
     "currency": {
      "type": "string",
      "description": "Currency",
      "readOnly": true
     },
     "requested_at": {
      "type": "string",
      "format": "date-time",
      "description": "Requested at",
      "readOnly": true
     },
     "due_at": {
      "type": "string",
      "format": "date-time",
      "description": "Due at",
      "readOnly": true
     },
     "decided_at": {
      "type": "string",
      "format": "date-time",
      "description": "Decided at",
      "readOnly": true
     },
     "decided_by": {
      "type": "string",
      "format": "uuid",
      "description": "Decided by",
      "readOnly": true
     },
     "comment": {
      "type": "string",
      "description": "Comment",
      "readOnly": true
     },
     "requisition_no": {
      "type": "string",
      "description": "Requisition no",
      "readOnly": true
     },
     "role_title": {
      "type": "string",
      "description": "Role title",
      "readOnly": true
     },
     "department": {
      "type": "string",
      "description": "Department",
      "readOnly": true
     },
     "openings": {
      "type": "integer",
      "description": "Openings",
      "readOnly": true
     },
     "requisition_status": {
      "type": "string",
      "description": "Requisition status",
      "readOnly": true
     },
     "approval_status": {
      "type": "string",
      "description": "Approval status",
      "readOnly": true
     },
     "rule_code": {
      "type": "string",
      "description": "Rule code",
      "readOnly": true
     },
     "rule_name": {
      "type": "string",
      "description": "Rule name",
      "readOnly": true
     },
     "approver_name": {
      "type": "string",
      "description": "Approver name",
      "readOnly": true
     },
     "approver_email": {
      "type": "string",
      "description": "Approver email",
      "readOnly": true
     },
     "decided_by_name": {
      "type": "string",
      "description": "Decided by name",
      "readOnly": true
     },
     "raised_by_name": {
      "type": "string",
      "description": "Raised by name",
      "readOnly": true
     },
     "overdue": {
      "type": "boolean",
      "description": "Overdue",
      "readOnly": true
     },
     "is_current": {
      "type": "boolean",
      "description": "Is current",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/requisition-approvals": {
   "get": {
    "summary": "list requisition-approvals",
    "operationId": "list_requisition_approvals_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post hiring approvals",
    "operationId": "action_requisition_approvals_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisition-approvals/{id}": {
   "get": {
    "summary": "get requisition-approvals",
    "operationId": "get_requisition_approvals_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put hiring approvals",
    "operationId": "action_requisition_approvals_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete hiring approvals",
    "operationId": "action_requisition_approvals_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisition-approvals/{id}/decide": {
   "post": {
    "summary": "Decide",
    "operationId": "action_requisition_approvals_0_6",
    "description": "Body keys: decision, comment; decision one of approve|reject",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisition-approvals/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_requisition_approvals_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"
     }
    }
   }
  }
 }
}