openapi: 3.1.0 info: title: Api version: 0.1.0 description: Candidate Profile System API servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: candidates description: Candidate profile operations - name: education description: Education management - name: experience description: Work experience management - name: skills description: Skills management - name: certifications description: Certifications management - name: projects description: Portfolio projects management - name: strengths description: Strengths and improvements management - name: preferences description: Job preferences management - name: privacy description: Privacy and security settings - name: documents description: Document upload/download - name: insights description: Profile insights and AI scores - name: recruiters description: Recruiter view operations paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /candidates: get: operationId: listCandidates tags: [candidates, recruiters] summary: List all candidates (recruiter view) parameters: - name: search in: query schema: type: string - name: city in: query schema: type: string - name: industry in: query schema: type: string - name: limit in: query schema: type: number - name: offset in: query schema: type: number responses: "200": description: List of candidates content: application/json: schema: $ref: "#/components/schemas/CandidateListResponse" post: operationId: createCandidate tags: [candidates] summary: Create candidate profile requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateCandidateRequest" responses: "201": description: Candidate created content: application/json: schema: $ref: "#/components/schemas/CandidateProfile" /candidates/{id}: get: operationId: getCandidate tags: [candidates] summary: Get candidate profile parameters: - name: id in: path required: true schema: type: number responses: "200": description: Candidate profile content: application/json: schema: $ref: "#/components/schemas/CandidateFullProfile" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" put: operationId: updateCandidate tags: [candidates] summary: Update candidate basic profile parameters: - name: id in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateCandidateRequest" responses: "200": description: Updated candidate content: application/json: schema: $ref: "#/components/schemas/CandidateProfile" /candidates/{id}/education: get: operationId: getEducation tags: [education] summary: Get candidate education records parameters: - name: id in: path required: true schema: type: number responses: "200": description: Education list content: application/json: schema: type: array items: $ref: "#/components/schemas/Education" post: operationId: addEducation tags: [education] summary: Add education record parameters: - name: id in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateEducationRequest" responses: "201": description: Education added content: application/json: schema: $ref: "#/components/schemas/Education" /candidates/{id}/education/{educationId}: put: operationId: updateEducation tags: [education] summary: Update education record parameters: - name: id in: path required: true schema: type: number - name: educationId in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateEducationRequest" responses: "200": description: Updated education content: application/json: schema: $ref: "#/components/schemas/Education" delete: operationId: deleteEducation tags: [education] summary: Delete education record parameters: - name: id in: path required: true schema: type: number - name: educationId in: path required: true schema: type: number responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /candidates/{id}/experience: get: operationId: getExperience tags: [experience] summary: Get work experience records parameters: - name: id in: path required: true schema: type: number responses: "200": description: Experience list content: application/json: schema: type: array items: $ref: "#/components/schemas/Experience" post: operationId: addExperience tags: [experience] summary: Add work experience parameters: - name: id in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateExperienceRequest" responses: "201": description: Experience added content: application/json: schema: $ref: "#/components/schemas/Experience" /candidates/{id}/experience/{experienceId}: put: operationId: updateExperience tags: [experience] summary: Update work experience parameters: - name: id in: path required: true schema: type: number - name: experienceId in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateExperienceRequest" responses: "200": description: Updated experience content: application/json: schema: $ref: "#/components/schemas/Experience" delete: operationId: deleteExperience tags: [experience] summary: Delete work experience parameters: - name: id in: path required: true schema: type: number - name: experienceId in: path required: true schema: type: number responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /candidates/{id}/skills: get: operationId: getSkills tags: [skills] summary: Get candidate skills parameters: - name: id in: path required: true schema: type: number responses: "200": description: Skills list content: application/json: schema: type: array items: $ref: "#/components/schemas/Skill" post: operationId: addSkill tags: [skills] summary: Add skill parameters: - name: id in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateSkillRequest" responses: "201": description: Skill added content: application/json: schema: $ref: "#/components/schemas/Skill" /candidates/{id}/skills/{skillId}: put: operationId: updateSkill tags: [skills] summary: Update skill parameters: - name: id in: path required: true schema: type: number - name: skillId in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateSkillRequest" responses: "200": description: Updated skill content: application/json: schema: $ref: "#/components/schemas/Skill" delete: operationId: deleteSkill tags: [skills] summary: Delete skill parameters: - name: id in: path required: true schema: type: number - name: skillId in: path required: true schema: type: number responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /candidates/{id}/certifications: get: operationId: getCertifications tags: [certifications] summary: Get certifications parameters: - name: id in: path required: true schema: type: number responses: "200": description: Certifications list content: application/json: schema: type: array items: $ref: "#/components/schemas/Certification" post: operationId: addCertification tags: [certifications] summary: Add certification parameters: - name: id in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateCertificationRequest" responses: "201": description: Certification added content: application/json: schema: $ref: "#/components/schemas/Certification" /candidates/{id}/certifications/{certificationId}: put: operationId: updateCertification tags: [certifications] summary: Update certification parameters: - name: id in: path required: true schema: type: number - name: certificationId in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateCertificationRequest" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/Certification" delete: operationId: deleteCertification tags: [certifications] summary: Delete certification parameters: - name: id in: path required: true schema: type: number - name: certificationId in: path required: true schema: type: number responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /candidates/{id}/projects: get: operationId: getProjects tags: [projects] summary: Get portfolio projects parameters: - name: id in: path required: true schema: type: number responses: "200": description: Projects list content: application/json: schema: type: array items: $ref: "#/components/schemas/Project" post: operationId: addProject tags: [projects] summary: Add portfolio project parameters: - name: id in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateProjectRequest" responses: "201": description: Project added content: application/json: schema: $ref: "#/components/schemas/Project" /candidates/{id}/projects/{projectId}: put: operationId: updateProject tags: [projects] summary: Update project parameters: - name: id in: path required: true schema: type: number - name: projectId in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateProjectRequest" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/Project" delete: operationId: deleteProject tags: [projects] summary: Delete project parameters: - name: id in: path required: true schema: type: number - name: projectId in: path required: true schema: type: number responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /candidates/{id}/strengths: get: operationId: getStrengths tags: [strengths] summary: Get strengths and improvements parameters: - name: id in: path required: true schema: type: number responses: "200": description: Strengths and improvements content: application/json: schema: $ref: "#/components/schemas/StrengthsAndImprovements" post: operationId: addStrength tags: [strengths] summary: Add strength or improvement parameters: - name: id in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateStrengthRequest" responses: "201": description: Added content: application/json: schema: $ref: "#/components/schemas/Strength" /candidates/{id}/strengths/{strengthId}: put: operationId: updateStrength tags: [strengths] summary: Update strength or improvement parameters: - name: id in: path required: true schema: type: number - name: strengthId in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateStrengthRequest" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/Strength" delete: operationId: deleteStrength tags: [strengths] summary: Delete strength or improvement parameters: - name: id in: path required: true schema: type: number - name: strengthId in: path required: true schema: type: number responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /candidates/{id}/preferences: get: operationId: getPreferences tags: [preferences] summary: Get job preferences parameters: - name: id in: path required: true schema: type: number responses: "200": description: Job preferences content: application/json: schema: $ref: "#/components/schemas/JobPreferences" put: operationId: updatePreferences tags: [preferences] summary: Update job preferences parameters: - name: id in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreatePreferencesRequest" responses: "200": description: Updated preferences content: application/json: schema: $ref: "#/components/schemas/JobPreferences" /candidates/{id}/privacy: get: operationId: getPrivacySettings tags: [privacy] summary: Get privacy settings parameters: - name: id in: path required: true schema: type: number responses: "200": description: Privacy settings content: application/json: schema: $ref: "#/components/schemas/PrivacySettings" put: operationId: updatePrivacySettings tags: [privacy] summary: Update privacy settings parameters: - name: id in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreatePrivacySettingsRequest" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/PrivacySettings" /candidates/{id}/security: get: operationId: getSecuritySettings tags: [privacy] summary: Get security settings parameters: - name: id in: path required: true schema: type: number responses: "200": description: Security settings content: application/json: schema: $ref: "#/components/schemas/SecuritySettings" put: operationId: updateSecuritySettings tags: [privacy] summary: Update security / notification settings parameters: - name: id in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateSecuritySettingsRequest" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/SecuritySettings" /candidates/{id}/insights: get: operationId: getInsights tags: [insights] summary: Get profile insights and AI scores parameters: - name: id in: path required: true schema: type: number responses: "200": description: Profile insights content: application/json: schema: $ref: "#/components/schemas/ProfileInsights" /candidates/{id}/documents: get: operationId: getDocuments tags: [documents] summary: Get candidate documents parameters: - name: id in: path required: true schema: type: number responses: "200": description: Documents list content: application/json: schema: type: array items: $ref: "#/components/schemas/Document" post: operationId: uploadDocument tags: [documents] summary: Upload document/resume parameters: - name: id in: path required: true schema: type: number requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UploadDocumentRequest" responses: "201": description: Document uploaded content: application/json: schema: $ref: "#/components/schemas/Document" /candidates/{id}/documents/{documentId}: delete: operationId: deleteDocument tags: [documents] summary: Delete document parameters: - name: id in: path required: true schema: type: number - name: documentId in: path required: true schema: type: number responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" components: schemas: HealthStatus: type: object properties: status: type: string required: - status ErrorResponse: type: object properties: error: type: string message: type: string required: - error SuccessResponse: type: object properties: success: type: boolean message: type: string required: - success CandidateProfile: type: object properties: id: type: number fullName: type: string email: type: string phone: type: string cnic: type: string dateOfBirth: type: string nullable: true gender: type: string nullable: true city: type: string nullable: true currentAddress: type: string nullable: true socialProfile: type: string nullable: true portfolioWebsite: type: string nullable: true professionalSummary: type: string nullable: true professionalOverview: type: string nullable: true profilePhotoUrl: type: string nullable: true emailVerified: type: boolean phoneVerified: type: boolean profileStatus: type: string createdAt: type: string updatedAt: type: string required: - id - fullName - email - phone - cnic - emailVerified - phoneVerified - profileStatus - createdAt - updatedAt CreateCandidateRequest: type: object properties: fullName: type: string email: type: string phone: type: string cnic: type: string dateOfBirth: type: string nullable: true gender: type: string nullable: true city: type: string nullable: true currentAddress: type: string nullable: true socialProfile: type: string nullable: true portfolioWebsite: type: string nullable: true professionalSummary: type: string nullable: true professionalOverview: type: string nullable: true profilePhotoUrl: type: string nullable: true emailVerified: type: boolean phoneVerified: type: boolean profileStatus: type: string required: - fullName - email - phone - cnic CandidateListResponse: type: object properties: candidates: type: array items: $ref: "#/components/schemas/CandidateProfile" total: type: number limit: type: number offset: type: number required: - candidates - total - limit - offset CandidateFullProfile: type: object properties: profile: $ref: "#/components/schemas/CandidateProfile" education: type: array items: $ref: "#/components/schemas/Education" experience: type: array items: $ref: "#/components/schemas/Experience" skills: type: array items: $ref: "#/components/schemas/Skill" certifications: type: array items: $ref: "#/components/schemas/Certification" projects: type: array items: $ref: "#/components/schemas/Project" strengths: type: array items: $ref: "#/components/schemas/Strength" preferences: $ref: "#/components/schemas/JobPreferences" nullable: true privacy: $ref: "#/components/schemas/PrivacySettings" nullable: true security: $ref: "#/components/schemas/SecuritySettings" nullable: true insights: $ref: "#/components/schemas/ProfileInsights" nullable: true documents: type: array items: $ref: "#/components/schemas/Document" required: - profile - education - experience - skills - certifications - projects - strengths - documents Education: type: object properties: id: type: number candidateId: type: number degreeLevel: type: string degreeTitle: type: string majorSubjects: type: string institute: type: string startYear: type: string nullable: true completionYear: type: string nullable: true currentlyStudying: type: boolean percentage: type: string nullable: true createdAt: type: string required: - id - candidateId - degreeLevel - degreeTitle - majorSubjects - institute - currentlyStudying - createdAt CreateEducationRequest: type: object properties: degreeLevel: type: string degreeTitle: type: string majorSubjects: type: string institute: type: string startYear: type: string nullable: true completionYear: type: string nullable: true currentlyStudying: type: boolean percentage: type: string nullable: true required: - degreeLevel - degreeTitle - majorSubjects - institute - currentlyStudying Experience: type: object properties: id: type: number candidateId: type: number jobTitle: type: string companyName: type: string employmentType: type: string industry: type: string nullable: true location: type: string nullable: true startDate: type: string nullable: true endDate: type: string nullable: true currentlyWorking: type: boolean keyResponsibilities: type: string nullable: true achievements: type: string nullable: true lastDrawnSalary: type: string nullable: true noticePeriod: type: string nullable: true createdAt: type: string required: - id - candidateId - jobTitle - companyName - employmentType - currentlyWorking - createdAt CreateExperienceRequest: type: object properties: jobTitle: type: string companyName: type: string employmentType: type: string industry: type: string nullable: true location: type: string nullable: true startDate: type: string nullable: true endDate: type: string nullable: true currentlyWorking: type: boolean keyResponsibilities: type: string nullable: true achievements: type: string nullable: true lastDrawnSalary: type: string nullable: true noticePeriod: type: string nullable: true required: - jobTitle - companyName - employmentType - currentlyWorking Skill: type: object properties: id: type: number candidateId: type: number skillName: type: string skillCategory: type: string proficiencyLevel: type: string yearsOfExperience: type: number nullable: true isPrimary: type: boolean createdAt: type: string required: - id - candidateId - skillName - skillCategory - proficiencyLevel - isPrimary - createdAt CreateSkillRequest: type: object properties: skillName: type: string skillCategory: type: string proficiencyLevel: type: string yearsOfExperience: type: number nullable: true isPrimary: type: boolean required: - skillName - skillCategory - proficiencyLevel - isPrimary Certification: type: object properties: id: type: number candidateId: type: number certificationTitle: type: string issuingOrganization: type: string issueDate: type: string expiryDate: type: string nullable: true createdAt: type: string required: - id - candidateId - certificationTitle - issuingOrganization - issueDate - createdAt CreateCertificationRequest: type: object properties: certificationTitle: type: string issuingOrganization: type: string issueDate: type: string expiryDate: type: string nullable: true required: - certificationTitle - issuingOrganization - issueDate Project: type: object properties: id: type: number candidateId: type: number projectTitle: type: string projectType: type: string description: type: string toolsTechnologies: type: string roleInProject: type: string projectLink: type: string nullable: true createdAt: type: string required: - id - candidateId - projectTitle - projectType - description - toolsTechnologies - roleInProject - createdAt CreateProjectRequest: type: object properties: projectTitle: type: string projectType: type: string description: type: string toolsTechnologies: type: string roleInProject: type: string projectLink: type: string nullable: true required: - projectTitle - projectType - description - toolsTechnologies - roleInProject Strength: type: object properties: id: type: number candidateId: type: number type: type: string description: "strength or improvement" title: type: string description: type: string nullable: true createdAt: type: string required: - id - candidateId - type - title - createdAt CreateStrengthRequest: type: object properties: type: type: string description: "strength or improvement" title: type: string description: type: string nullable: true required: - type - title StrengthsAndImprovements: type: object properties: strengths: type: array items: $ref: "#/components/schemas/Strength" improvements: type: array items: $ref: "#/components/schemas/Strength" required: - strengths - improvements JobPreferences: type: object properties: id: type: number candidateId: type: number preferredIndustries: type: array items: type: string preferredJobTypes: type: array items: type: string preferredWorkModes: type: array items: type: string preferredLocations: type: array items: type: string expectedSalary: type: string nullable: true willingToRelocate: type: boolean availableToJoin: type: string nullable: true preferredShiftTiming: type: string nullable: true createdAt: type: string required: - id - candidateId - preferredIndustries - preferredJobTypes - preferredWorkModes - preferredLocations - willingToRelocate - createdAt CreatePreferencesRequest: type: object properties: preferredIndustries: type: array items: type: string preferredJobTypes: type: array items: type: string preferredWorkModes: type: array items: type: string preferredLocations: type: array items: type: string expectedSalary: type: string nullable: true willingToRelocate: type: boolean availableToJoin: type: string nullable: true preferredShiftTiming: type: string nullable: true required: - preferredIndustries - preferredJobTypes - preferredWorkModes - preferredLocations - willingToRelocate PrivacySettings: type: object properties: id: type: number candidateId: type: number profileVisibility: type: string description: "public or private" updatedAt: type: string required: - id - candidateId - profileVisibility - updatedAt CreatePrivacySettingsRequest: type: object properties: profileVisibility: type: string description: "public or private" required: - profileVisibility SecuritySettings: type: object properties: id: type: number candidateId: type: number emailNotifications: type: boolean whatsappNotifications: type: boolean updatedAt: type: string required: - id - candidateId - emailNotifications - whatsappNotifications - updatedAt CreateSecuritySettingsRequest: type: object properties: emailNotifications: type: boolean whatsappNotifications: type: boolean required: - emailNotifications - whatsappNotifications ProfileInsights: type: object properties: id: type: number candidateId: type: number completionPercentage: type: number basicInfoComplete: type: boolean educationComplete: type: boolean experienceComplete: type: boolean skillsComplete: type: boolean certificationsComplete: type: boolean projectsComplete: type: boolean preferencesComplete: type: boolean resumeScore: type: number nullable: true aiSuggestions: type: array items: type: string skillGapAnalysis: type: array items: type: string aiJobMatchScore: type: number nullable: true missingSections: type: array items: type: string updatedAt: type: string required: - id - candidateId - completionPercentage - basicInfoComplete - educationComplete - experienceComplete - skillsComplete - certificationsComplete - projectsComplete - preferencesComplete - aiSuggestions - skillGapAnalysis - missingSections - updatedAt Document: type: object properties: id: type: number candidateId: type: number fileName: type: string fileType: type: string fileSize: type: number nullable: true fileUrl: type: string documentType: type: string uploadedAt: type: string required: - id - candidateId - fileName - fileType - fileUrl - documentType - uploadedAt UploadDocumentRequest: type: object properties: fileName: type: string fileType: type: string fileSize: type: number nullable: true fileUrl: type: string documentType: type: string required: - fileName - fileType - fileUrl - documentType