03077867: POST /resume/parseToHrXml

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
Posts: 7
Joined: Wed Jan 10, 2018 2:38 pm

03077867: POST /resume/parseToHrXml

Post by fjdev1 »


Quick question for anyone to take a stab at - any insight would be extremely appreciated.

I'm trying to parse a PDF resume file using the Bullhorn REST API resume/parseToHrXml endpoint, but am having some trouble.
Here is my existing, relevant code:

Code: Select all

$boundary = uniqid();
$delimiter = '-------------' . $boundary;

$postfields = array('file' => 'http://www.bellevue.edu/student-support/career-services/pdfs/resume-samples.pdf');

$options = array(
	CURLOPT_POST => true,
	CURLOPT_POSTFIELDS => $postfields,
		"Content-Type: multipart/form-data; boundary=" . $delimiter

$ch = curl_init($restUrl.'resume/parseToHrXml?format=pdf&BhRestToken='.$BhRestToken);
curl_setopt_array($ch, $options);
$content = curl_exec($ch);
An error that is returning looks something like this:

Code: Select all

  "errorMessage" : "No File Uploaded!!",
  "errorMessageKey" : "errors.noFileInRequest",
  "errorCode" : 400
I'm not really sure how to format the POST request to the Bullhorn API, so any help would be greatly appreciated. I am just passing in some test PDF right now for the Bullhorn API to parse and return.

Posts: 5
Joined: Mon Sep 12, 2016 10:23 am

Re: 03077867: POST /resume/parseToHrXml

Post by MikeCogle »

Hi fjdev1,

Whilst unfortunately, Bullhorn Support are not able to directly torubleshoot your PHP code, I can recommend some suggestions which will hopefully help moving forward.

Firstly, I've successfully made this call using Postman (https://www.getpostman.com/) which is our recommended API test platform. A screenshot of my successful attempt can be found below:


I achieved this by setting the body to form-data, and then declaring the multipart/form-data as the chosen file. Once you've run this in postman, you can press the "code" button in the top right (highlighted in the above image) which will let you view the code needed to reproduce this functionality in different languages, including PHP with cURL. If you can action this on your side, this will hopefully give you the steps needed to complete this on your side.

We also have an example of /resume/parseToHrXml with cURL on our documentations page: http://bullhorn.github.io/rest-api-docs ... rsetohrxml, which I've used successfully with the below call:

curl -X POST "https://restX.bullhornstaffing.com/rest ... d538962916" -F "file=@XXXX\resume-samples.pdf"


I hope the above helps.

Kind Regards,

Mike Cogle | Bullhorn Support | Senior Enterprise Support Analyst

Post Reply