candidates
Represents a Candidate REST API structure
GET
URI
/services/apexrest/v1.0/candidates/*
Description
Returns candidates with related education and work experience records based on candidate name, candidate email, or candidate ID, and optionally custom fields of candidate, education, and work experience objects that are passed as parameters in the request URL
Input Parameters
ids
Comma-separated Salesforce record IDs of candidates
names
Comma-separated names of candidates
emails
Comma-separated emails of related candidates
vanahcm__candidate__c
Comma-separated API names of custom field to be queried for vanahcm__candidate__c object
vanahcm__candidate_work_experience__c
Comma-separated API names of custom field to be queried for vanahcm__candidate_work_experience__c object
vanahcm__candidate_education__c
Comma-separated API names of custom field to be queried for vanahcm__candidate_education__c object
Sample Code
// GET Response
[{
"ZipPostalCode": "123456",
"Worker": "a4G15000000TkcmEAC",
"Website": "www.testcandidate.com",
"VeteranDisabilityStatus": "Disable Veteran",
"TwitterProfile": "https://twitter.com/CandidateTest",
"Suffix": "Academic",
"StreetAddress": "Street Address",
"Status": "Hired",
"StateProvince": "State Province",
"Source": "Manual",
"Resume": "Resume",
"Region": "Region",
"ReferralName": "Ash Howard",
"Prefix": "Mr.",
"PhoneNumber": "989-989-989989",
"OwnerId": "00515000006GrftAAC",
"OtherDetail": "Other Detail",
"NationalID": "12345",
"Name": "Candidate Test 1",
"MiddleName": "New",
"LinkedInProfileURL": "https://linkedin.com/CandidateTest",
"LastName": "Test 1",
"LastModifiedDate": "2016-04-02T11:48:59.000Z",
"LastModifiedById": "00515000006GrftAAC",
"LastDocuSignStatus": "2015-02-02T11:00:00.000Z",
"LanguagesSpoken": "English",
"Id": "a1D15000004MKvUEAW",
"Gender": "Male",
"FormattedResume": "Formatted Resume",
"FirstName": "Candidate",
"Extension": "123456",
"Ethnicity": "White",
"EmployeeReferral": "a4C15000000URpTEAW",
"Email": "[email protected] ",
"EarliestStartDate": "2016-06-01",
"DocuSignStatus": "Delivered",
"DocuSignEnvelopeId": "ABCD",
"DesiredSalary": "90000",
"CustomFields": [{
"Value": "Test1",
"FieldName": "Custom_Candidate__c"
}, {
"Value": "4.00",
"FieldName": "Custom_Candidate1__c"
}, {
"Value": "[email protected] ",
"FieldName": "Custom_Candidate2__c"
}],
"CreatedDate": "2016-04-02T11:48:59.000Z",
"CreatedById": "00515000006GrftAAC",
"CoverLetter": "Cover Letter",
"CountryCode": null,
"Country": "United States",
"CityTown": "City Town",
"CandidateWorkExperiences": [{
"ToDate": "2016-02-02",
"Responsibilities": "Responsibilities",
"PositionTitle": "Developer",
"LastModifiedDate": "2016-04-02T11:48:59.000Z",
"LastModifiedById": "00515000006GrftAAC",
"Id": "a1C1500000nPGgBEAW",
"FromDate": "2015-02-02",
"EmployerName": "Employer 1",
"CustomFields": [{
"Value": "Test1",
"FieldName": "Custom_Candidate_Work_Experience__c"
}, {
"Value": "4.00",
"FieldName": "Custom_Candidate_Work_Experience1__c"
}, {
"Value": "[email protected] ",
"FieldName": "Custom_Candidate_Work_Experience2__c"
}],
"CreatedDate": "2016-04-02T11:48:59.000Z",
"CreatedById": "00515000006GrftAAC",
"CandidateId": "a1D15000004MKvUEAW"
}, {
"ToDate": "2016-02-02",
"Responsibilities": "Responsibilities",
"PositionTitle": "Sr. Developer",
"LastModifiedDate": "2016-04-02T11:48:59.000Z",
"LastModifiedById": "00515000006GrftAAC",
"Id": "a1C1500000nPGgCEAW",
"FromDate": "2015-02-02",
"EmployerName": "Employer 2",
"CustomFields": [{
"Value": "Test1",
"FieldName": "Custom_Candidate_Work_Experience__c"
}, {
"Value": "4.00",
"FieldName": "Custom_Candidate_Work_Experience1__c"
}, {
"Value": "[email protected] ",
"FieldName": "Custom_Candidate_Work_Experience2__c"
}],
"CreatedDate": "2016-04-02T11:48:59.000Z",
"CreatedById": "00515000006GrftAAC",
"CandidateId": "a1D15000004MKvUEAW"
}],
"CandidateID": "23",
"CandidateEducations": [{
"StartDate": "2013-01-01",
"ProgramOfStudy": "Course1",
"LastModifiedDate": "2016-04-02T11:48:59.000Z",
"LastModifiedById": "00515000006GrftAAC",
"InstitutionName": "Institution 1",
"Id": "a1A15000002bb2uEAA",
"EndDate": "2014-01-01",
"DegreeDiploma": "Degree",
"CustomFields": [{
"Value": "Test1",
"FieldName": "Custom_Candidate_Education__c"
}, {
"Value": "4.00",
"FieldName": "Custom_Candidate_Education1__c"
}, {
"Value": "[email protected] ",
"FieldName": "Custom_Candidate_Education2__c"
}],
"CreatedDate": "2016-04-02T11:48:59.000Z",
"CreatedById": "00515000006GrftAAC",
"CandidateId": "a1D15000004MKvUEAW"
}, {
"StartDate": "2013-01-01",
"ProgramOfStudy": "Course2",
"LastModifiedDate": "2016-04-02T11:48:59.000Z",
"LastModifiedById": "00515000006GrftAAC",
"InstitutionName": "Institution 2",
"Id": "a1A15000002bb2vEAA",
"EndDate": "2014-01-01",
"DegreeDiploma": "Degree",
"CustomFields": [{
"Value": "Test1",
"FieldName": "Custom_Candidate_Education__c"
}, {
"Value": "4.00",
"FieldName": "Custom_Candidate_Education1__c"
}, {
"Value": "[email protected] ",
"FieldName": "Custom_Candidate_Education2__c"
}],
"CreatedDate": "2016-04-02T11:48:59.000Z",
"CreatedById": "00515000006GrftAAC",
"CandidateId": "a1D15000004MKvUEAW"
}],
"AverageRating": 4,
"AreYouWillingToRelocate": "No",
"AreYouEligibleToWorkInTheUS": "Yes",
"AreYouAvailableWeekends": "Yes",
"AreYouAtLeast18YearsOfAge": "Yes",
"AlternateNumber": "9898989898",
"AddToTalentPool": true
}]
POST
URI
/services/apexrest/v1.0/candidates/*
Description
Insert candidate records with related education records and work experience records
Input Parameters
records
Candidate records that need to be inserted
Sample Code
// POST Request
{
"records": [{
"AddtoTalentPool": true,
"OwnerId": "00515000006GrftAAC",
"AreYouAvailableWeekends": "Yes",
"AreYouEligibleToWorkInTheUS": "Yes",
"AreYouWillingToRelocate": "No",
"AverageRating": 4,
"AlternateNumber": "0141-5869865",
"CityTown": "CityTown",
"Country": "United States",
"DesiredSalary": "90000",
"DocuSignEnvelopeId": "456",
"DocuSignStatus": "Delivered",
"EarliestStartDate": "2016-05-01",
"Email": "[email protected] ",
"Ethnicity": "White",
"Extension": "987546",
"FirstName": "Test",
"Gender": "Male",
"LanguagesSpoken": "English",
"LastName": "B",
"LastDocuSignStatus": "2015-02-02T11:00:00.000Z",
"LinkedInProfileURL": "https://linkedin.com/CandidateTest",
"MiddleName": "New",
"NationalID": "123456",
"PhoneNumber": "989-989-989989",
"Prefix": "Mr",
"ReferralName": "Test Referral",
"Region": "Region",
"Source": "Manual",
"StateProvince": "State Province",
"Status": "Hired",
"StreetAddress": "Street Address",
"Suffix": "Academic",
"TwitterProfile": "https://twitter.com/CandidateTest",
"VeteranDisabilityStatus": "Disable Veteran",
"Website": "www.testcandidate.com",
"Resume": "Resume",
"FormattedResume": "Formatted Resume",
"OtherDetail": "Other Detail",
"CoverLetter": "Cover Letter",
"ZipPostalCode": "123456",
"CustomFields": [{
"FieldName": "Custom_Candidate__c",
"Value": "Test Custom Candidate Field"
}, {
"FieldName": "Custom_Candidate1__c",
"Value": 4
}, {
"FieldName": "Custom_Candidate2__c",
"Value": "[email protected] "
}],
"CandidateWorkExperiences": [{
"EmployerName": "Software Senior Engineer",
"FromDate": "2015-01-03",
"PositionTitle": "SSA",
"ToDate": "2016-01-11",
"Responsibilities": "Responsibilities",
"CustomFields": [{
"FieldName": "Custom_Candidate_Work_Experience__c",
"Value": "Test Custom Work Experience Field"
}, {
"FieldName": "Custom_Candidate_Work_Experience1__c",
"Value": 4
}, {
"FieldName": "Custom_Candidate_Work_Experience2__c",
"Value": "[email protected] "
}]
}],
"CandidateEducations": [{
"InstitutionName": "Cambridge",
"DegreeDiploma": "Degree",
"EndDate": "2015-04-02",
"ProgramOfStudy": "Engineering",
"StartDate": "2015-06-02",
"CustomFields": [{
"FieldName": "Custom_Candidate_Education__c",
"Value": "Test Custom Candidate Education Field"
}, {
"FieldName": "Custom_Candidate_Education1__c",
"Value": 4
}, {
"FieldName": "Custom_Candidate_Education2__c",
"Value": "[email protected] "
}]
}]
}]
}
//POST Response
[{
"WorkExperienceIds": ["a1C1500000nPGg6EAG"],
"RecordId": "a1D15000004MKvPEAW",
"EducationIds": ["a1A15000002bb2pEAA"]
}]
PATCH
URI
/services/apexrest/v1.0/candidates/*
Description
Insert or update candidate records with related education records and work experience records
Input Parameters
records
Candidate records that need to be inserted or updated
Sample Code
// PATCH Request
{
"records": [{
"Id": "a1D15000004MKveEAG",
"Name": "Candidate Test 1",
"AddtoTalentPool": true,
"AlternateNumber": "9898989898",
"AreYouAtLeast18YearsOfAge": "Yes",
"AreYouAvailableWeekends": "Yes",
"AreYouEligibleToWorkInTheUS": "Yes",
"AreYouWillingToRelocate": "No",
"AverageRating": 4,
"CityTown": "CityTown",
"Country": "United States",
"DesiredSalary": "90000",
"DocuSignEnvelopeId": "456",
"DocuSignStatus": "Delivered",
"EarliestStartDate": "2016-05-01",
"Email": "[email protected] ",
"Ethnicity": "White",
"Extension": "987546",
"FirstName": "Candidate",
"Gender": "Male",
"LanguagesSpoken": "English",
"LastName": "Test 1",
"LastDocuSignStatus": "2015-02-02T11:00:00.000Z",
"LinkedInProfileURL": "https://linkedin.com/CandidateTest",
"MiddleName": "New",
"NationalID": "123456",
"PhoneNumber": "989-989-989989",
"Prefix": "Mr",
"ReferralName": "Ash Howard",
"EmployeeReferral": "a4C15000000URpTEAW",
"OwnerId": "00515000006GrftAAC",
"Region": "Region",
"Source": "Manual",
"StateProvince": "State Province",
"Status": "Hired",
"StreetAddress": "Updated Street Address",
"Suffix": "Academic",
"TwitterProfile": "https://twitter.com/CandidateTest",
"VeteranDisabilityStatus": "Disable Veteran",
"Website": "www.testcandidate.com",
"ZipPostalCode": "654321",
"Resume": "Resume",
"FormattedResume": "Formatted Resume",
"OtherDetail": "Other Detail",
"CoverLetter": "Cover Letter",
"Worker": "a4G15000000TkcmEAC",
"CustomFields": [{
"FieldName": "Custom_Candidate__c",
"Value": "Updated Test Custom Candidate Field"
}],
"CandidateWorkExperiences": [{
"Id": "a1C1500000nPGfzEAG",
"CandidateID": "a1D15000004MKveEAG",
"EmployerName": "Employer 1",
"FromDate": "2015-02-02",
"PositionTitle": "SSA",
"Responsibilities": "Responsibilities",
"ToDate": "2016-02-03",
"CustomFields": [{
"FieldName": "Custom_Candidate_Work_Experience__c",
"Value": "Updated Test Custom Work Experience Field"
}]
}, {
"Id": "a1C1500000nPGg0EAG",
"EmployerName": "Employer 2",
"CandidateID": "a1D15000004MKveEAG",
"FromDate": "2015-02-02",
"PositionTitle": "Sr. Developer",
"ToDate": "2016-02-02"
}],
"CandidateEducations": [{
"Id": "a1A15000002bb2iEAA",
"InstitutionName": "Institution 1",
"CandidateId": "a1D15000004MKveEAG",
"DegreeDiploma": "Degree",
"EndDate": "2014-01-01",
"ProgramOfStudy": "Engineering",
"StartDate": "2013-01-01",
"CustomFields": [{
"FieldName": "Custom_Candidate_Education__c",
"Value": "Updated Test Custom Candidate Education Field"
}]
}, {
"Id": "a1A15000002bb2jEAA",
"InstitutionName": "Institution 2",
"DegreeDiploma": "Degree",
"CandidateId": "a1D15000004MKveEAG",
"EndDate": "2014-01-01",
"ProgramOfStudy": "Course2",
"StartDate": "2013-01-01"
}]
}]
}
// PATCH Response
[{
"WorkExperienceIds": ["a1C1500000nPGg6EAG"],
"RecordId": "a1D15000004MKvPEAW",
"EducationIds": ["a1A15000002bb2pEAA"]
}]