Get all candidates - duplicates and omissions

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
tgallatin
User
Posts: 3
Joined: Fri Apr 26, 2019 10:01 am

Get all candidates - duplicates and omissions

Post by tgallatin » Tue Oct 22, 2019 9:22 am

I'm trying to use the API to pull down all of our candidates. I was able to successfully do this for jobOrders, Placements, etc by using the query API. Candidate only allows for me to do a search. When I do this and specify id:[* TO *] it brings back duplicates and when it's finished it has left out many. I can't figure out how to fix this. As of now, I have to do a dupe check and also run my code multiple times because the data seems to be random. I have ordered by +id, but the ids are definitely not ordered. After hours of running this, I still only have 108000 out of 142000 total candidates. Please advice. My url I'm using is (and I increment the start every loop through):

search/Candidate?showTotalMatched=true&start=0&count=66&query=id:[* TO *]&fields=id,name,firstName,middleName,lastName,nickName,gender,status,owner,comments,dateLastComment,customText5,desiredLocations,companyName,dateAvailable,source,customText4,customText12,referredBy,dateOfBirth,ssn,customText11,customText6,email,phone,mobile,phone2,preferredContact,address,secondaryAddress,primarySkills,specialties,categories,certifications,customText1,customText7,customText10,customDate3,dateAdded,isDeleted&orderBy=+id

mholmemi
User
Posts: 24
Joined: Fri Feb 15, 2019 10:31 am

Re: Get all candidates - duplicates and omissions

Post by mholmemi » Mon Nov 04, 2019 11:03 am

Hi,

This is Mikaela from Bullhorn Support.

I would advise using something like the below:
search/Candidate?query=isDeleted:0&fields=id,firstName,lastName,email,phone,status&sort=id&count=500&start=1&BhRestToken=xxxx

I hope this helps. Please let me know if you have any additional questions.
Mikaela Holme-Miller | Tier II/Enterprise Support Analyst

tgallatin
User
Posts: 3
Joined: Fri Apr 26, 2019 10:01 am

Re: Get all candidates - duplicates and omissions

Post by tgallatin » Thu Nov 07, 2019 9:38 am

Hi Mikaela,

I did that and it still doesn't give me all the records I need. Also, I had to use orderBy instead of sort and the max count I can get of candidates is 66. I have to run it multiple times, and with over 130,000 candidates this is not desirable. And even when I use orderBy, they aren't actually ordered by id.

Also, I tried specifically telling it which IDs I want but it appears to be a text search and not an actual ID search. For example, if I tell it I want IDs 1000 to 1100 it will bring back IDs 10500, 103000, etc.

All the other objects (jobOrder, jobSubmission, Placement, etc) I'm able to get fine but Candidate not so much.

Thanks!

mholmemi
User
Posts: 24
Joined: Fri Feb 15, 2019 10:31 am

Re: Get all candidates - duplicates and omissions

Post by mholmemi » Thu Nov 07, 2019 11:25 am

Hi tgallatin,

Can you please send me the call you made based on my recommendation of the below? I would also recommend your order by dateadded rather than ID.

search/Candidate?query=isDeleted:0&fields=id,firstName,lastName,email,phone,status&sort=id&count=500&start=1&BhRestToken=xxxx

Thanks,
Mikaela
Mikaela Holme-Miller | Tier II/Enterprise Support Analyst

Razgriz101
User
Posts: 1
Joined: Fri Nov 29, 2019 2:40 pm

Re: Get all candidates - duplicates and omissions

Post by Razgriz101 » Fri Nov 29, 2019 3:08 pm

Hi Mikaela; thanks for your help! I'm not the original author of the thread, but I managed to do the same thing he asked about with your advice, and managed to regroup all candidates to classify them by my standards.

tgallatin
User
Posts: 3
Joined: Fri Apr 26, 2019 10:01 am

Re: Get all candidates - duplicates and omissions

Post by tgallatin » Wed Dec 04, 2019 10:05 am

With Mikaela's help, I was able to figure it out. Turns out that orderBy is for queries and sort is for searches. So I switched orderBy to sort in my queryString and was able to do this correctly.

Post Reply