How to create a note via the REST API 02409991
Moderators: StaffingSupport, s.emmons, BullhornSupport
How to create a note via the REST API 02409991
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
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
Re: How to create a note via the REST API
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?
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
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
Re: How to create a note via the REST API
Using a PUT seems to work much better, thank you!
Re: How to create a note via the REST API
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"
}
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"
}
Re: How to create a note via the REST API
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.
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)
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)
Re: How to create a note via the REST API
Thanks, that makes the Notes creation work.
-
- User
- Posts: 32
- Joined: Wed Jul 13, 2016 1:57 am
How to create a Appointment via the REST API
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"
}
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
Thanks
Senthur Pandi.S
-
- User
- Posts: 32
- Joined: Wed Jul 13, 2016 1:57 am
Request for Notes REST API
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
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
Thanks
Senthur Pandi.S
Re: How to create a note via the REST API 02409991
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
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)
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)
-
- User
- Posts: 32
- Joined: Wed Jul 13, 2016 1:57 am
Re: How to create a note via the REST API 02409991
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.
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)
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)
-
- User
- Posts: 32
- Joined: Wed Jul 13, 2016 1:57 am
Re: How to create a note via the REST API 02409991
Thanks ColinC,
Your are Reply Appointment Attendees API, But we need retrieve & post API for Notes Template in Bullhorn.
Thanks
Senthur Pandi.S
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
Thanks
Senthur Pandi.S
Re: How to create a note via the REST API 02409991
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?
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)
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)
-
- User
- Posts: 32
- Joined: Wed Jul 13, 2016 1:57 am
Re: How to create a note via the REST API 02409991
Hi,
Please check my screenshot
Please check my screenshot
- Attachments
-
- BH.png (122.37 KiB) Viewed 18005 times
--
Thanks
Senthur Pandi.S
Thanks
Senthur Pandi.S
Re: How to create a note via the REST API 02409991
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
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)
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)