Introduction
AutoRecruit 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
Parameter | Description |
---|---|
clientid | The client id of the admin |
clientsecret | The 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
Parameter | Required | Description |
---|---|---|
id | True | The 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
Parameter | Data type | Required | Restrictions | Description |
---|---|---|---|---|
street_address | String | True | None | The street_address of the location. |
city | String | True | True | The city of the location. |
state | String | True | True | The state of the location. |
country | String | True | None | The country of the location. |
zip | String | True | None | The 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
Parameter | Description |
---|---|
job_title | Title of the job. |
job_type | Type of the job. |
experience | Experience of job. |
job_category | Category of the job. |
page | Page no. to navigate at. |
perPage | Total 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
Parameter | Description |
---|---|
id | The 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
Parameter | Data type | Required | Restrictions | Description |
---|---|---|---|---|
jobcategoryid | String | True | Valid | The id of the job category. |
job_title | String | True | None | The title of the job. |
job_status | String | True | enum: ["active", "unactive"] | The status of the job |
skills.skill_level | Number | True | None | The level of the skill |
skills.skillsetid | String | True | Valid | The id of the skills |
job_shift | String | True | enum: ["morning", "evening", "night"] | The shift of the job |
job_type | String | True | enum: ["full-time", "part-time", "contract", "temporary", "freelancer", "intern", "on-call", "visiting"] | The type of the job |
locations.joblocationid | String | True | Valid | The location id of the job |
joblocationtype | String | True | enum: ["on-site", "hybrid", "remote"] | The location type of the job |
experience | String | True | enum: ["0-1year", "1-3year", "<5year", "<10year"] | The experience of the job |
job_description | String | True | None | The description of the job |