Opt In Source for Add Contact not working with ACTION_BY_VISITOR

Highlighted
Occasional Advisor

Opt In Source for Add Contact not working with ACTION_BY_VISITOR

When I attempt to add a contact via the API with an Opt in source of ACTION_BY_VISITOR and an Action-By of ACTION_BY_VISITOR (which the page here - https://constantcontact.mashery.com/io-docs ) lists as an option, I get an error 

 

[{
   
"error_key":"query.param.action_by.does_not_match.opt_in_source",
   
"error_message":"action_by and opt_in_source must be consistent when creating a contact."
}]

 

Using this request -> 

 

{"status":"ACTIVE","lists":[{"id":"1234"}],"email_addresses":[{"status":"VISITOR","opt_in_date":"2013-09-18T19:16:41.000Z","opt_in_source":"ACTION_BY_VISITOR","email_address":"test@example.com"}]}

 

and action_by of "ACTION_BY_VISITOR"

 

if I remove ACTION_BY_VISITOR from the opt_in_source variable it seems to work (Though I'm not sure it's doing what I want it to yet), or if I make both the opt_in_source and the action_by ACTION_BY_OWNER it works.  Is this a bug, or am I missing something?

2 REPLIES 2
Highlighted
Moderator

Re: Opt In Source for Add Contact not working with ACTION_BY_VISITOR

Our API support team will look into this today.  The behavior you're describing certainly sounds like a bug.  Will update when we find out more information. 

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Honored Contributor

Re: Opt In Source for Add Contact not working with ACTION_BY_VISITOR

Hello,

 

After taking a bit of time to test this, it looks like everything is working normally when the action_by query parameter is used. Here's the details of the API request I used which worked properly:

 

URI: https://api.constantcontact.com/v2/contacts?api_key=APIKEY&action_by=ACTION_BY_VISITOR

Header:
Authorization: Bearer ACCESS_TOKEN

Body:
{"status":"ACTIVE","lists":[{"id":"1234"}],"email_addresses":[{"status":"VISITOR","opt_in_date":"2013-09-18T19:16:41.000Z","opt_in_source":"ACTION_BY_VISITOR","email_address":"test@example.com"}]}

 

If you still have a problem after replicating that, please let me know and I'll be happy to help!

 

Sincerely,

Elijah G.

API Support Specialist

Elijah G.
API Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Register for our "Making Sense of Online Marketing for Retail" Webinar

Join us on Thursday, August 13th at 2pm ET for a free webinar where we'll discuss how to incorporate online marketing into your retail store.

Read More
Featured