How can I change a contacts email group subscription status using the Eloqua REST/BULK Api?

1.6k Views Asked by At

I am accessing the Eloqua API and I am able to read the list of Email Groups for each contact and retrieve the Subscription status via the following API Endpoint:

GET api/REST/1.0/data/contact/12339/email/groups/subscription

However the Eloqua Documentation seems to lacking. In fact I can not find the above endpoint in the documentation itself. How can I change the subscription status via API?

Below is a screenshot of what I am talking about: Eloqua Contact Email Group Subscriptions Screen

I can read the email group name and status via the endpoint mentioned above. But how can I modify it programmatically using an Eloqua API?

1

There are 1 best solutions below

2
On BEST ANSWER

I found my own answer to this question. Using the developer tools of Chrome I was able to simulate the REST call and find the end point and replicate it using SOAPUI. This is the key step. As Oracle's Eloqua documentation is underwhelming you can use this way to find the undocumented endpoints.

For those interest the required request looks as follows:

PUT /API/REST/2.0/data/contact/12339/email/group/104/subscription
{
  "contactId": "12339",
  "emailGroup": {
  "id": "104",
  "depth":"minimal",
  "name":"ANL_V_EMAIL"
 },
  "isSubscribed"="false"
 }