searching ClientCorporation via REST API

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
haleymarketingtest
User
Posts: 3
Joined: Mon Jan 04, 2021 6:42 pm

searching ClientCorporation via REST API

Post by haleymarketingtest »

Hello I have code written that should retrieve all Client Corporations, however, it is not working unless I specify a specific id. For the ClientContacts, I am able to add a query to the search with "isDeleted:false" to retrieve all records.

What query logic can I use for ClientCorporation?? I have tried "isDeleted:false", "id is NOT NULL", "id > 0", and similar, but none of them return any results. However, using "id > 1" does work, but it returns only the ClientCorporation with id equal to 1.

Thank you.
ggaragiola
User
Posts: 26
Joined: Wed Feb 26, 2020 12:43 pm

Re: searching ClientCorporation via REST API

Post by ggaragiola »

Hello,

This is Grant from Bullhorn Support.

To search for a ClientCorporation via REST API you cannot search on isDeleted because companies cannot be deleted. It is recommended you search for company ID using the status field in your query. Example below:

/search/ClientCorporation?query=status:Active

Thank you,

Bullhorn Support
haleymarketingtest
User
Posts: 3
Joined: Mon Jan 04, 2021 6:42 pm

Re: searching ClientCorporation via REST API

Post by haleymarketingtest »

Grant,

One more question, can a search for multiple statuses be performed via the REST API? If so, how? I tried "status:Active,Proposal" and also "status:Active or Proposal."

Thank you.
ggaragiola
User
Posts: 26
Joined: Wed Feb 26, 2020 12:43 pm

Re: searching ClientCorporation via REST API

Post by ggaragiola »

Hello haleymarketingtest,

There are two way to search for multiple statuses:

/search/ClientCorporation?query=status:"Active Account" OR status:Unqualified

or

/search/ClientCorporation?query=status:("Active Account" Unqualified)

Any status that contains spaces must have ""

Thank you,

Bullhorn Support
haleymarketingtest
User
Posts: 3
Joined: Mon Jan 04, 2021 6:42 pm

Re: searching ClientCorporation via REST API

Post by haleymarketingtest »

I have a question about dating the ClientContact data with the REST API. Can this be done with a POST request?
i ask because this is the error message that I get back:

{"errorMessage":"Invalid entity used. Valid entities are: JobSubmission, Placement","errorMessageKey":"errors.entity.override.invalidEntity","errorCode":400}',
Post Reply