When trying to GET jobs from /portals/<value>/jobs, every single custom field is listed instead of a job's associated custom fields

68 views
Skip to first unread message

JessAtCAG

unread,
May 26, 2017, 6:48:12 AM5/26/17
to CATS API v3
Hi, there,

When I try to display all the jobs, it also displays all the custom fields instead of just the custom fields that our recruiters would tick off with each job upload. How could I just display the associated custom fields with each job, if that makes sense?

I'm calling <subdomain>.catsone.com/v3/portals/<value>/jobs. 

I'd like to display all the relevant information for each job including what custom fields have been ticked off by recruiters when they upload.

Thanks\1
-Jess

Anthony Allan

unread,
May 26, 2017, 11:01:21 AM5/26/17
to CATS API v3
Hey there,

I'm not clear on exactly what you're asking for. Do you want jobs to only come with custom fields that are filled out? If that's the case, that's filtering you'll need to do on your end to not display/process those fields after you fetch them.

JessCAG

unread,
Jun 2, 2017, 4:20:49 AM6/2/17
to CATS API v3
Hi, Anthony,

Yes, that's what I need. For instance, if I had a job board on my website that I only wanted to display IT jobs, I'd want to only pull up jobs that have the custom field "IT" checked in the CATS dashboard.

But, as far as I can tell, when I add filtering rules to the XPath once I've fetched the data, it still wants to display everything because every job has every custom field associated with it, unless there is a true or false value which I'm missing.

I've checked with my coworkers and the recruiters who add the jobs are only checking the relevant fields.

I don't know what I'm doing wrong?
Message has been deleted

JessCAG

unread,
Jun 2, 2017, 7:49:34 AM6/2/17
to CATS API v3
I'm not sure what I'm doing wrong?
I want to only display jobs where this custom field's checkbox is filled. 
{"field": "308986", "filter":"exactly", "value":"true"}

But all jobs show up.

Anthony Allan

unread,
Jun 2, 2017, 10:04:09 AM6/2/17
to CATS API v3
Hi there,

For that filter, you'd need to make sure that field value is an integer, also "true" should just the keyword true, not a string.

{"field": 308986, "filter":"exactly", "value":true}

Let me know if that works for you.
Message has been deleted

itsu...@caglobalint.com

unread,
Jun 6, 2017, 6:13:47 AM6/6/17
to CATS API v3
So it's not working as it's meant to.
As an example, here I am finding a field's ID to filter by:

I've followed instructions here: CATS API v3

I get the same jobs when I try to filter by another custom field ID:




In addition, when I try to cross-check jobs by checking a single custom field's value for a job, I get a error 500:


I'm using Postman for Chrome to make these requests. 



Anthony Allan

unread,
Jun 6, 2017, 10:42:27 AM6/6/17
to CATS API v3
Ah, I'm seeing the issues here.

So, 308986 is not the id of the custom field. 308986 is the id of the value that is checked within the custom field. The id of the custom field you are looking at is 154075. That final screenshot should be returning a 404 not a 500 (that's a bug on our end that will be fixed later today) since that is not a custom field id in the url.

Secondly, you're not actually doing the filters correctly. They do not go in url. Whenever you see json in the API v3, that goes in the body of the call, not the url.

Here is a screenshot of what you'd want to do in postman to get the results you want:



JessCAG

unread,
Jun 7, 2017, 7:27:32 AM6/7/17
to CATS API v3
Thanks so much for clarifying! I got confused by the curly brackets after the equals sign in the url you request.
Also, I'd read the field 154075 as being a checkbox, not something with an integer value. I'm all set though.

Thanks again!
Reply all
Reply to author
Forward
0 new messages