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: 4
Joined: Fri Apr 26, 2019 10:01 am

Get all candidates - duplicates and omissions

Post by tgallatin »

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 »

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: 4
Joined: Fri Apr 26, 2019 10:01 am

Re: Get all candidates - duplicates and omissions

Post by tgallatin »

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 »

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

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

Re: Get all candidates - duplicates and omissions

Post by tgallatin »

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.

mattick17
User
Posts: 1
Joined: Fri Jan 10, 2020 10:25 am

Re: Get all candidates - duplicates and omissions

Post by mattick17 »

I am attempting to do something similar I would like to create validation on a ssn field interaction. the simplified version is I am attempting to use appBridge to reachout and find if the new ssn number already exists in the database in which case I can alert the user and direct them to the preexisting candidate. However I have had no success using ssn. I have seen articles that mention that is may be a confidential or encrypted field. Does this mean that what I'm attempting to do may be impossible?

Post Reply