You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Cannot update CO with REST - PATCH

Received Response
6
Views
11
Comments
edited Aug 8, 2016 2:48PM in Integrations and APIs 11 comments

Content

I have the following code below , and i am unable to update the contact with ID=1, what am i doing wrong?

 

 

Version

Latest

Code Snippet

             <?php



$update = array(
                'Email' => 'Norman'
                );

// make the POST fields

$data_string = json_encode($update);



$ch = curl_init();
  
curl_setopt($ch, CURLOPT_URL,"https://user:[email protected]/services/rest/connect/v1.3/CO.Emp/1");
    
    
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");

curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_HEADER, false);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                   

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!