Job Order filtering by countries

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

Moderators: StaffingSupport, pmularski, BullhornSupport

Post Reply
nixtiodev
User
Posts: 3
Joined: Fri Nov 08, 2024 1:11 pm

Job Order filtering by countries

Post by nixtiodev »

Greetings! Could someone please help me with filtering the Job Orders by countries. I'm doing curl and have this query and params where I set the country ids (+1 and +2192):

$query = 'isDeleted:0 AND isOpen:1 AND address.country.id:(+1 OR +2192)';

$params = array(
'query' => $query,
'fields' => 'title,publicDescription,employmentType,address,owner,id,categories,customText2,salary,customFloat1',
);

The thing is that I get error due to inappropriate country filtering. So that I change to "address.country.id:(+1)" and it works like a charm. However I need to filter not only by US (+1), but also for another 10 countries and I don't get how to set their ids. I've tried also "address.country.id:(+1) AND address.country.id:(+2192)" but this alos didn't work.
Will be very gratefull for any help!
pbearne
User
Posts: 66
Joined: Thu Mar 31, 2016 1:36 pm
Contact:

Re: Job Order filtering by countries

Post by pbearne »

Hi

try this

Call query/JobOrder

with

isOpen=true AND isDeleted=false AND status<>'Archive' AND address.countryID=1 OR address.countryID=2
Paul Bearne
Owner & Developer
Matador Jobs

Matador Jobs is a Bullhorn Marketplace Partner solution for showing your Bullhorn jobs and accepting applications on WordPress powered website. From Bullhorn, to WordPress, and Back! http://matadorjobs.com/
nixtiodev
User
Posts: 3
Joined: Fri Nov 08, 2024 1:11 pm

Re: Job Order filtering by countries

Post by nixtiodev »

pbearne wrote: Wed Nov 13, 2024 10:54 am Hi

try this

Call query/JobOrder

with

isOpen=true AND isDeleted=false AND status<>'Archive' AND address.countryID=1 OR address.countryID=2
Gooda day, unfortunately this didn't help. Could you please suggest any other variants? Much thanks in advance
pmularski
Bullhorn Support Staff
Posts: 1031
Joined: Wed Dec 31, 1969 8:00 pm

Re: Job Order filtering by countries

Post by pmularski »

Greetings nixtiodev,

What specifically failed in the attempt? Did you receive an error message, or did it fail in some other way. Pbearne's code should definitely work properly, so in order to assist further, we will need additional information.
Pat Mularski
Support Forum Admin
Technical Support Engineer 1
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
Contact Numbers
https://help.bullhorn.com/s/support-numbers
https://help.bullhorn.com/s/contactsupport
realalexvdvalk
User
Posts: 18
Joined: Thu Aug 31, 2023 4:15 am

Re: Job Order filtering by countries

Post by realalexvdvalk »

Try this:

isDeleted:0 AND address.country.id:(2185 2408) AND NOT status:Archive
nixtiodev
User
Posts: 3
Joined: Fri Nov 08, 2024 1:11 pm

Re: Job Order filtering by countries

Post by nixtiodev »

realalexvdvalk wrote: Tue Nov 26, 2024 2:01 pm Try this:

isDeleted:0 AND address.country.id:(2185 2408) AND NOT status:Archive
Thanks a lot to everyone! The realalexvdvalk's answer helped me to solve the issue. So the countries ids should have been separated like this:

address.country.id:(1 2 3 4 5) and so on

I've also added isOpen:1 so to fetch all open jobs.

Once more thank you all guys and have good days!
Post Reply