Didnt worked for me tho.
This is my code
$contact_id = "158176876";
$inputfields = array(
'party' => array(
'fields' => array(
'definition' => 450793,
'value' => '123456'
)
)
);
$json_fields = $json = json_encode($inputfields);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($ch, CURLOPT_POSTFIELDS, "{\n \"party\": {\n \"type\": \"organisation\",\n \"name\": \"Acme\"\n }\n}");
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_fields);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$headers = array();
$headers[] = "Authorization: Bearer {bearer}";
$headers[] = "Content-Type: application/json";
$headers[] = "Accept: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
echo "Hello World!";
curl_close ($ch);
?>