Some contacts have a status of REMOVED or OPT-OUT when querying them with the API. With these statuses the list array is empty.
I figured that this is the normal functionality. But for soem reason, when you look up the contact using the CC.com UI, the contact may belong to many lists and I can send them emails.
How come you can add this contact to list and send them emails, but once added to the list the API cannot get the list results?
The following contact is on 4 lists in the cc.com UI and I can send him emails. Why cant teh API query the lists he is on.
$contact_info = $cc->getContactByEmail(ACCESS_TOKEN, $email);
This works correctly if teh contact ahs an ACTIVE status.
 => Ctct\Components\Contacts\Contact Object ( [id] => 24 [status] => REMOVED [first_name] => XXXXX [middle_name] => [last_name] => [confirmed] => [source] => [email_addresses] => Array (  => Ctct\Components\Contacts\EmailAddress Object ( [id] => 100f5210-7dbc-11e3-b30a-d4ae5292b9a6 [status] => REMOVED [confirm_status] => NO_CONFIRMATION_REQUIRED [opt_in_source] => ACTION_BY_OWNER [opt_in_date] => 2013-07-23T14:13:51.000Z [opt_out_date] => 2014-02-07T05:00:00.000Z [email_address] => XXXXX ) ) [prefix_name] => [job_title] => [addresses] => Array (  => Ctct\Components\Contacts\Address Object ( [id] => 1268ab60-7dbc-11e3-b30a-d4ae5292b9a6 [line1] => [line2] => [line3] => [city] => 40 [address_type] => BUSINESS [state_code] => [country_code] => [postal_code] => [sub_postal_code] => ) ) [notes] => Array ( ) [company_name] => XXXXX [home_phone] => [work_phone] => [cell_phone] => [fax] => [custom_fields] => Array (  => Ctct\Components\Contacts\CustomField Object ( [name] => CustomField1 [value] => 110148 ) ) [lists] => Array ( ) [source_details] => )
Thanks for sending the details over. We're going to look into this more on our side. From what you're describing and I'm seeing, this looks like a possible bug in what we're returning to you. Will update when we have more information.
I'm experiencing the same thing and contacted webservices support last week, but do not have a resolution yet. I've tried everything I can think of thru the API and web UI to fix the contact. I wish they could/would just purge the affected contact/records from the database so I could start fresh with this particular contact.
Did support indicate to you (other than what's in this thread) that they are treating it as a bug with an intent to fix?
Sorry for the frustration & delay on this issue. We are investigating this, and we believe that the cause has to do with our system now allowing an email address to exist in the account twice. I will keep you posted.
Partner API Support Engineer
I have done some digging around to get the latest information on this and while we are actively working to resolve the problem, we unfortunately do not yet have a specific time estimate for when this will be done.
In this specific case, what is happening is a side-effect of the available potential to have two contacts with the same email address in our new contact management platform. This becomes an issue in some cases with API applications because the internal service that we use to communicate between our APIs and our contact management platform does not yet support the ability to return multiple contacts when you perform an exact search by email. In a case where you have two contacts with the same email address, but only one of the two contacts has a list subscription, the search may prioritize the contact which does not have any list subscriptions, thus causing the case you are seeing.
To demonstrate this a bit more clearly, here is a quick example. For the sake of this example, I have Joe Smith and his wife Beth Smith who share an email address. Here is what their contact information would look like:
Joe: Email Address: firstname.lastname@example.org First Name: Joe Last Name: Smith List Subscriptions: General Interest, Weekly Mailings Contact ID: 55
Created: March 1st, 2014 Status: Active
Beth: Email Address: email@example.com First Name: Beth Last Name: Smith List Subscriptions: None Contact ID: 34
Created: January 10th, 2014
Given this information, if I do a search in the API for the email address firstname.lastname@example.org, the service that interfaces between the management platform and the API will return the contact who was created first, thus giving me Beth's information. However, Beth is not assigned to any lists and is a deleted contact. Because Beth is deleted, she will not appear in the UI, but the API can still see her. This causes the API to only show a contact with no lists, and the UI to only show a contact with lists.
As I mentioned at the start of this post, we are working to address this issue by rolling out an update to the service with allows our API to interface with the contact management platform. This update will allow the API to return all contacts that are associated with an email address and thus allowing you to see both Joe and Beth. Because we want to be careful not to introduce new issues while we are working on an update to address issues like this, we are making sure that we take our time to do things right the first time and have a clean update when we are able to release it.
If you do have any questions, please feel free to reply here and we will be happy to help.
I'm sorry to revive such an old thread, but I'm using APIv2 and still experiencing this. I have contacts in a REMOVED state with identical emails to those that are active. I'm using the PHP wrappers and running getContactByEmail and I only get a result set of 1 contact and it is the REMOVED contact. I never get the active. Has this bug been fixed by an update so I can filter out the REMOVED contacts that have identical email addresses to active contacts from my call results?
We've made the business decision to stop using the API completely. The API does not seem to be compatible with the functionality provided by the web interface or the business rules governing how Constant Contact manages their data. Using the API for updates can result in data corruption; Constant Contact's reluctance to enhance the API or manipulate data directly to resolve the issues created by the API do not provide an acceptable environment for leaving our API interface in use. I urge caution if you are considering using the API for updates.
My apologies for the frustrations you've faced using the API. Our API development team is working hard to minimize these types of issues. We understand how frustrating it can be when the functionality of our UI and API doesn't align.
We are working with our Contact Management development team to enhance and build out fully featured Contact APIs. This project is taking longer than we anticipated and would have liked. We do appreciate your feedback and the patience you've had so far.
I understand that patience is finite and does wear thin. I can also understand your decision to not use the API due to the problems you have run into. We have managed to mitigate the majority of problems our developers have run into. There are some limitations we are faced with that we have not been able to get passed so far, such as multiple contacts with the same email address not working effectively with search by email. We will continue to work on enhancing the API with the goal of solvingl of these problems and aligning the API and UI functionality. Hopefully you will continue to monitor our API updates going forward and that we can eventually meet your expectations.
It may be possible to work around the issue, but it will require some investigation work. Is it possible for you to PM me your Constant Contact username and one or more email addresses that return an empty set of lists?
I do also want to mention that if you are working on new development it is preferable to work with the V2 API rather than V1. The V1 API is in a deprecated state now and is only receiving fixes to critical issues moving forward.
Please let me know if you have any questions!
I can't use the V2 sdk because the server I'm working on didn't meet the requirements so I just stick on V1. Okay I will PM you.
How can I send you a personal message? I can't see it anywhere...
This is what I get on all contacts when I tried to get their lists:
[lists] => Array
You can send messages by clocking on the small letter icon at the top-right corner of the community and then choosing Compose Message and sending to me me (Elijah_G).
As a note, if all contacts are showing empty lists, it is likely that you are requesting contacts from the collection, which does not include list membership data. With our V1 API, list memberships are only returned from the API when you are requesting a single contact, likely with the getContactDetails method in the wrapper for our V1 API. Unless you are specifically calling the getContactDetails method, then it is expected that the list memberships would not be shown in our V1 API.
Please let me know if you have any additional questions!
Okay. I tried the getContactDetails method and passed to its url param the link value that I get from searchContactsByEmail method but I get an error. What should be the format of the value? Here is the error:
Catchable fatal error: Argument 1 passed to ConstantContact::getContactDetails() must be an instance of Contact, string given...
Nevermind I'm able to get it. I passed the object itself.
Glad to hear that you were able to resolve the problem! If you run into any roadblocks or have any questions, please let us know!