Showing results for 
Search instead for 
Did you mean: 
Due to an issue with YouTube, inserting videos in your emails is showing an error. Until they are able to resolve this issue, we recommend using a different video hosting service. We will continue to monitor this outage and update you as we have more information.

Contacts CSV Export showing 'State/Province (Other)' instead of 'State/Province (US/Canada)'

Occasional Participant

Contacts CSV Export showing 'State/Province (Other)' instead of 'State/Province (US/Canada)'

When I try to create contacts CSV export using following request, I am getting 'Other State/Province' instead of 'State/Province (US/Canada)'


Email Address,List: General Interest,Date Added,Added By,First Name,Last Name,,Address Line 1,Address Line 2,Address Line 3,City,Other State/Province,Country,Zip/Postal Code
"",2/25/09 4:21 AM EST,Site owner,"aa","bb",,"ad1","ad1","ad1","city1",,"United States","12345"

Also second header column in response 'List: General Interest' should not be there and one empty header column between Last Name and Address Line 1 is misplaced.

RE: Contacts CSV Export showing 'State/Province (Other)' instead

Thanks Technosoft folks, I see the field exporting just as you are. Since we don't have options to differentiate the US State/Province and the Other State/Province, this definitely looks like a defect. We'll take a look at this and get back to you soon.
Dave Berard
Senior Product Manager, Constant Contact
New Member


Any update on this?
Bill Mild

Hi Bill, We actually updated

Hi Bill,

We actually updated the Bulk Activity to fix this issue in a recent software release. The updated documentation on the field names is here. You can now decide whether you want to export US/Canada State, Other State/Province or both.
Dave Berard
Senior Product Manager, Constant Contact

export throuh Activity collection (400 bad request error)

Hi ,

I am using bulk activities collection.
I want to export the contacts under a contact list. I am using the following code for that.
But I am getting 400 Bad request error. Please help me out to find where could be the error.
The following is the method I am using.

private string Export()
string sUserName = "USERNAME";
string sPassWord = "PASSWORD";
string sUri = "" + sUserName + "/activities";
string sAPIKey = "CCAPIKEY";
string sListUri = "" + sUserName + "/lists/2";
Uri address = new Uri(sUri);
HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest;
request.Credentials = new NetworkCredential((sAPIKey + "%" + sUserName), sPassWord);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded ";
StringBuilder data = new StringBuilder();
data.Append("activityType=" + HttpUtility.UrlEncode("EXPORT_CONTACTS", Encoding.UTF8));
data.Append("&fileType=" + HttpUtility.UrlEncode("CSV", Encoding.UTF8));
data.Append("&exportOptDate=" + HttpUtility.UrlEncode("true", Encoding.UTF8));
data.Append("&exportOptSource=" + HttpUtility.UrlEncode("true", Encoding.UTF8));
data.Append("&exportListName=" + HttpUtility.UrlEncode("true", Encoding.UTF8));
data.Append("&sortBy=" + HttpUtility.UrlEncode("true", Encoding.UTF8));
data.Append("&columns=" + HttpUtility.UrlEncode("Email Address" , Encoding.UTF8));
data.Append("&columns=" + HttpUtility.UrlEncode("First Name", Encoding.UTF8));
data.Append("&columns=" + HttpUtility.UrlEncode("Last Name", Encoding.UTF8));
data.Append("&lists=" + HttpUtility.UrlEncode(sListUri));
byte[] byteData = UTF8Encoding.UTF8.GetBytes(data.ToString());
string st = String.Empty;
request.ContentLength = byteData.Length;
using (Stream postStream = request.GetRequestStream())
postStream.Write(byteData, 0, byteData.Length);
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
StreamReader reader = new StreamReader(response.GetResponseStream());
st = reader.ReadToEnd();
return st;


___and please tell me how could i access the CSV file created.
Valued Developer

re: Export through Activity Collection


I see at least two problems with the data provided in this request and each of those problems provided both a 400 error and a reasonable error message when I tried them from the REST Client unit testing tool we discuss here.

First, the column name is "EMAIL ADDRESS", not "Email Address". Second, the value for the sortBy parameter must be EMAIL_ADDRESS or DATE_DESC. It is not a true/false value.

When you successfully POST an activity, your response body will include a reference to the specific submitted ACTIVITY (batch job). You must retrieve that Activity to 1) Check Batch job completion status and 2) Retrieve the CSV file (which will be referenced in the Activity response).

I hope this helps.

Tom M
Group Product Manager – Content Editing
Constant Contact

Thank you very much Tom

Dear Tom,
i got the response like this



Constant Contact

but the status is pending. why is it so? will the status be "COMPLETE" after some time?
if so how can I Check batch job completion status?
sorry to disturb in your busy schedule.

please be kind enough to have a quick response, I am waiting.

Thanks in advance,
Valued Developer

re: Checking Activities Job Completion Status

The Activities resource launches a batch job which is put into a queue of batch jobs. In general, these batch 'Activites' will be be in queue for a matter of minutes (not hours, but also not seconds).

In order to determine whether a specific Activity is completed, you use the URI reference returned in the http response body as you have done above. Your Activity shows 'PENDING' (ie. in queue). You should re-check the activity status (using the same URI) periodically. When the job is completed, the status will show 'COMPLETED' and will contain a reference to the output CSV. For a brief period between 'PENDING' and 'COMPLETED' the Activity will be in status "RUNNING".

Tom M
Group Product Manager – Content Editing
Constant Contact

Thanks a lot Tom

Thanks, let me go forward.