[英]How to add Companies in bullhorn using Rest Api?
我正在开发php应用程序,用于使用rest api将我的雇主数据提交到扩音器中。
我有扩音器帐户,客户ID和客户密码
我阅读了文档,也看到了问题
堆栈溢出之一,但找不到任何解决方案
谁能帮我如何为PHP使用api?
提前致谢
下面的代码我曾经使用RESTAPI在BullHorn CRM中创建公司
在这里使用Company作为ClientCorporation对象。
$url = 'https://rest2.bullhornstaffing.com/rest-services/rggmp/entity/ClientCorporation?BhRestToken=09c4822e-04e7-40d8-9570-addc5c447aa7';
$params =array("name"=> "Maha","fax"=>231312313 );
$post_params = json_encode($params);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST,$method); // for Create -> "PUT" & Update ->"POST" //
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Content-Length: '.strlen($post_params));
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_params);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($curl);
$response = json_decode($result, true);
print_r($response);
curl_close($curl);
输出:
(
[changedEntityType] => ClientCorporation
[changedEntityId] => 304
[changeType] => INSERT
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.