Currently, in order to add a contact to a list we have to make a few different API calls.
First, we have to see if the email address is currently in ANY list.
If it is, then we have to grab the full contact. Next we have to push all of the lists the contact is currently in plus the new one. This path has 3 api calls.
If the contact is not in any list, then we make a call to add the contact, which goes ahead and adds it to the list. This path has 2 api calls.
This could be accomplished in one step with a huge reduction in the number of calls you have to process.
What I'd like is to just pass you the email address, first name, last name, and one or more list ids. Then have your system decide if it needs to create the contact or not and just add it to the lists we passed. I don't want to take them out of any list we didn't pass, and my system doesn't care if this results in just associating an existing contact or adding a new one.
Using the same idea, if I want to remove the contact from one or more lists then I should just make a call passing the contact email address and the lists to remove them from.
As a side note, I'm not sure why the contact ID is important. After all, I can't create multiple contacts with the same email address, so that value should be unique enough within the context of the account username/password I'm passing that I don't have to get the id for each test.
First I want to state that we definitely value your feedback. I am going to submit your idea to our web services developers and product owner.
In regards to the question about the contact ID, the reason this is more unique than the email address, is that the email address can be changed in our system. If you do a PUT to the contacts URI, with a new email address, it will update the email address, but keep the contact ID intact. You can also do this update using our User Interface. The contact ID is the only field that is really unique to a specific contact.
If you have any questions please let me know.
I just wanted to add one thing to put this in perspective. One of our clients currently has 12 different lists they maintain in CC. We have to sync those addresses once a day. Each list has upwards of 6000 addresses associated with it.
This means to sync one list we have to make between 12,000 and 18,000 API calls. This takes time and is a lot of back and forth traffic. If we can just send the list id + email addresses for that list then we can get away with just 1 API call. Which has an impact on the traffic your servers see, plus the amount of outbound traffic we have to do.
That's just one of the lists for one of our clients and is okay for now. However, I don't think I can roll this out to some of our bigger clients that have (50k+ addresses), that would mean I'm making between 100,000 and 150,000 API calls per list for them. Which given the amount of time each call takes just isn't feasible.
Hope that helps.