{
 "openapi": "3.1.0",
 "info": {
  "title": "Hiring Requisitions (HRMS)",
  "version": "20261030b",
  "description": "A request for a post: what it is, which grade, where, what it costs for a year, and why it is needed. Send it for signature and it collects the approvals its value calls for; only an approved vacancy can be advertised."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "requisitions": {
    "type": "object",
    "required": [
     "title"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "requisition_no": {
      "type": "string",
      "description": "Requisition no",
      "readOnly": true
     },
     "title": {
      "type": "string",
      "description": "Post"
     },
     "position_id": {
      "type": "string",
      "format": "uuid",
      "description": "Position"
     },
     "job_id": {
      "type": "string",
      "format": "uuid",
      "description": "Job id"
     },
     "grade_id": {
      "type": "string",
      "format": "uuid",
      "description": "Grade"
     },
     "department": {
      "type": "string",
      "description": "Department"
     },
     "location_id": {
      "type": "string",
      "format": "uuid",
      "description": "Location"
     },
     "cost_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cost center"
     },
     "hiring_manager_id": {
      "type": "string",
      "format": "uuid",
      "description": "Hiring manager"
     },
     "recruiter_id": {
      "type": "string",
      "format": "uuid",
      "description": "Recruiter"
     },
     "openings": {
      "type": "integer",
      "description": "Number of posts"
     },
     "filled": {
      "type": "integer",
      "description": "Filled",
      "readOnly": true
     },
     "reason": {
      "type": "string",
      "description": "Why the vacancy exists",
      "enum": [
       "growth",
       "replacement",
       "backfill",
       "conversion",
       "seasonal",
       "project"
      ]
     },
     "replacing_employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Replacing employee id",
      "readOnly": true
     },
     "employment_type": {
      "type": "string",
      "description": "Employment type",
      "enum": [
       "full_time",
       "part_time",
       "contract",
       "temporary",
       "intern"
      ]
     },
     "target_start": {
      "type": "string",
      "format": "date",
      "description": "Wanted by"
     },
     "budget_min": {
      "type": "string",
      "format": "decimal",
      "description": "Pay range from"
     },
     "budget_max": {
      "type": "string",
      "format": "decimal",
      "description": "Pay range to"
     },
     "currency": {
      "type": "string",
      "description": "Currency",
      "readOnly": true
     },
     "description": {
      "type": "string",
      "description": "What the post is"
     },
     "requirements": {
      "type": "string",
      "description": "What it requires"
     },
     "status": {
      "type": "string",
      "description": "Status"
     },
     "approved_by": {
      "type": "string",
      "format": "uuid",
      "description": "Approved by",
      "readOnly": true
     },
     "approved_at": {
      "type": "string",
      "format": "date-time",
      "description": "Approved at",
      "readOnly": true
     },
     "rejected_reason": {
      "type": "string",
      "description": "Rejected reason",
      "readOnly": true
     },
     "opened_on": {
      "type": "string",
      "format": "date",
      "description": "Opened on",
      "readOnly": true
     },
     "closed_on": {
      "type": "string",
      "format": "date",
      "description": "Closed on",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "justification": {
      "type": "string",
      "description": "Justification"
     },
     "budget_annual_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Annual cost of the post"
     },
     "approval_status": {
      "type": "string",
      "description": "Approval status",
      "readOnly": true
     },
     "submitted_at": {
      "type": "string",
      "format": "date-time",
      "description": "Submitted at",
      "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
     },
     "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/requisitions": {
   "get": {
    "summary": "list requisitions",
    "operationId": "list_requisitions_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create requisitions",
    "operationId": "create_requisitions_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisitions/{id}": {
   "get": {
    "summary": "get requisitions",
    "operationId": "get_requisitions_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change requisitions",
    "operationId": "change_requisitions_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete requisitions",
    "operationId": "delete_requisitions_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "patch": {
    "summary": "Patch hiring requisitions",
    "operationId": "action_requisitions_3_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisitions/{id}/panel-comparison": {
   "get": {
    "summary": "Panel comparison",
    "operationId": "action_requisitions_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisitions/{id}/approvals": {
   "get": {
    "summary": "Approvals",
    "operationId": "action_requisitions_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisitions/{id}/submit": {
   "post": {
    "summary": "Submit",
    "operationId": "action_requisitions_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisitions/{id}/approve": {
   "post": {
    "summary": "Approve",
    "operationId": "action_requisitions_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisitions/{id}/post": {
   "post": {
    "summary": "Post",
    "operationId": "action_requisitions_0_6",
    "description": "Body keys: channel, headline, body, closesOn, showPayRange; channel one of career_site|internal|job_board|agency|referral|social|university|other",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisitions/seats": {
   "get": {
    "summary": "Seats",
    "operationId": "action_requisitions_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisitions/hiring-managers": {
   "get": {
    "summary": "Hiring managers",
    "operationId": "action_requisitions_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/requisitions/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_requisitions_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"
     }
    }
   }
  }
 }
}