Hi,
I am able to access the create/update fields endpoint. However, there are certain fields that I am unable to update.
For example in marketoI have a field called "Phone", but the lead does not update. Other fields do update, so it is working. Below is a snippet of my code:
$add_lead_url = "https://***.mktorest.com/rest/v1/leads.json?access_token=". $this->mk_access_token;
echo $add_lead_url;
$email = $entry[11];
$firstName = $entry[1];
$lastName = $entry[2];
$company = $entry[3];
$phone = $entry[10];
$data = array(
'action' => 'createOrUpdate',
'lookupField' => 'email',
'input' => array(array(
'email' => $email,
'firstName' => $firstName,
'lastName' => $lastName,
'company' => $company,
'phone' => $phone
)
)
);
$options = array(
'http' => array(
'method' => 'POST',
'content' => json_encode($data),
'header'=> "Content-Type: application/json\r\n" .
"Accept: application/json\r\n"
),
);
$context = stream_context_create($options);
$result = file_get_contents($add_lead_url, false, $context);
Thanks,
Dan