Unsuccessful "addRecord" API for recruit module "Job Openings"
The code below is being executed on my GoDaddy hosting account and $result comes back "false" and no new Job Openings record has been added. Any help would be appreciated.
Note: Authentication token and username/passwords have been removed for this post.
<?php
$username="myusername";
$password="mypassword";
$param="SCOPE=recruitapi&$data";
$ch = curl_init("https://recruit.zoho.com/ats/private/xml/JobOpenings/addRecords?authtoken=mytoken");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_VERBOSE,true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$recruiter_id="my.name";
$client="Pathfinder Oil";
$Job_status="In-progress";
$num_positions=1;
$job_country="USA";
$job_description="This is a test Job";
$data =
"<JobOpenings>
<row no='1'>
<FL val='Posting title'>$job_title</FL>
<FL val='Client'>$client</FL>
<FL val='Client manager'>wayne.igo</FL>
<FL val='Job Catefory'>job posting only</FL>
<FL val='Assigned recruiter'>$recruiter_id</FL>
<FL val='Job opening status'>$job_status</FL>
<FL val='Number of positions'>$num_positions</FL>
<FL val='Country'>$job_country</FL>
<FL val='Roles and responsibilities'>$job_description</FL>
</row>
</JobOpenings>";
$result = curl_exec($ch);
var_dump($result);
curl_close($ch);
?>