<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://www.zohoapis.com/crm/v2/Contacts/XXXXXXXXXXXXXXX",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS =>"{\r\n \"data\": [\r\n {\r\n \"User_Test\": {\r\n \"name\": \"XXXXXXXXXXX\",\r\n \"id\": \"292XXXXXXXXXXXXXXXXX\"\r\n }\r\n }\r\n ]\r\n}",
CURLOPT_HTTPHEADER => array(
"Authorization: Zoho-oauthtoken 1000.####################################",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Here is the RAW request:
{
"data": [
{
"User_Test": {
"name": "XXXXXXXXXXXXX",
"id": "292XXXXXXXXXXXXX"
}
}
]
}