What these endpoints do and when to use them?
This article covers three scenarios: filtering jobs by a custom job field, showing different sets of jobs on different websites, and creating a candidate and applying them to a job. Your developer can use the response from each endpoint however they want on the page.
Use these endpoints when:
You want to show only specific types of jobs, such as only permanent roles, on your careers page.
You want different websites or pages to show different sets of jobs.
You want a candidate who applies on your website to be created in Recruit CRM and added to a job.
You want to keep your API token hidden while doing all of the above.
Please note
Send every request in this article from your private server, not from your front-end code. Calling the Recruit CRM API from the browser exposes your API token.
4. How to show only specific job types on the careers page
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.
For example, suppose you have 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 exactly what 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 field, 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 in the 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 match the condition sent in the request body.
5. How to show different job types on multiple websites or pages
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 our developer would need to change the filter depending on their requirement.
Continuing our example in scenario 4, if you want 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 on the required website and replicate the same process to call for the “Temporary” roles on 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. How to let a candidate apply for a job from your careers page
Create a candidate record and map them to the job on the "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
}
Conclusion
These endpoints let your developer show only the jobs you want on your careers page, show different jobs on different websites, and add a candidate to a job when they apply, as long as every request goes through your private server. If you need further assistance, contact your Account Manager or use the chat icon at the bottom right of your screen to reach Recruit CRM support.
