API field Name queries

Tagged:

Currently contains 3 posts

Avatar

July 09, 2020 17:12

margolss

1. Is there documentation to identify field names?

2. Can I use the advanced query to identify field names e.g., should my API query mimic the fields as shown after the "candidate.? so for example last_activity how would I represent this in the query see below is what I have but I’m, not sure when to leave the underscore out or if I need to as it seems to work. When do I use a space between words and when is this not necessary?

3. Lastly, the native query in PCR return 17 entries and the API query returns 15. I suspect it is because the Candidate Rating in PCR is empty for these 2 candidates. Can you please modify my API query below or tell me how I should do it.

Generated Query from advanced query in name record for PCR

((Candidates.Candidate_Id NOT IN (SELECT Candidate_Id FROM Candidate_Fields WHERE FName=‘Candidate Rating’ AND FText LIKE ‘x%’)) AND Candidates.Last_Activity > ‘07/07/2020’ AND (Candidates.Specialty_2 LIKE ‘C%’) AND (Candidates.Candidate_Id IN (SELECT Candidate_Id FROM Candidate_Fields WHERE FName=‘Comp – min’ AND FText <= ‘000000130000.00’)) AND (Candidates.Title LIKE ‘ehs%’)) AND ((Candidates.Candidate_Id IN (SELECT Candidate_Id FROM Candidate_Fields WHERE FName=‘Industry Experience’ AND FText IS NULL) OR (Candidates.Candidate_Id NOT IN (SELECT Candidate_Id FROM Candidate_Fields WHERE FName=‘Industry Experience’))) OR (Candidates.Candidate_Id IN (SELECT Candidate_Id FROM Candidate_Fields WHERE FName=‘Industry Experience’ AND FText LIKE ‘%’)) OR (Candidates.Candidate_Id IN (SELECT Candidate_Id FROM Candidate_Fields WHERE FName=‘Industry Experience’ AND FText LIKE ‘%’))) AND ((Candidates.Candidate_Id IN (SELECT Candidate_Id FROM Candidate_Fields WHERE FName=‘Relo state WE’ AND FText LIKECA’)) OR (Candidates.State LIKECA’))

API query

(Candidate Rating ne x AND LastActivity ge 07-07-2020 AND Status eq C AND Comp – min le 130000 AND Title co EHS) AND (Relo State WE co CA OR State co CA)

Custom Fields

Candidate Rating, Source, Comp – min, Relo State CA, State CA

Avatar

July 09, 2020 17:29

Jarrid-PCRecruiter

1. All of the documentation can be found here: https://www.pcrecruiter.net/apidocs_v2/

2. The advanced search query builder uses different naming conventions compared to what we use in the API and also includes table references like SQL (table.column = candidates.first_name). We don’t support using table names via the API.

3. Here’s the custom query broken down:
custom Candidate Rating NOT LIKE x%
AND
last_activity gt 7/7/2020
AND
status = c
AND
custom Comp-min le 130000
AND
title LIKE ehs%
AND
custom Industry Experience is empty

OR

custom Industry Experience is not empty
AND
custom Relo state WE = CA
OR
state = CA

So the main difference between the queries is that you don’t include Industry Experience… this should work:
(Candidate Rating ne x AND LastActivity ge 07-07-2020 AND Status eq C AND Comp – min le 130000 AND Title co EHS AND Industry Experience eq ‘’) OR Industry Experience co ’%’ AND Relo State WE co CA OR State co CA)

Avatar

July 09, 2020 17:29

Jarrid-PCRecruiter

*Please note that this forum replaces single quotes so you’ll need to retype them.

Reply to thread