Creating a Candidate

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
fyaconiello
User
Posts: 9
Joined: Tue Jun 19, 2012 10:15 am

Creating a Candidate

Post by fyaconiello » Thu Aug 01, 2013 1:43 pm

I am creating a candidate record and having trouble setting the CountryID for the new candidate.

See: http://developer.bullhorn.com/sites/def ... TAPI_0.pdf the Candidate section has this about Candidate address and it doesn't mention Country anywhere.
address
Address Candidate's address.
This is an
address object containing
Street Address, City, State, and
Zip.

mpeterson
User
Posts: 5
Joined: Fri Aug 16, 2013 8:18 am

Re: Creating a Candidate

Post by mpeterson » Fri Aug 16, 2013 9:39 am

I will update the documentation to list the subfields of the address field, including countryID.

To set countryID, you first want to make a meta/Candidate?fields=address(countryID) call to see what the possible values are. These values are based on the Candidate field map. You'll get a response like this:
{
"entity" : "Candidate",
"entityMetaUrl" : "http://https://rest.bullhorn.com/e999/r ... te?fields=*",
"label" : "Candidate",
"fields" : [ {
"name" : "address",
"type" : "COMPOSITE",
"dataType" : "Address",
"label" : "fullAddress",
"fields" : [ {
"name" : "countryID",
"type" : "SCALAR",
"dataType" : "Integer",
"label" : "CountryID",
"options" : [ {
"value" : 1,
"label" : "Country1"
}, {
"value" : 2,
"label" : "Country2"
} ]
} ]
} ]
}

Once you know the countryID you want to use, you can include it in the body of your POST /entity/Candidate call, like this:
{
"firstName": "test",
"lastName": "test",
"name": "test",
"username": "test",
"address": {
"address1" : "test",
"address2" : "test",
"city" : "New York",
"state" : "NY",
"zip" : 12345,
"countryID" : 1
}
}

Post Reply