Associate a corporate user to a Note

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
rabbey
User
Posts: 5
Joined: Thu Oct 22, 2020 8:46 pm

Associate a corporate user to a Note

Post by rabbey »

Hi.

I'm trying to associate a corporate user to an existing note. The note could be related to a Candidate, or a Placement.

What I've tried

[PUT]

Code: Select all

https://rest{?}.bullhornstaffing.com/rest-services/{corpid}/entity/Note/123/corporateUsers/456?BhRestToken={token}
Response: The remote server returned an error: (400) Bad Request.

[PUT]

Code: Select all

https://rest{?}.bullhornstaffing.com/rest-services/{corpid}/entity/NoteEntity?BhRestToken={token}
with payload

Code: Select all

{
"note": { "id" : "123"},
"targetEntityID": "456",
"targetEntityName": "CorporateUser"
}
Response: The remote server returned an error: (400) Bad Request.


Hoping someone can help me with this. And perhaps a side question is how is it possible to get more descriptive error content that explains what the error might be?

thanks
khenle
User
Posts: 17
Joined: Wed Feb 26, 2020 12:31 pm

Re: Associate a corporate user to a Note

Post by khenle »

Hi,

I believe the issue might be that you are missing some of the required fields for creating a note. Please see the following doc that will go over non-nullable fields such as dateAdded and commentingPerson: https://bullhorn.github.io/rest-api-doc ... .html#note

Hope this helps.
rabbey
User
Posts: 5
Joined: Thu Oct 22, 2020 8:46 pm

Re: Associate a corporate user to a Note

Post by rabbey »

Thanks for the response.

The note I'm trying to add an additional corporateUser reference to already exists in BH and I'm just trying to add a ToMany. Would required fields come into it?
rabbey
User
Posts: 5
Joined: Thu Oct 22, 2020 8:46 pm

Re: Associate a corporate user to a Note

Post by rabbey »

Just wanted to 'close' this question since I've managed to do this.

Basically it was user error on my part with the code I was using to construct the url in the PUT

so the way to associate other entities to notes is as simple as

[PUT]
https://rest{?}.bullhornstaffing.com/rest-services/{corpid}/entity/Note/123/corporateUsers/456?BhRestToken={token}
Post Reply