How to create a note via the REST API 02409991

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

jkaashoek
User
Posts: 18
Joined: Fri Feb 05, 2016 8:03 pm

How to create a note via the REST API 02409991

Postby jkaashoek » Wed Mar 30, 2016 2:03 pm

The REST API is not totally explicit on how to create a Note. We have to make assumptions since the exact syntax of the REST call is not listed in the REST API reference document. I assumed that the rest call would use:

POST to url : https://rest9.bullhornstaffing.com/rest ... 58a56fdad3
And an (incomplete) JSON sample to post with it would be:
{ "id":"12345","comments":"This is a note"}

But we get an error: Unexpected HTTP status: 400, Bad Request
Response: {
"errorMessage" : "unknown or badly structured command: /entity/Note?BhRestToken=96dc2cad-8bbd-4826
-80d5-f958a56fdad3."

So the questions are:

- What is the url syntax?
- What pararameters should be passed in JSON? For instance the note id can not be specified normally

pmularski
Bullhorn Support Staff
Posts: 858
Joined: Wed Dec 31, 1969 8:00 pm

Re: How to create a note via the REST API

Postby pmularski » Thu Apr 07, 2016 9:52 am

Good Morning Jkaashoek,

In order to add a Note, you need to use a PUT command, not a POST. Can you retry your attempt, while using a PUT?
Patrick Mularski
Senior Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
Bullhorn Support Contact Numbers
US: 617-478-9126
UK: 44 800 032 2848
Australia: 61 28 073 5089
International: 617-478-9131

jkaashoek
User
Posts: 18
Joined: Fri Feb 05, 2016 8:03 pm

Re: How to create a note via the REST API

Postby jkaashoek » Fri Apr 08, 2016 4:00 pm

Using a PUT seems to work much better, thank you!

jkaashoek
User
Posts: 18
Joined: Fri Feb 05, 2016 8:03 pm

Re: How to create a note via the REST API

Postby jkaashoek » Fri Apr 08, 2016 5:07 pm

What we still need is an example of how to create a note for a candidate. The documentation is not complete as to what type each JSON element should have etc.

Here is a sample of something that does not work

{ "commentingPerson":2
,"candidates" : [4]
,"comments":"This is note"
,"personReference":
{ "id" : "2"}
}

org.apache.http.client.ClientProtocolException: Unexpected HTTP status: 500, Internal Server Error
Response: {
"errorMessage" : "error persisting an entity of type: Note",
"errors" : [ {
"propertyName" : "commentingPerson",
"severity" : "ERROR",
"type" : "IMPROPERLY_STRUCTURED_ASSOCIATION"
}, {
"propertyName" : "candidates",
"severity" : "WARNING",
"type" : "ATTEMPT_TO_SET_TO_MANY"
} ],
"entityName" : "Note"
}

ColinC
User
Posts: 49
Joined: Fri Apr 08, 2016 4:54 pm

Re: How to create a note via the REST API

Postby ColinC » Mon Apr 11, 2016 4:21 pm

Hello jkaashoek,

I have created a note from your setup by changing the formatting of the Json.
- commentingPerson and personReference are to-one associations so they should be setup like this
- candidates is a to-many association so the format itself is different since there is the ability to set the association to multiple records
- comments is a string so as you had it setup works fine.

The documentation has a list of every field on the notes entity near the bottom. If you click the name of the entity you wish to see in the table of contents it will take you to the page that the note entity starts on.

Code: Select all

{
"commentingPerson": { "id" : "2"},
"candidates" : [
            { "id" : "4"}
            ],
"comments":"This is note",
"personReference": { "id" : "2"}
}
Colin Coffman
Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
617-478-9126 (US Support)
+44 800 032 2848 ext. 9131 (UK Support)

jkaashoek
User
Posts: 18
Joined: Fri Feb 05, 2016 8:03 pm

Re: How to create a note via the REST API

Postby jkaashoek » Tue Apr 12, 2016 7:31 pm

Thanks, that makes the Notes creation work.

senthur123
User
Posts: 20
Joined: Wed Jul 13, 2016 1:57 am

How to create a Appointment via the REST API

Postby senthur123 » Thu Dec 08, 2016 5:43 am

Hi,

How to Pass guest value in Appointment Create Process.

Here is my sample Data:
{"guests":[{ "id" : "4"}],"subject":"API Test"}

Am facing Following Response :
"messages": [
{
"propertyName": "guests",
"severity": "WARNING",
"type": "ATTEMPT_TO_SET_TO_MANY"
}
--
Thanks
Senthur Pandi.S

senthur123
User
Posts: 20
Joined: Wed Jul 13, 2016 1:57 am

Request for Notes REST API

Postby senthur123 » Wed Jan 18, 2017 12:19 pm

Hi Bullhorn support,
Team, we need following API's to Integrate Vonage Bullhorn.

#1. Retrieve Message Template ( Note Template )
#2. Need Post API & format for set Distribution list while making Note Create API call.

Thanks
Senthur Pandi.S
--
Thanks
Senthur Pandi.S

ColinC
User
Posts: 49
Joined: Fri Apr 08, 2016 4:54 pm

Re: How to create a note via the REST API 02409991

Postby ColinC » Wed Jan 18, 2017 3:55 pm

Hi Senthur,

I am researching this with our team right now. I have more to run through and to reach out to our Tier 3 team. Once I hear back I will keep you updated.

Thank you,
Colin
Colin Coffman
Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
617-478-9126 (US Support)
+44 800 032 2848 ext. 9131 (UK Support)

senthur123
User
Posts: 20
Joined: Wed Jul 13, 2016 1:57 am

Re: How to create a note via the REST API 02409991

Postby senthur123 » Thu Jan 19, 2017 9:36 am

Thanks ColinC
--
Thanks
Senthur Pandi.S

ColinC
User
Posts: 49
Joined: Fri Apr 08, 2016 4:54 pm

Re: How to create a note via the REST API 02409991

Postby ColinC » Thu Jan 19, 2017 11:50 am

Hello again,

I worked with our Tier 3 team and have this worked out now.

In order to create an attendee you must use the appointmentAttendee entity and as such you are going to PUT one record in at a time. Below is an example:
PUT command
https://rest2.bullhornstaffing.com/rest-services/[Corp Token]/entity/AppointmentAttendee

Body:
{
"appointment":{"id":1234},
"attendee":{"id":12345},
"acceptanceStatus":0
}

Basically the order of creating a note and adding attendees through REST is:
1. Create the Appointment without Attendees
2. Create each Attendee separately attaching them to the appointment

Let me know if you have any further questions.
Colin Coffman
Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
617-478-9126 (US Support)
+44 800 032 2848 ext. 9131 (UK Support)

senthur123
User
Posts: 20
Joined: Wed Jul 13, 2016 1:57 am

Re: How to create a note via the REST API 02409991

Postby senthur123 » Fri Jan 20, 2017 9:17 am

Thanks ColinC,

Your are Reply Appointment Attendees API, But we need retrieve & post API for Notes Template in Bullhorn.

Thanks
Senthur Pandi.S
--
Thanks
Senthur Pandi.S

ColinC
User
Posts: 49
Joined: Fri Apr 08, 2016 4:54 pm

Re: How to create a note via the REST API 02409991

Postby ColinC » Fri Jan 20, 2017 10:11 am

Hi Senthur,

I'm not sure what you are requesting. You can do a meta call on notes or look at what fields are available on notes here:
http://developer.bullhorn.com/sites/def ... TAPI_0.pdf

I'm not sure what you are referring to as a note template. Could you elaborate?
Colin Coffman
Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
617-478-9126 (US Support)
+44 800 032 2848 ext. 9131 (UK Support)

senthur123
User
Posts: 20
Joined: Wed Jul 13, 2016 1:57 am

Re: How to create a note via the REST API 02409991

Postby senthur123 » Fri Jan 20, 2017 11:27 am

Hi,

Please check my screenshot
Attachments
BH.png
BH.png (122.37 KiB) Viewed 3301 times
--
Thanks
Senthur Pandi.S

ColinC
User
Posts: 49
Joined: Fri Apr 08, 2016 4:54 pm

Re: How to create a note via the REST API 02409991

Postby ColinC » Fri Jan 20, 2017 4:06 pm

Ah, that. That cannot be accessed via our APIs. It is only accessible in-app.

They might be able to provide you with the contents of one then you can create it on your end and it will be effectively the same thing, however, updates will be manual. The template only fills in the note body. Not sure if this would work for your setup, but setting up note creation templates is possible from your end.

Kind regards,
Colin
Colin Coffman
Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
617-478-9126 (US Support)
+44 800 032 2848 ext. 9131 (UK Support)


Return to “REST API”

Who is online

Users browsing this forum: No registered users and 2 guests

cron