Hello,
When using our PHP sample code, the cc_class.php by default does not have error reporting turned on. To get the file to return the error codes, towards the top of cc_class.php, there is a setting:
var $curl_debug = false; // Set this to true to see the response code returned by cURL
If you make it true, it will return the errors.
If you have any questions about this, please feel free to let me know.
Regards,
... View more

Hi,
Does it give you an error when you post using List ID 16?
When you are retrieving the List ID, where are you getting the data on the List Collection XML? It should be the ID tag, not SortOrder:
<id>http://api.constantcontact.com/ws/customers/joesflowers/lists/2</id>
If you are still having an issue with it, is it possible you can send the XML you are using, as well as your username, and the list name that you are trying to add the contact to? You can send it to the webservices support team.
Regards,
... View more

Hello,
Once you receive the list ID, are you adding the ID to the XML that you are passing when you send the post to the Contact Collection URI?
If you look at that link, we have sample XML that has the requirements of what you need when you post to the collection. In the sample you will notice towards the bottom this:
<ContactLists>
<ContactList id="http://api.constantcontact.com/ws/customers/geeksquad/joesflowers/lists/1" />
</ContactLists>
This is where you need to change the Contact List ID. The number at the end is what the ID is, so you would change that before you do the post.
If you have any further questions regarding this, please let me know.
Regards,
... View more

Hello,
I noticed that you are also speaking to our AppConnect manager, Dave Berard, in regards to this issue.
He let me know that he will contact you about this directly, so that we can better assist you.
Regards,
... View more

Hi,
I just tried to use the form on your site and it did work on my end. I went to your link and added a contact called "thisisatest@test.com". I checked in your account, and it did add the contact to your "Newsletters" list.
If you are still having this issue, it may be better to speak over the phone. If you could email us your contact information, please send it to the webservices support team.
Regards,
... View more

Hello,
In order to add a contact that already exists to a new list, you would want to do a PUT call to the Contact Collection API, with the Contact XML that is updated to have the new list on it. You can find a sample of the contact XML here.
If you have any further questions please let me know.
Regards,
... View more

Hi,
Are you trying to add a contact that is already on your list? The Constant Contact Signup Form Generator will throw an error if the contact is also already in the account.
Our API's do have the ability to update contacts, using a PUT in the Contact Collection API. However, the Signup Form Generator is not built with that functionality.
Regards,
... View more

Hello,
Using the Sample Form, it will update the specific contact to be in only the lists that they actually check. So if the list the contact was originally in is not displayed on the form, it will remove them from those lists.
The best way to do what you are looking for would be to do a Search by email address for the specific contact, which will retreive the contact's ID. You can then do a GET in the Contact Collection URI with the Contacts ID, this will give you a list of the contact lists that the email address is assigned to. You could then add these to an area in your form, allowing customers to check them on or off, or do not display them, but you would be able to include them in the update.
The sample forms are more meant to show examples as to how to do various abilities with our API's; however, I do see how this could cause confusion, and I will submit this feedback to our engineering team for review.
Regards,
... View more

Hello,
I took your form code and tried running it, and it did post my test email address into your account, and then redirected me to your homepage with a success message.
Did you do something from the time you posted this message that fixed the problem?
If you have any further issues please let us know by posting on the forum!
Regards,
... View more

Hi,
For the purposes of using our API's, you login credentials must include your API key, like this: APIKey%username, when inserting the username.
If you do not yet have an API key, you can request one here.
If you have any further questions please let me know.
Regards,
... View more

Hi Amber,
At this time there is really no way to see if a contact has changed their email address in the past if it has already not been tracked. There is a way to see if the contact has been updated, using our API feature to Search for Contacts last updated date.
With such a large list, it may be helpful to do a weekly call to the Search Contact updated date URI, which you can request to pass all of the contacts in a specific time period. It will then list the contacts that have changed, which should prevent you from having to do the calls for your entire database.
Regards,
... View more

Hello John,
I did a post to our Bulk Activities URI with your data and it successfully passed on my end. Is it possible for you to send your actual code to the webservices support team.
We should be able to help you once we take a better look at the code.
Regards,
... View more

Hello Jason,
Deleting a contact list actually just requires a DELETE call to the specific lists URI. You can find the specific lists URI by doing a GET call on the List Collection API found here.
Here is our documentation on deleting contact lists. If you have any further questions please let me know!
Regards,
... View more

Hello Amber,
Our system does not really have a way to automatically find out the history of someones changed email addresses. However, there is a way to do what you are looking to accomplish.
When someone is signed up to our site, they are given a unique identifier in our system called the Contact ID. This contact ID does not change when someone changes their email address, and remains the same forever, unless they were to sign up again under a different address.
When you do a GET call to our Contact Collection API, the XML that is passed has this contact ID listed for each contact, and that is the best way to keep track of a contact throughout changes to their email address. I would suggest having it as a field in your database, so that if someone does change their email, you will know because there will be a different email address to an ID that you already have listed.
If you have any further questions about this please let me know!
Regards
... View more

Hello,
The Bulk Activities API will allow you to post a large amount of contacts to a specific list or lists. The way you would want to do this is to split the contacts up prior to doing the Bulk Activity call, so they certain contacts will go to one list, and others will go to the other list.
Basically our Bulk Activities method allows you to post a large amount of contacts in one call, as opposed to the Contact Collection API that would require a call for each posted contact.
More information on our Bulk Activity API can be found here.
Regards,
... View more

Hello,
In the link that I sent you to the forum, the poster does not actually put the XML in the code. There is an area where he comments that you need to include the XML in that section, but leaves the creating of the XML up to the person using the code.
There is also a different link that has been posted in the forums that offers some more VB.NET support for Constant Contact. You can find it here.
Regards,
... View more

Hello,
We do not really have any official examples of VB.NET being used in the API other than what has been previously posted on the forums. However, we do have a marketplace which has listings of Solution Providers who may be able to help you further if you get stuck in something that we do not have more detailed information on. These Solutions Providers are third party individuals or organizations who have expressed interest and experience working with Constant Contact integrations.
The XML for the Contact Collection API is the information that is passed from either you to our API servers, or vice versa, when adding, deleting, or modifying a contact. Is there anything specific in the XML that you had a question about?
If you have any questions please let me know!
Regards,
... View more

Hello,
You will notice that in the XML that you have there is a section for Contact List ID:
<contactlist id="http://api.constantcontact.com/ws/customers/fredrickgroup/lists/1">
In order to add the contacts to a different list you need to add the correct contact list ID. General Interest is generally list ID 1.
In order to find a specific lists ID, you can do a GET call to the List Collection API, and it will return XML on all of the contact lists and their List ID's.
If you have any questions please feel free to ask them on here.
Regards,
... View more

Hello,
The issue that you are having may be better handled through email. I have the email that you recently sent to me and I am going to respond to you now.
If you have any further questions please let me know through that email.
Regards,
... View more

Hello,
While we do not have any official VB.NET examples, some of our users have posted on this forum examples that have worked for them. This post has a good example that has been known to work in the past for some customers.
If you have any questions please let me know, and I can try to help further.
Regards,
... View more

Hello,
All of our events are restricted to 50 events per call. When there is more than 50 events, there is a next page and previous page URI that you can call to see the next and previous page. You will see that in the XML that is returned when you do the original event GET.
There is a problem currently with the contact collection event calls when calling the next page; however, our engineers are aware of the issue and are working to fix this as soon as possible. Once this has been fixed I will update this thread.
If you have any other questions please let me know.
Regards,
... View more

Hello Wesley,
If a contact is not on the current list, or is on the Removed list, this contact is still considered an existing contact, so it will return the 409 Error. A great way to go around this is to first do a search for the contact using the search by email address feature that we have. If the contact exists, do a PUT call to the Contact Collection API, other do a POST call.
To answer your second question, when doing the search feature, it will return XML that has the Contact ID information, so you will be able to use that when you do your PUT call.
If you have any further questions please let me know.
Regards,
... View more

Hello,
This issue you are having could be a few things, and I would like to troubleshoot this further. In order to look into this in more detail, I am going to need your Constant Contact username, the php files that you are using, and also if you could tell me what program you are using to upload the files to your server, and the upload method you are using.
Please email this information to the webservices support team.
Regards,
... View more

Hello,
Are you using the PHP sample code, or are you using the Constant Contact Signup form generator?
If you are using the Sign up form generator you should not need to use an API key, and do not need to modify the cc_class.php file, as it will ask you for your credentials when you first start the program.
Also, what version of PHP are you using? If you are using the Sample code and are modifying it, where are you modifying it?
If you are using the sample code, what page are you on when you get this error?
If you are still having this issue, you can respond here on this forum, or email the webservices support team. If you have modified the code, please attach it to your response.
Regards,
... View more

Hello Dave,
Our Sample code tries to give an example of everything that our API's can do, so it can be complex when you are just trying to use the API to add a contact in a simple form. Usually if you are just trying to do a very simple sign up form, we would recommend using our Custom Signup Form which you can get here. This allows you to create a simple sign up form with PHP, without having to program it yourself. This will not, however, check to see if the contact is already in the system, and will just tell people who already signed up that they have already done so.
If you do need further customization, in order to add a contact using our API's by hand, you need to use our Contact Collection API using the correct XML which you can find in the link that I just gave. First you would want to do a search using our search function found here. If the contact exists you would do a PUT call to the Contact Collection URI, if it does not exist you would do the post.
If you have any further questions, please feel free to let me know by posting here on the forums!
Regards,
... View more

Hello,
I would like to help you with the issue you are having when you try to add a contact to your list. The error you are receiving usually only happens when the list you are pulling is not an existing list. The best way to find the list ID for a specific list is to do a GET call on the List collection URI, and the list ID is found under the link element for the specific list.
An example would be "<link href="/ws/customers/joesflowers/lists/2" rel="edit" />"; in this case the List ID is 2. Please note that the List ID is not the same as the Sort order, or the number that you see when you are logged into the user interface in your account.
If you pull the list collection and your default list is 7, and you are still returning an error, we may want to look further into this. If you could please email your username and also the list name that is not working to the webservices support team, and we should be able to help you resolve this issue.
Regards,
... View more

Hello,
When using our API's, you can use any Web scripting language that allows HTTP requests. We do have sample code in ASP.NET, Coldfusion, and PHP; however, you are not limited to using just these.
For more information about the specifics on how to do the API call for adding contacts, you can direct your developer to reference our Contact Collection API documentation.
If you or your developer have any further questions regarding this, please let me know.
Regards,
... View more