Introduction

e-Recruitment portal is a virtual one-stop shop where employers can post job vacancies and candidates can find those jobs and apply. It allows recruiters to source, track, onboard and analyse new talent, simplifying the recruitment process.

To gain access to the APIs buy the AutoRecruit portal service from the azure marketplace.

BASE URL: https://arApi.kaispe.com/api/v1/:companyName

Here, companyName is the sub url which is assigned to the buyer.

Authentication

Get Access Token

curl --location -g --request POST '{{BASE_URL}}/auth/createOAuthToken' \
--header 'clientid: client-id' \
--header 'clientsecret: client-secret'

The above command returns JSON structured like this:

{
"status": 200,
"data": {
"token_type": "Bearer",
"expires_in": "4 hours",
"accessToken": "accessToken"
}
}

This endpoint is used to get the JWT access token.

HTTP Request

POST {{BASE_URL}}/auth/createOAuthToken

Header Parameters

ParameterDescription
clientidThe client id of the admin
clientsecretThe client secret of the admin

Authorization

To authorize, use this code:

curl "api_endpoint_here"
-H "Authorization: accessToken"

Make sure to replace accessToken with the token you get by calling the Get Access Token API.

AutoRecruit portal API uses a JWT token to allow access to the API which is retrieved by the Get Access Token API.

AutoRecruit portal API expects for the token to be included in all API requests to the server in a header that looks like the following:

Authorization: Bearer accessToken

Job locations

Get all job locations

curl --location -g '{{BASE_URL}}/job/job_location' \
--header 'Authorization: Bearer accessToken'

The above command returns JSON structured like this:

{
"docs": [
{
"_id": "63ca6989d7d8e33504044067",
"street_address": "Gulshan",
"city": "Karachi",
"state": "Sindh",
"country": "Pakistan",
"zip": "75300",
"delete_status": false,
"createdAt": "2023-01-20T10:14:33.510Z",
"updatedAt": "2023-01-20T10:14:33.510Z",
"__v": 0
},
{
"_id": "6423e1b7a58211f14c4e4d43",
"street_address": "PECHS",
"city": "Lahore",
"state": "Punjab",
"country": "Pakistan",
"zip": "75300",
"delete_status": false
}
],
"totalDocs": 2,
"limit": 50,
"totalPages": 1,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}

This endpoint fetches all the locations of the job

HTTP Request

GET {{BASE_URL}}/job/job_location

Get job location

curl --location -g '{{BASE_URL}}/job/job_location/:id' \
--header 'Authorization: Bearer accessToken'

The above command returns JSON structured like this:

{
"status": 200,
"data": {
"_id": "63ca6989d7d8e33504044067",
"street_address": "Gulshan",
"city": "Karachi",
"state": "Sindh",
"country": "Pakistan",
"zip": "75300",
"delete_status": false,
"createdAt": "2023-01-20T10:14:33.510Z",
"updatedAt": "2023-01-20T10:14:33.510Z",
"__v": 0
}
}

This endpoint fetches a specific job location

HTTP Request

GET {{BASE_URL}}/job/job_location/:id

URL Parameters

ParameterRequiredDescription
idTrueThe ID of the job location that is stored in database to fetch

Create a job location

curl --location -g '{{BASE_URL}}/job/job_location' \
--header 'Authorization: Bearer accessToken' \
--header 'Content-Type: application/json' \
--data '{
"street_address": "Gulshan",
"city": "Karachi",
"state": "Sindh",
"country": "Pakistan",
"zip": "75300"
}'

The above command returns JSON structured like this:

{
"status": 201,
"message": "Created"
}

This endpoint creates a job location

HTTP Request

POST {{BASE_URL}}/job/job_location

Body Parameters

ParameterData typeRequiredRestrictionsDescription
street_addressStringTrueNoneThe street_address of the location.
cityStringTrueTrueThe city of the location.
stateStringTrueTrueThe state of the location.
countryStringTrueNoneThe country of the location.
zipStringTrueNoneThe zip code of the location.

Job posts

Get all posted jobs

curl --location -g '{{BASE_URL}}/job/job_post' \
--header 'Authorization: Bearer accessToken'

The above command returns JSON structured like this:

{
"status": 200,
"data": {
"docs": [
{
"_id": "6423e002857845552870ee47",
"created_date": "2023-03-29T06:37:11.068Z",
"job_category_id": {
"name": "Marketing"
},
"job_title": "Marketer management",
"job_status": "active",
"job_shift": "night",
"job_type": "full-time",
"locations": [
{
"street_address": "Gulshan",
"city": "Karachi",
"state": "Sindh",
"country": "Pakistan",
"zip": "75300"
}
],
"job_location_type": "remote",
"experience": "<10year"
},
{
"_id": "6423e059857845552870ee49",
"created_date": "2023-03-29T06:37:11.068Z",
"job_category_id": {
"name": "UI/UX Designing"
},
"job_title": "UI/UX dev",
"job_status": "active",
"job_shift": "night",
"job_type": "full-time",
"locations": [
{
"street_address": "Gulshan",
"city": "Karachi",
"state": "Sindh",
"country": "Pakistan",
"zip": "75300"
},
{
"street_address": "PECHS",
"city": "Lahore",
"state": "Punjab",
"country": "Pakistan",
"zip": "75300"
}
],
"job_location_type": "remote",
"experience": "<10year"
},
{
"_id": "642a6ce9fa7a6f4c7442ff03",
"created_date": "2023-04-03T05:33:53.739Z",
"job_category_id": {
"name": "Software Development"
},
"job_title": "JAVA developer",
"job_status": "active",
"job_shift": "morning",
"job_type": "full-time",
"locations": [
{
"street_address": "PECHS",
"city": "Lahore",
"state": "Punjab",
"country": "Pakistan",
"zip": "75300"
}
],
"job_location_type": "on-site",
"experience": "1-3year"
},
{
"_id": "642a6d6afa7a6f4c7442ff08",
"created_date": "2023-04-03T05:33:53.739Z",
"job_category_id": {
"name": "Software Development"
},
"job_title": "CSharp developer",
"job_status": "active",
"job_shift": "night",
"job_type": "part-time",
"locations": [
{
"street_address": "PECHS",
"city": "Lahore",
"state": "Punjab",
"country": "Pakistan",
"zip": "75300"
}
],
"job_location_type": "on-site",
"experience": "1-3year"
},
{
"_id": "642a6daffa7a6f4c7442ff0b",
"created_date": "2023-04-03T05:33:53.739Z",
"job_category_id": {
"name": "Software Development"
},
"job_title": "react developer",
"job_status": "active",
"job_shift": "night",
"job_type": "intern",
"locations": [
{
"street_address": "PECHS",
"city": "Lahore",
"state": "Punjab",
"country": "Pakistan",
"zip": "75300"
}
],
"job_location_type": "on-site",
"experience": "0-1year"
},
{
"_id": "642a6ed2fa7a6f4c7442ff28",
"created_date": "2023-04-03T05:33:53.739Z",
"job_title": "Tester",
"job_shift": "evening",
"job_type": "part-time",
"job_location_type": "on-site",
"experience": "1-3year",
"job_category_id": {
"name": "Software Development"
},
"job_status": "active",
"locations": []
}
],
"totalDocs": 6,
"limit": 10,
"page": 1,
"totalPages": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}
}

This endpoint fetches all the orders based on the role assigned to the logged in user

HTTP Request

GET {{BASE_URL}}/job/job_post

Query Parameters

ParameterDescription
job_titleTitle of the job.
job_typeType of the job.
experienceExperience of job.
job_categoryCategory of the job.
pagePage no. to navigate at.
perPageTotal no. of documents you want to show on a page.

Get specific job post

curl --location -g '{{BASE_URL}}/job/job_post/:id' \
--header 'Authorization: Bearer accessToken'

The above command returns JSON structured like this:

{
"status": 200,
"data": {
"created_date": "2023-03-29T06:37:11.068Z",
"publish_status": "draft",
"_id": "6423e002857845552870ee47",
"job_category_id": "6421383ad151690cd0044d7a",
"job_title": "Marketer management",
"job_status": "active",
"job_shift": "night",
"job_type": "full-time",
"locations": [
{
"_id": "6423e002857845552870ee48",
"job_location_id": {
"_id": "63ca6989d7d8e33504044067",
"street_address": "Gulshan",
"city": "Karachi",
"state": "Sindh",
"country": "Pakistan",
"zip": "75300"
}
}
],
"job_location_type": "remote",
"experience": "<10year",
"job_description": "Full stack dev having 2+ years of experience in php, python, js domains.",
"is_company_name_hidden": false,
"skills": [],
"posted_by_id": "63c8dcba1e1396226c6a16d8",
"company_id": {
"_id": "63c8dcba1e1396226c6a16d9",
"company_name": "kaispe",
"company_website_url": "google.com"
}
}
}

This endpoint fetches a specific posted job

HTTP Request

GET {{BASE_URL}}/job/job_post/:id

URL Parameters

ParameterDescription
idThe id of the job post

Create a job post

curl --location -g '{{BASE_URL}}/job/job_post' \
--header 'Authorization: Bearer accessToken' \
--header 'Content-Type: application/json' \
--data '{
"job_category_id": "63ee10298e476d4c5c9dae2b",
"job_title": "react developer",
"job_status": "active",
"skills": [
{
"skill_level": 2,
"skill_set_id": "63e499cef9052325d02cf428"
}
],
"job_shift": "night",
"job_type": "intern",
"locations": [
{
"job_location_id": "6423e1b7a58211f14c4e4d43"
}
],
"job_location_type": "on-site",
"experience": "0-1year",
"job_description": "Full stack dev having 0-1 years of experience in jsx, babel, javascript.",
"is_company_name_hidden": false
}'

The above command returns JSON structured like this:

{
"status": 200,
"data": "Created"
}

This endpoint creates a job post.

HTTP Request

POST {{BASE_URL}}/job/job_post

Body Parameters

ParameterData typeRequiredRestrictionsDescription
jobcategoryidStringTrueValidThe id of the job category.
job_titleStringTrueNoneThe title of the job.
job_statusStringTrueenum: ["active", "unactive"]The status of the job
skills.skill_levelNumberTrueNoneThe level of the skill
skills.skillsetidStringTrueValidThe id of the skills
job_shiftStringTrueenum: ["morning", "evening", "night"]The shift of the job
job_typeStringTrueenum: ["full-time", "part-time", "contract", "temporary", "freelancer", "intern", "on-call", "visiting"]The type of the job
locations.joblocationidStringTrueValidThe location id of the job
joblocationtypeStringTrueenum: ["on-site", "hybrid", "remote"]The location type of the job
experienceStringTrueenum: ["0-1year", "1-3year", "<5year", "<10year"]The experience of the job
job_descriptionStringTrueNoneThe description of the job