posting Education details

Have a question about Bullhorn's HTTP based APIs? You've found the right place.

API Update [posted on December 13, 2012]:

This version of the Bullhorn APIs should no longer be used.

All new work should be done using Bullhorn's REST or Web Services APIs. For more information please visit: http://developer.bullhorn.com/documentation

Bullhorn REST API provides a simpler and faster way for developers to build applications that interact with the Bullhorn platform and is used by Bullhorn Inc. to develop features of the Bullhorn ATS/CRM application.

Of the BullhornSTAFFING HTTP API interfaces listed below, our analysis shows that the following are most commonly used by developers:

Resume Parsing API
Published Job Data (XML)
The interface to these will continue to work as is because Bullhorn will replace the back end to use REST API. The URLs for these 2 specific APIs may change in the 2nd half of 2013; developers may require to update their applications to use the new URLs.

Moderators: StaffingSupport, s.emmons

venki
User
Posts: 17
Joined: Tue Feb 08, 2011 11:26 am

posting Education details

Post by venki » Tue Feb 08, 2011 11:39 am

Hi,

Please let me know if any manual is there to post education data using Legacy API.

apsmith
Site Admin
Posts: 2051
Joined: Wed Dec 31, 1969 8:00 pm

Re: posting Education details

Post by apsmith » Tue Feb 08, 2011 12:44 pm

Venki,

There are test pages that you can use as templates, but no manuals.
Andrew Smith
Director, Technical Operations
Developer Forum Admin

venki
User
Posts: 17
Joined: Tue Feb 08, 2011 11:26 am

Re: posting Education details

Post by venki » Tue Feb 08, 2011 3:00 pm

Please let me know where are the test pages available

apsmith
Site Admin
Posts: 2051
Joined: Wed Dec 31, 1969 8:00 pm

Re: posting Education details

Post by apsmith » Tue Feb 08, 2011 4:16 pm

Venki,

If you had searched this forum, you would have found many links to this main page: http://www.bullhornstaffing.com/bullhor ... efault.cfm
Andrew Smith
Director, Technical Operations
Developer Forum Admin

venki
User
Posts: 17
Joined: Tue Feb 08, 2011 11:26 am

Re: posting Education details

Post by venki » Wed Feb 09, 2011 2:34 am

Hi,
I am able to post education data using URL http://sl1api.bullhornstaffing.com/bull ... PITest.cfm
I want to post the same data from asp application.
Can you please tell me the input parameters to be passed ?
Any sample code will be helpful for me.

apsmith
Site Admin
Posts: 2051
Joined: Wed Dec 31, 1969 8:00 pm

Re: posting Education details

Post by apsmith » Wed Feb 09, 2011 9:27 am

Venki,

That test page that you posted is a working test page, you can view the source to see the parameters.
Andrew Smith
Director, Technical Operations
Developer Forum Admin

venki
User
Posts: 17
Joined: Tue Feb 08, 2011 11:26 am

Re: posting Education details

Post by venki » Wed Feb 09, 2011 9:51 am

Hi,

For Data to be posted using legacy api,the parameters username,password,apikey,CorporationId,userid,session are enough or we need to add
Privatelabel id,encrypted api key ?

apsmith
Site Admin
Posts: 2051
Joined: Wed Dec 31, 1969 8:00 pm

Re: posting Education details

Post by apsmith » Wed Feb 09, 2011 9:56 am

You only need privatelabelID and encryptionkey, the new API key does not work with the legacy API pages.
Andrew Smith
Director, Technical Operations
Developer Forum Admin

venki
User
Posts: 17
Joined: Tue Feb 08, 2011 11:26 am

Re: posting Education details

Post by venki » Wed Feb 09, 2011 11:32 am

Hi,

I posted the following code .
private label id and encrypted api (not made public)
I received the error after posting

XML is WRITE 1000 344 12 2 3573 2004-06-27 00:00:00 S:ClientCannot find dispatch method for {}session

Please let me know the error in the code.


strCRLF=chr(13)+chr(10)
s="<?xml version=""1.0"" encoding=""utf-8""?>"+strCRLF
s=s+"<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:apis=""http://apiservice.bullhorn.com/"" >"+strCRLF
s=s+"<soapenv:Header/>"+strCRLF
s=s+"<soapenv:Body>"+strCRLF
s=s+"<apis:startSession>"+strCRLF
s=s+"<privateLabelId></privateLabelId>"+strCRLF
s=s+"<encryptedAPIKey></encryptedAPIKey>"+strCRLF
s=s+"</apis:startSession>"+strCRLF
s=s+"</soapenv:Body>"+strCRLF
s=s+"</soapenv:Envelope>"+strCRLF
Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", "https://api.bullhornstaffing.com/webservices-1.1/", False
xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
xmlhttp.send(s)
xmldoc = xmlhttp.responseText
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile(server.mappath("test.xml"),true)
f.WriteLine(xmlhttp.responseText)
f.Close
set f=nothing
set fs=nothing
Dim objXMLDoc
Set objXMLDoc = Server.CreateObject("MSXML2.DOMDocument.4.0")
objXMLDoc.async = False
objXMLDoc.validateOnParse = False
objXMLDoc.resolveExternals = False
Dim bLoadResult
bLoadResult = objXMLDoc.load(server.mappath("test.xml"))
If bLoadResult Then
Dim siteNodes
Set siteNodes = objXMLDoc.selectNodes("//return")
Dim aSiteNode
For Each aSiteNode in siteNodes
With Response
.write "CorporationId: " & aSiteNode.selectSingleNode("corporationId").nodeTypedValue & "<br>"
CorporationId = aSiteNode.selectSingleNode("corporationId").nodeTypedValue
.write "Userid: " & aSiteNode.selectSingleNode("userId").nodeTypedValue & "<br>"
Userid = aSiteNode.selectSingleNode("userId").nodeTypedValue
'.write "Client: " & aSiteNode.selectSingleNode("client").nodeTypedValue & "<br>"
Client = aSiteNode.selectSingleNode("client").nodeTypedValue
End With
Next
Response.Write "</ul>"
'response.write CorporationId & "<br>"
'response.write Userid & "<br>"
'response.write Client & "<br>"
Else
'Load Unsuccessful, print error
Response.Write "<font color='red'>" & objXMLDoc.parseError.reason & "</font>"
End If

ce="<?xml version=""1.0"" encoding=""utf-8""?>"+strCRLF
ce = ce + "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:apis=""http://apiservice.bullhorn.com/"">"+strCRLF
ce = ce + "<soapenv:Header/>"+strCRLF
ce = ce + "<soapenv:Body>"+strCRLF
ce = ce + "<session>"+strCRLF
ce = ce + "<client>" & Client &"</client>"+strCRLF
ce = ce + "<corporationId>" & CorporationId & "</corporationId>"+strCRLF
ce = ce + "<userId>" & Userid & "</userId>"+strCRLF
ce = ce + "</session>"+strCRLF
ce = ce + "<dto xsi:type=""ns4:candidateEducationDto"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" "+strCRLF
ce = ce + "xmlns:ns4=""http://candidate.entity.bullhorn.com/"">"+strCRLF
ce=ce+ "<USERTEMPLATE>"+strCRLF
ce=ce+ "<ACTION>WRITE</ACTION>" +strCRLF
ce=ce+"<USERID>1000</USERID>" + strCRLF
ce=ce+"<candidateEducationID>344</candidateEducationID>"+strCRLF
ce=ce+"<USERTEMPLATEID>12</USERTEMPLATEID>"+strCRLF
ce=ce+"<INSTANCE>2</INSTANCE>"+ strCRLF
ce=ce+"<USERTEMPLATEATTRIBUTES>"+strCRLF
ce=ce+"<USERTEMPLATEATTRIBUTE>"+strCRLF
ce=ce+"<USERTEMPLATEATTRIBUTEID>3573</USERTEMPLATEATTRIBUTEID>"+strCRLF
ce=ce+"<VALUE>2004-06-27 00:00:00</VALUE>"+strCRLF
ce=ce+"</USERTEMPLATEATTRIBUTE>"+strCRLF
ce=ce+"</USERTEMPLATEATTRIBUTES>"+strCRLF
ce=ce+" </USERTEMPLATE>"+strCRLF
ce = ce + "</soapenv:Body>"+strCRLF
ce = ce + "</soapenv:Envelope>"+strCRLF
response.write("XML is "&ce)
xmlhttp.Open "POST", "https://api.bullhornstaffing.com/webservices-1.1/", False
xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
xmlhttp.send(ce)
response.write "<font color='green'>" & xmlhttp.responseText & "</font>" %>

apsmith
Site Admin
Posts: 2051
Joined: Wed Dec 31, 1969 8:00 pm

Re: posting Education details

Post by apsmith » Wed Feb 09, 2011 1:53 pm

Venki,

I don't think you are calling this correctly. The legacy APIs are not session based, they operate on a simple GET/POST method.

Please use the test page as a working example of how to post this data.
Andrew Smith
Director, Technical Operations
Developer Forum Admin

venki
User
Posts: 17
Joined: Tue Feb 08, 2011 11:26 am

Re: posting Education details

Post by venki » Wed Feb 09, 2011 2:13 pm

Hi,

I am unable to find get/post samples in http://www.bullhornstaffing.com/bullhor ... efault.cfm

can you please help me

apsmith
Site Admin
Posts: 2051
Joined: Wed Dec 31, 1969 8:00 pm

Re: posting Education details

Post by apsmith » Wed Feb 09, 2011 2:29 pm

Venki,

You posted this test page yourself, earlier in the string: http://sl1api.bullhornstaffing.com/bull ... PITest.cfm
Andrew Smith
Director, Technical Operations
Developer Forum Admin

venki
User
Posts: 17
Joined: Tue Feb 08, 2011 11:26 am

Re: posting Education details

Post by venki » Thu Feb 10, 2011 11:54 am

Hi,

Please let me know the below procedure is correct to post education data

private label id and encrypted api (not made public)

<% strCRLF=chr(13)&chr(10)
privateID="xxxx"
key="xxxxx"

ce=ce&"<USERTEMPLATE>"&strCRLF
response.write(ce)
ce=ce&"<ACTION>WRITE</ACTION>" &strCRLF
response.write(ce)
ce=ce&"<USERID>1000</USERID>" & strCRLF
ce=ce&"<candidateEducationID>344</candidateEducationID>"&strCRLF
ce=ce&"<USERTEMPLATEID>12</USERTEMPLATEID>"&strCRLF
ce=ce&"<INSTANCE>2</INSTANCE>"&strCRLF
ce=ce&"<USERTEMPLATEATTRIBUTES>"&strCRLF
ce=ce&"<USERTEMPLATEATTRIBUTE>"&strCRLF
ce=ce&"<USERTEMPLATEATTRIBUTEID>3573</USERTEMPLATEATTRIBUTEID>"&strCRLF
ce=ce&"<VALUE>2004-06-27 00:00:00</VALUE>"&strCRLF
ce=ce&"</USERTEMPLATEATTRIBUTE>"&strCRLF
ce=ce&"</USERTEMPLATEATTRIBUTES>"&strCRLF
ce=ce&"</USERTEMPLATE>"&strCRLF
'response.write(ce)

I've the asp code as above. The xml is constructed in asp and I need to post it into Bullhorn system. Is there a url against which I can do that or is there a document that will guide me to do using a asp code.

I'm trying to basically develop a client application for Bullhorn system which people can use over the web to post data into Bullhorn system. Most of that is accomplished using the webservice api and soap xml, however, you tell some information like "education" for example can be posted only using legacy api. How do I do it through the code now over the web. Can legacy api be invoked through code like webservice api or is there a stand alone component that I need to get and use it in my code?

apsmith
Site Admin
Posts: 2051
Joined: Wed Dec 31, 1969 8:00 pm

Re: posting Education details

Post by apsmith » Fri Feb 11, 2011 9:43 am

Venki,

The test page provided is a working example of how to post the data, I would suggest mirroring this if you are unsure exactly how to post the XML.
Andrew Smith
Director, Technical Operations
Developer Forum Admin

venki
User
Posts: 17
Joined: Tue Feb 08, 2011 11:26 am

Re: posting Education details

Post by venki » Fri Feb 11, 2011 1:20 pm

Hi
Ok.Thanks.I will use test page example to post data.
using URL http://sl1api.bullhornstaffing.com/bull ... PITest.cfm,

I was able to post only one education record in bullhorn application for userid 1234.But if i want to post one more record in education for userid 1234,it updates existing record .how to add new education record for userid 1234.
Education id is to be added for updating already existing record?Please let me what is meant by instance.
Please refer the code below

<USERTEMPLATE>
<ACTION>WRITE</ACTION>
<USERID>1234</USERID>
<USERTEMPLATEID>12</USERTEMPLATEID>
<INSTANCE>1</INSTANCE>
<USERTEMPLATEATTRIBUTES>
<USERTEMPLATEATTRIBUTE>
<USERTEMPLATEATTRIBUTEID>58</USERTEMPLATEATTRIBUTEID>
<VALUE>What's my name?</VALUE>
</USERTEMPLATEATTRIBUTE>
<USERTEMPLATEATTRIBUTE>
<USERTEMPLATEATTRIBUTEID>59</USERTEMPLATEATTRIBUTEID>
<VALUE>Test</VALUE>
</USERTEMPLATEATTRIBUTE>
</USERTEMPLATEATTRIBUTES>
</USERTEMPLATE>

Locked