Skip to main content

Commonly used API Endpoints for Careers Page (Part 2)

This article will provide you the commonly used API endpoints for careers page

Written by Likhitha Satya Maansi Rudra

4. Display only some specific types of jobs from Recruit CRM to the Careers page (Your Website):

Use the Search for Jobs endpoint - Segregate jobs on the basis of custom fields

This logic would make sense while segregating jobs based on custom fields in Recruit CRM.

Let’s say the client has a dropdown-type custom jobs field titled “Job Category,” which has two values a.) Permanent b.) Temporary, and they want to display only the “Permanent” positions on their website.

To make that happen, this endpoint needs to be used. The request body should contain the custom field’s ID, the filter type, and the filter value to get what exactly is required from which field.

Custom fields work based on ID because they can be renamed, and the system won’t be able to distinguish or identify the same, unlike standard fields.

Here’s how the request body would look:

{
"custom_fields": [
{
"field_id": 1,
"filter_type": "equals",
"filter_value": "Permanent"
}
]
}

Carrying our example forward, the field ID would be the unique ID of the custom job field titled “Job Category,” the filter type would be “equals,” and the filter value would be “Permanent.”

The field IDs, supported filter types, and search values can be found here on API Doc:

The response structure, once again, would be similar to the ones shared in the above scenarios. It will fetch a list of all the jobs from Recruit CRM that matches the condition sent in the request body.

5. Display Specific Types of Jobs on Two (or more) Websites or Different Pages on The Same Website (Your Website):

Use the Search for Jobs endpoint - Segregate jobs on the basis of custom fields

The logic behind this scenario is similar to the 4th scenario. The only difference here is that the client’s developer would need to change the filter depending on their requirement.

Continuing our example in scenario 4, if the client wants to display the “Permanent” roles on one website and the “Temporary” roles on another, then their developer would need to make the API call for the permanent roles in the required website and replicate the same process to call for the “Temporary” role in the other website.

The idea here is to clearly define which custom field segregates the jobs and which types of jobs need to be displayed. Once that is clear, making the API call is just a way to reach the destination. The logic is as simple as that!

6. What happens once a candidate applies for a job?

Create candidate record and map them to job on "Applied" stage

When a candidate applies to the job, it should be visible inside Recruit CRM as a candidate record and in the “Applied” stage for the job they applied for.

Two endpoints will be used here:
1. Create a candidate
2. Map/attach/assign candidate to the job

This API endpoint is used to create a new candidate:

Here’s a sample cURL request for the candidate creation process:

curl --request POST \
--url https://api.recruitcrm.io/v1/candidates \
--header 'Authorization: Bearer {YOUR_API_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"first_name": "Michael",
"last_name": "Scott",
"email": "michael@dundermifflin.com",
"contact_number": "+16969696969",
"gender_id": 1,
"specialization": "Computer Science",
"work_ex_year": 2,
"candidate_dob": "2000-06-29T05:36:22.000000Z",
"current_salary": "150000",
"source": "Careers Page",
"skill": "Java,Python",
"resume": "string",
"custom_fields": [
{
"field_id": 1,
"value": "Region 1"
}
]
}'

Here’s a sample response to a successful, valid request:

{
"id": "111",
"slug": "010011",
"first_name": "Michael",
"last_name": "Scott",
"email": "michael@dundermifflin.com",
"contact_number": "++16969696969",
"avatar": "string",
"gender_id": 1,
"qualification_id": 4,
"specialization": "Computer Science",
"work_ex_year": 2,
"candidate_dob": "2000-06-29T05:36:22.000000Z",
"profile_update_link_status": "0",
"profile_update_requested_on": "2021-02-09T10:00:00.000000Z",
"profile_updated_on": "2021-02-10T10:00:00.000000Z",
"current_salary": "150000",
"salary_expectation": "180000",
"willing_to_relocate": 1,
"current_organization": "",
"current_status": "Employed",
"notice_period": 60,
"currency_id": 2,
"facebook": "http://www.facebook.com/michael4",
"twitter": "http://www.twitter.com/michael4",
"linkedin": "http://www.linkedin.com/michael4",
"github": "",
"created_on": "2020-06-29T05:36:22.000000Z",
"updated_on": "2020-06-29T05:36:22.000000Z",
"created_by": "10001",
"updated_by": "10001",
"owner": "10001",
"city": "New York",
"locality": "Manhattan",
"address": "",
"relevant_experience": 2,
"position": "Software Developer",
"available_from": "2020-06-29T05:36:22.000000Z",
"salary_type": {
"id": 1,
"label": "Monthly Salary"
},
"source": "Linkedin",
"language_skills": "English(Native/Bilingual Proficiency)",
"skill": "Java,Python",
"resume": "string",
"resource_url": "string",
"custom_fields": [
{
"field_id": 1,
"value": "Region 1"
}
]
}


After a candidate record gets created in the database, it should be mapped/attached/assigned to the job in the “Applied” stage.

This API endpoint is used to map/attach/assign the candidate in the “Applied” stage:

Here’s a sample cURL request to illustrate the action:

curl --request POST \
--url 'https://api.recruitcrm.io/v1/candidates/16548548880050024169HmX/apply?job_slug=16689216955920026621koc&updated_by=24169' \
--header 'Authorization: Bearer {YOUR_API_TOKEN}' \
--header 'Content-Type: application/json'

Attached below is a sample response to a successful request:

{
"candidate_slug": 1205129,
"job_slug": 1206683,
"status": {
"status_id": 1,
"label": "Applied"
},
"remark": "Updated",
"stage_date": "2020-03-25T16:14:28.000000Z",
"visibility": 1
}

Hope this helps!

Did this answer your question?