CRM API (PHP) - File Upload Field
Hi,
$proof_of_income = $data["data"][0]['details']['id'];
$data = json_decode($token, true);
$apiUrl = "https://www.zohoapis.eu/crm/v2/Potentials/" . $loan_application_ID;
$fields = json_encode(array("data" => array(["Proof_of_Income" => array($proof_of_income)])));
$headers = array(
'Content-Type: application/json',
sprintf('Authorization: Zoho-oauthtoken %s', $access_token)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
$output = curl_exec($ch);
$data = json_decode($output, true);
var_dump($data);
curl_close($ch);
I'm getting a response that the record has been updated succesfully, but the field is still blank in Zoho.
Any help would be appreciated