cancel
Showing results for 
Search instead for 
Did you mean: 

EXPORT_CONTACTS 400 Bad Request

Occasional Contributor

EXPORT_CONTACTS 400 Bad Request

Using Java, ctctwsjavalib and HTTPClient 4.2.

 

Other calls work fine. Add a contact, get lists, etc.

 

I've checked, rechecked, triple checked the format of the POST body.

 

My eyes must be missing something. The correct customer name and password digest have been xxxx out.

 

Here is the HTTPClient debug output:

 

DEBUG [main] 13 Sep 2012 20:22:26,381  wire:wire:63 - >> "POST /ws/customers/xxxx/activities HTTP/1.1[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,381  wire:wire:63 - >> "Content-Length: 222[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,382  wire:wire:63 - >> "Content-Type: application/x-www-form-urlencoded[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,382  wire:wire:63 - >> "Host: api.constantcontact.com[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,382  wire:wire:63 - >> "Connection: Keep-Alive[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,383  wire:wire:63 - >> "Cookie: BIGipServerP2_Sonoa_API=92148746.20480.0000; BIGipServerProdAPI=189142026.6695.0000[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,383  wire:wire:63 - >> "Cookie2: $Version=1[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,384  wire:wire:63 - >> "Authorization: Basic xxxxxx[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,384  wire:wire:63 - >> "[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,385  headers:sendRequestHeader:273 - >> POST /ws/customers/xxxx/activities HTTP/1.1
DEBUG [main] 13 Sep 2012 20:22:26,385  headers:sendRequestHeader:276 - >> Content-Length: 222
DEBUG [main] 13 Sep 2012 20:22:26,385  headers:sendRequestHeader:276 - >> Content-Type: application/x-www-form-urlencoded
DEBUG [main] 13 Sep 2012 20:22:26,386  headers:sendRequestHeader:276 - >> Host: api.constantcontact.com
DEBUG [main] 13 Sep 2012 20:22:26,386  headers:sendRequestHeader:276 - >> Connection: Keep-Alive
DEBUG [main] 13 Sep 2012 20:22:26,386  headers:sendRequestHeader:276 - >> Cookie: BIGipServerP2_Sonoa_API=92148746.20480.0000; BIGipServerProdAPI=189142026.6695.0000
DEBUG [main] 13 Sep 2012 20:22:26,387  headers:sendRequestHeader:276 - >> Cookie2: $Version=1
DEBUG [main] 13 Sep 2012 20:22:26,387  headers:sendRequestHeader:276 - >> Authorization: Basic xxxx
DEBUG [main] 13 Sep 2012 20:22:26,388  wire:wire:77 - >> "activityType=EXPORT_CONTACTS&fileType=CSV&exportOptDate=true&exportOptSource=true&exportListName=true&sortBy=DATE_DESC&columns=STATE&listID=http%3A%2F%2Fapi.constantcontact.com%2Fws%2Fcustomers%2Fcustomerxxx%2Flists%2Fremoved"
DEBUG [main] 13 Sep 2012 20:22:26,590  wire:wire:63 - << "HTTP/1.1 400 Bad Request[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,590  wire:wire:63 - << "Connection: close[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,590  wire:wire:63 - << "Content-Length: 28[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,591  wire:wire:63 - << "Content-Type: text/plain[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,591  wire:wire:63 - << "Date: Fri, 14 Sep 2012 03:22:37 GMT[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,591  wire:wire:63 - << "Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate, no-cache="Set-Cookie"[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,595  wire:wire:63 - << "Pragma: no-cache[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,595  wire:wire:63 - << "Server: Apache[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,595  wire:wire:63 - << "Vary: Accept-Encoding,User-Agent[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,595  wire:wire:63 - << "X-Powered-By: [\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,596  wire:wire:63 - << "[\r][\n]"
DEBUG [main] 13 Sep 2012 20:22:26,596  DefaultClientConnection:receiveResponseHeader:254 - Receiving response: HTTP/1.1 400 Bad Request
DEBUG [main] 13 Sep 2012 20:22:26,596  headers:receiveResponseHeader:257 - << HTTP/1.1 400 Bad Request
DEBUG [main] 13 Sep 2012 20:22:26,596  headers:receiveResponseHeader:260 - << Connection: close
DEBUG [main] 13 Sep 2012 20:22:26,597  headers:receiveResponseHeader:260 - << Content-Length: 28
DEBUG [main] 13 Sep 2012 20:22:26,597  headers:receiveResponseHeader:260 - << Content-Type: text/plain
DEBUG [main] 13 Sep 2012 20:22:26,597  headers:receiveResponseHeader:260 - << Date: Fri, 14 Sep 2012 03:22:37 GMT
DEBUG [main] 13 Sep 2012 20:22:26,597  headers:receiveResponseHeader:260 - << Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate, no-cache="Set-Cookie"
DEBUG [main] 13 Sep 2012 20:22:26,598  headers:receiveResponseHeader:260 - << Pragma: no-cache
DEBUG [main] 13 Sep 2012 20:22:26,598  headers:receiveResponseHeader:260 - << Server: Apache
DEBUG [main] 13 Sep 2012 20:22:26,598  headers:receiveResponseHeader:260 - << Vary: Accept-Encoding,User-Agent
DEBUG [main] 13 Sep 2012 20:22:26,598  headers:receiveResponseHeader:260 - << X-Powered-By:

3 REPLIES 3
CTCT Employee

Re: EXPORT_CONTACTS 400 Bad Request

Hi,

 

I am correcting this from my previous response.  We do have functionality that allows removed, active, and other lists to be exported in this way--the issue seems to be the same as in your other post, where the capitalization of listId is causing problems.  If you change "listID" to "listId" the problem should go away.

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Contributor

Re: EXPORT_CONTACTS 400 Bad Request

CTCT Employee

Re: EXPORT_CONTACTS 400 Bad Request

Hi,

 

If you change "listID" to "listId" the problem should go away.  Our system is case senstive, so you just need to make the d lowercase.

 

Best Regards,

Shannon W.

API Support Specialist