I am adding contact to Infusionsoft from our web page through cURL like this url (https://api.infusionsoft.com/crm/rest/v1/contacts?access_token=) and post array data with json_encode($data) format. Bellow is my code :
$sPostData = json_encode($dataArr);
$uRL = ‘https://api.infusionsoft.com/crm/rest/v1/contacts?access_token=’;
$headers = array(‘Content-Type: application/json’);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $uRL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $sPostData);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, ‘POST’);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
$content = curl_exec( $ch );
$response = curl_getinfo( $ch );
curl_close ( $ch );
But, after adding a contact from our website to Infusionsoft how can I achieve goal through cURL? what will be the cURL url like(https://api.infusionsoft.com/crm/rest/v1/contacts?access_token=) and what will be the post data array, and how can I pass this data ($options[‘integration’] = ‘su102’, $options[‘callName’] = ‘timesharesurveycouk’ and contact_id) in an array? Any code?
Can anybody help me?