Is it possible to use the /query call (page 66 of the REST API docs of May 2017) to search the Candidate entity?
We're trying to find candidates on our Bullhorn account from all but one source and within a date range so that we can sync those records regularly to our company website. The REST API docs suggest that the /query call would be ideal for this because it allows the use of parameters like these:
Code: Select all
We're making the call here:Query operation not supported for Candidate, please use /search call instead.
Code: Select all
We currently send candidate info from the website to Bullhorn every 15 minutes: new sign-ups, candidate CV updates, change of candidate details, candidate preferences, etc. We also retrieve some limited information from Bullhorn using the /search call to search candidate records by email address.
The purpose of the code is to also pick up candidate records that recruiters have added manually to Bullhorn and to then give those relevant candidates their login accounts on the company website. It's a small proportion of candidate records but still important. The Bullhorn records we need to pull across have various values for the 'source' field but what they all have in common is that none of them have 'source' set to 'Company Website'.
However simple I make the parameters of the GET/query call, the response is always the same: 'Query operation not supported for Candidate, please use /search call instead.' The response code is 400. It happens when I ask for just three fields and a count of 5 with no other parameters (I’m even leaving out the ‘where’ parameter). I can find a mention of this error here on the forum but no resolution:
The documentation doesn't suggest that the Candidate entity can't be queried this way. It's the /search call that doesn't list Candidate as a valid entity type in the docs (currently page 88), even though we do use /search against candidate records by email address and it works. What's nice about the /query call is that it allows you to build useful constraints into the call to return only the required records.
Would be very grateful for any pointers or suggestions. I realise I'm probably doing something wrong. Hoping not to have to use /search and download all 70,000+ records every time and cycle through them looking for the relevant data.
PS Over the last 24 to 48 hours, I see that we have sometimes been failing to get a rest token after we authorise but the problem above is independent of that – the call is only made after obtaining a valid rest token and session ID.