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

Eloqua REST API

Is it possible to Map a custom object record upon creating it using curl?

$body = '{
  "type": "CustomObjectData",
  "fieldValues": [
  {
  "id": "513",
  "value": "enquirer@gmail.com"
  },
  {
  "id": "501",
  "value": "12"
  }
  ],
  "isMapped": "true"
}';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "$baseURL/API/REST/2.0/data/customobject/{id}/instance");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json","Authorization: "));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
$result = curl_exec($ch);

the above code creates a custom object record but does not Map it with the contact.

Any inputs are appreciated. TIA 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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