Reply
Participant
cbaugh
Posts: 18
Registered: ‎05-28-2008

email address as username or username with @ symbol in it

Greetings, I'm trying to pull down the custom fields. This post works.


activityType=EXPORT_CONTACTS&fileType=CSV&sortBy=DATE_DESC&columns=CUSTOM+FIELD+1&columns=CUSTOM+FIELD+2&columns=CUSTOM+FIELD+3&columns=CUSTOM+FIELD+4&columns=CUSTOM+FIELD+5&columns=CUSTOM+FIELD+6&columns=CUSTOM+FIELD+7&columns=CUSTOM+FIELD+8&columns=CUSTOM+FIELD+9&columns=CUSTOM+FIELD+10&columns=CUSTOM+FIELD+11&columns=CUSTOM+FIELD+12&columns=CUSTOM+FIELD+13&columns=CUSTOM+FIELD+14&columns=CUSTOM+FIELD+15&listId=http%3a%2f%2fapi.constantcontact.com%2fws%2fcustomers%2facsdevtestaccount%2Flists%2F1  


posted to


https://api.constantcontact.com/ws/customers/acsdevtestaccount/activities


These next two posts fail when posted to


https://api.constantcontact.com/ws/customers/development@acstechnologies.com/activities


activityType=EXPORT_CONTACTS&fileType=CSV&sortBy=DATE_DESC&columns=CUSTOM+FIELD+1&columns=CUSTOM+FIELD+2&columns=CUSTOM+FIELD+3&columns=CUSTOM+FIELD+4&columns=CUSTOM+FIELD+5&columns=CUSTOM+FIELD+6&columns=CUSTOM+FIELD+7&columns=CUSTOM+FIELD+8&columns=CUSTOM+FIELD+9&columns=CUSTOM+FIELD+10&columns=CUSTOM+FIELD+11&columns=CUSTOM+FIELD+12&columns=CUSTOM+FIELD+13&columns=CUSTOM+FIELD+14&columns=CUSTOM+FIELD+15&listId=http%3a%2f%2fapi.constantcontact.com%2fws%2fcustomers%2fdevelopment@acstechnologies.com%2Flists%2F1


or if I use


activityType=EXPORT_CONTACTS&fileType=CSV&sortBy=DATE_DESC&columns=CUSTOM+FIELD+1&columns=CUSTOM+FIELD+2&columns=CUSTOM+FIELD+3&columns=CUSTOM+FIELD+4&columns=CUSTOM+FIELD+5&columns=CUSTOM+FIELD+6&columns=CUSTOM+FIELD+7&columns=CUSTOM+FIELD+8&columns=CUSTOM+FIELD+9&columns=CUSTOM+FIELD+10&columns=CUSTOM+FIELD+11&columns=CUSTOM+FIELD+12&columns=CUSTOM+FIELD+13&columns=CUSTOM+FIELD+14&columns=CUSTOM+FIELD+15&listId=http%3a%2f%2fapi.constantcontact.com%2fws%2fcustomers%2fdevelopment%40acstechnologies.com%2Flists%2F1


 


However if I do a get with the url of https://api.constantcontact.com/ws/customers/development@acstechnologies.com/activities it works fine. So I'm not sure if the problem is with the post string or the url. I'm guessing the post string but I'm not sure what's wrong with it or how to fix it. Any help ?


- Thanks, Craig Baugh

DaveBerard
Posts: 1,646
Topics: 7
Kudos: 61
Solutions: 59
Registered: ‎06-19-2008

Hi Craig,   I ran your

Hi Craig,


 


I ran your requests through my account and all 3 worked without problem.  Here is the username I used:


dberard@constantcontact.com


 


Requests I tried (all 3 successfully created an activity):


activityType=EXPORT_CONTACTS&fileType=CSV&sortBy=DATE_DESC&columns=CUSTOM+FIELD+1&columns=CUSTOM+FIELD+2&columns=CUSTOM+FIELD+3&columns=CUSTOM+FIELD+4&columns=CUSTOM+FIELD+5&columns=CUSTOM+FIELD+6&columns=CUSTOM+FIELD+7&columns=CUSTOM+FIELD+8&columns=CUSTOM+FIELD+9&columns=CUSTOM+FIELD+10&columns=CUSTOM+FIELD+11&columns=CUSTOM+FIELD+12&columns=CUSTOM+FIELD+13&columns=CUSTOM+FIELD+14&columns=CUSTOM+FIELD+15&listId=http%3a%2f%2fapi.constantcontact.com%2fws%2fcustomers%2facsdevtestaccount%2Flists%2F1 


 


activityType=EXPORT_CONTACTS&fileType=CSV&sortBy=DATE_DESC&columns=CUSTOM+FIELD+1&columns=CUSTOM+FIELD+2&columns=CUSTOM+FIELD+3&columns=CUSTOM+FIELD+4&columns=CUSTOM+FIELD+5&columns=CUSTOM+FIELD+6&columns=CUSTOM+FIELD+7&columns=CUSTOM+FIELD+8&columns=CUSTOM+FIELD+9&columns=CUSTOM+FIELD+10&columns=CUSTOM+FIELD+11&columns=CUSTOM+FIELD+12&columns=CUSTOM+FIELD+13&columns=CUSTOM+FIELD+14&columns=CUSTOM+FIELD+15&listId=http%3a%2f%2fapi.constantcontact.com%2fws%2fcustomers%2fdevelopment@acstechnologies.com%2Flists%2F1


 


activityType=EXPORT_CONTACTS&fileType=CSV&sortBy=DATE_DESC&columns=CUSTOM+FIELD+1&columns=CUSTOM+FIELD+2&columns=CUSTOM+FIELD+3&columns=CUSTOM+FIELD+4&columns=CUSTOM+FIELD+5&columns=CUSTOM+FIELD+6&columns=CUSTOM+FIELD+7&columns=CUSTOM+FIELD+8&columns=CUSTOM+FIELD+9&columns=CUSTOM+FIELD+10&columns=CUSTOM+FIELD+11&columns=CUSTOM+FIELD+12&columns=CUSTOM+FIELD+13&columns=CUSTOM+FIELD+14&columns=CUSTOM+FIELD+15&listId=http%3a%2f%2fapi.constantcontact.com%2fws%2fcustomers%2fdevelopment%40acstechnologies.com%2Flists%2F1


 


Please note, these will fail if you do not have a list 1 on your account.  Usernames are not validated in the list URIs so I was able to use your exact requests without problem.  I would check to make sure you actually do have a list 1 on your second account.


 

Dave Berard
Senior Product Manager, Constant Contact
Participant
cbaugh
Posts: 18
Registered: ‎05-28-2008

Good point on list number

Dave, Thanks for the reply. I switched to a different list and it immediately started working - so thanks. It does however bring up a different point about list numbers. I thought list 1 was expected to always be there. Obviously it's not. Is there a list number that is always there? If I use the list of "active" is that guaranteed to always be there? Along that same line, if list 1 is deleted is there any way to get it back?


Thanks, Craig

DaveBerard
Posts: 1,646
Topics: 7
Kudos: 61
Solutions: 59
Registered: ‎06-19-2008

Hi Craig,   Really good

Hi Craig,


 


Really good questions there.  Active is guaranteed to always be there, however it is not available to add contacts to.  This list is available for exporting though and you can use active, do not mail or removed as options.  List 1 is the "General Interest" list that is in every account by default, however that can be deleted.  We incrementally add 1 to the last used list ID number when customers add lists (this is done automatically by the SQL code) and thus there can never be another list 1 for any account.  You can only add contacts to an actual selectable list in the account since all contacts must be in at least one list to be considered Active. 


 


The best option for importing contacts is to run a GET on the lists collection and use one of the lists there (or provide a prompt to the user to select one or more of the available lists?) so that you are always assured you are exporting a valid list. 

Dave Berard
Senior Product Manager, Constant Contact