# Functions
# function to get candidates of a job role
path = /allCandidate?id=<job_role id>
method = GET
authentication = Bearer token
# RESPONSE
if all good and rows found
status : 200
[
{
"id": "e19a40ef-a732-45e7-a848-e19364166619",
"name": "John Doe",
"email": "[email protected]",
"phoneNo": "+91 7112343456",
"photo": "https://qjjltpmoudplzbqwjbvy.supabase.co/storage/v1/object/public/candidate-photo/Z-or547uFsyte1Qi-U85p.jpeg",
"gender": "Rajit",
"country": "India",
"cv": "https://qjjltpmoudplzbqwjbvy.supabase.co/storage/v1/object/public/candidate-cv/VB2fmDw6p4kGyKTDfgavi.pdf",
"dob": "2024-12-04",
"highestDegree": "B.Tech in CSE",
"highestDegreeOrg": "NSEC",
"highestDegreeCGPA": 9,
"yog": "2024",
"prevEmployer": "",
"experience": 0,
"prevJobTitle": "",
"duration": "",
"isEmployed": false,
"skills": "go,ceo",
"referralCode": "",
"referralName": "",
"links": "hfgfafaf",
"jobRole": "36b60df7-869d-4eae-a227-9c9cde8d74cf",
"selected": false,
"createdAt": "2024-12-12T15:55:45.567Z",
"updatedAt": "2024-12-12T15:55:45.567Z"
}
]
if error
{
"error": error message,
}
*/.
# function to reject a candidate
path = /rejectCandidate?id=<candidate id>
method = PUT
authentication = Bearer token
# RESPONSE
if all good
status : 200
{
"id" : <selected candidate id>,
"selected": "reject"
}
if error
{
"error": error message,
}
*/.
# function to select a candidate
path = /selectCandidate?id=<candidate id>
method = PUT
authentication = Bearer token
# RESPONSE
if all good
status : 200
{
"id" : <selected candidate id>,
"selected": "accept"
}
if error
{
"error": error message,
}
*/.
# function to get a single candidate
path = /singleCandidate?candidateId=<candidate id>&roleId=<role id>
method = GET
authentication = Bearer token
# RESPONSE
if all good
status = 200
{
"id": "78ddecb1-8f13-4857-9ed4-8e67a926a965",
"name": "Kunal Ghosh",
"email": "[email protected]",
"phoneNo": "1234567890",
"photo": "https://example.com/photos/johndoe.jpg",
"gender": "Male",
"country": "United States",
"cv": "https://example.com/cvs/johndoe.pdf",
"dob": "1990-01-01",
"highestDegree": "Master's in Computer Science",
"highestDegreeOrg": "NSEC",
"highestDegreeCGPA": 3.8,
"yog": "2015",
"prevEmployer": "Tech Corp",
"experience": 7,
"prevJobTitle": "Software Engineer",
"duration": "4",
"isEmployed": true,
"skills": "JavaScript,React,Node.js",
"referralCode": "REF12345",
"referralName": "Jane Smith",
"links": "https://linkedin.com/in/johndoe,https://github.com/johndoe",
"jobRole": "36b60df7-869d-4eae-a227-9c9cde8d74cf",
"selected": false,
"createdAt": "2024-12-13T09:58:00.529Z",
"updatedAt": "2024-12-13T09:58:00.529Z"
}
if error
{
"error": error message,
}
*/.
# function to add candidate
path = /submitForm
method = POST
body = json
data = {
"name": "Rajit Dutta",
"email": "[email protected]",
"phoneNo": "1234567890",
"gender": "Male",
"photo": "https://example.com/photos/johndoe.jpg",
"country": "United States",
"cv": "https://example.com/cvs/johndoe.pdf",
"dob": "1990-01-01",
"highestDegree": "Master's in Computer Science",
"highestDegreeOrg": "NSEC",
"highestDegreeCGPA": 3.8,
"yog": "2015",
"prevEmployer": "Tech Corp",
"experience": 7,
"prevJobTitle": "Software Engineer",
"duration": "4",
"isEmployed": true,
"skills": "JavaScript,React,Node.js",
"referralCode": "REF12345",
"referralName": "Jane Smith",
"links":"https://linkedin.com/in/johndoe,https://github.com/johndoe",
"jobRole": "8c313455-83c1-4495-b5a5-d10a89225a31",
"roleName" : "Go developer"
}
# RESPONSE
if all good
status: 201
{
"msg": "created"
}
if error
{
"error": error message,
}
*/.