error 400, list does not exist...but it does

Occasional Participant

error 400, list does not exist...but it does

Hi, trying to edit a contact and sign them up for a list from our site when they fill out our form.

When I get the contact record, add the ContactList entry and then PUT the record back, I'm getting error 400, list does not exist. But the list does exist and I can query it.

Do you have any ideas? Anything I can try?
(using php and can get records and add new contact with list just fine)

I am able to add a new contact with this list with no problem.
thanks,
---luky

Here's the error I get:

400Contact List http://api.constantcontact.com/ws/customers/mycustomerid/lists/2 does not exist
2 REPLIES 2
Occasional Participant

Turns out that the list was not on Signup Form (because I'm not ready to show it yet).

I am using ACTION_BY_CUSTOMER but it still did not work.

Once I made the list visible on the Signup form (temporarily) I was able to add a contact to the list.

Looks like a bug since the docs say that ACTION_BY_CUSTOMER should work, only ACTION_BY_CONTACT shouldn't work with a non-signup list.
Frequent Participant

We have seen this before and we are working on correcting it.

In the meantime, you should be able to add the Contact even to lists which are not listed on the Sign Up Form. You need to include the OptInSource tag **in the Contact tags** (not just in the Contact lists tags). This means the middle of your entry XML entry might look something like this:

...
<CustomField14>some data</CustomField14>
<CustomField15>some more data</CustomField15>
<OptInSource>ACTION_BY_CUSTOMER</OptInSource>
<ContactLists>
<ContactList id="http://api.constantcontact.com/ws/customers/ACCOUNTNAME/lists/10">
<link xmlns="http://www.w3.org/2005/Atom" href="http://api.constantcontact.com/ws/customers/ACCOUNTNAME/lists/10" rel="self" />
<OptInSource>ACTION_BY_CUSTOMER</OptInSource>
<OptInTime>2008-06-23T06:46:30.000Z</OptInTime>
</ContactList>
<ContactList ...

Thanks,
Tom M
Group Product Manager – Content Editing
Constant Contact
Developer Portal

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

Visit Page