How to update the categories of the candidate records using rest API

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
ashishM
User
Posts: 30
Joined: Tue May 03, 2016 2:28 am

How to update the categories of the candidate records using rest API

Post by ashishM »

Hi,

I am using REST API + C#.Net.
I want to update the list of the categories of the candidate record using Rest API.

Please guide me on this.
lciastko
User
Posts: 26
Joined: Wed Feb 26, 2020 12:17 pm

Re: How to update the categories of the candidate records using rest API

Post by lciastko »

Hi there,

To pull a list of all categories in a system you can use the below call(this is how you can obtain the category IDs):

.../query/Category?where=enabled=true&fields=id,name,enabled&start=0&count=500...

Here is some of our documentation on Categories and candidates:
http://bullhorn.github.io/rest-api-docs ... l#category
http://bullhorn.github.io/rest-api-docs ... #candidate

Have a great day,
Lindsay
ashishM
User
Posts: 30
Joined: Tue May 03, 2016 2:28 am

Re: How to update the categories of the candidate records using rest API

Post by ashishM »

Hi Lindsay,

Thank you for your reply.
The solution you suggest is helpful in retrieving the categories.

I want to update the categories of the candidate record.
Will you please suggest any solution on how to update the categories of the candidate record via REST API + C#.NET.
lciastko
User
Posts: 26
Joined: Wed Feb 26, 2020 12:17 pm

Re: How to update the categories of the candidate records using rest API

Post by lciastko »

Hi Again!

Unfortunately, I cannot comment on how to preform this in C#.NET.

To update a Candidate Category using REST, you would POST against the .../entity/Candidate/ Endpoint and pass in the category and ID into the Body.

Hope this helps!
Lindsay
rusourcing
User
Posts: 1
Joined: Thu Oct 15, 2020 10:54 am

Re: How to update the categories of the candidate records using rest API

Post by rusourcing »

Hi Lindsay,

My organization recently went through a massive consolidation of two Bullhorn instances. One of the results is that we're now supposed to pass Category name, rather than ID, when updating a Candidate record's Category list.

I've spent several hours now trying to make this work and thus far have been unable to.

In the past, we approached this with:

Code: Select all

 
{
  // ... some Candidate data
  category: {
    id: ###
  }
The following throws us a 500 error:

Code: Select all

{
  // ... some Candidate data
  category: {
    name: 'some category name'
  }
}
Additionally, I've tried several shots-in-the-dark, all of which have failed, including (but not limited to) using the `categories` property.

I noticed in the Entity Reference, the `name` property for Category says "Name of the category + PLId (for categories)" but I haven't been able to suss out what this means.
Post Reply