cancel
Showing results for 
Search instead for 
Did you mean: 

400 Bad Request while trying to Post a large amount of customers

Occasional Visitor

400 Bad Request while trying to Post a large amount of customers

Let me start out by saying I've inherited this project and am VERY new to the whole constant contact thing. 

 

We are trying to Post a large amout of data (20352 lines) and when doing so we get the "Bad Request" error. This only seem to happen when we do lage amounts. It gets the error while getting the response.

 

I'm not sure what else you need to help so please let me know what info you might need. 

 

Thanks,

 

~Jim

 

 

4 REPLIES 4
Moderator

Re: 400 Bad Request while trying to Post a large amount of customers

Hi Jim,

 

Thanks for reaching out for help. If you haven't found it already, our developer portal is a great place to learn about our API platform. If you can let me know:

  • what endpoint you're posting to
  • are your using XML or JSON

I can start to help you figure out what's happening. 

 

Regards,

Rich Marcucella
Sr. Technical Writer, Content Developer
Web Services Team
http://developer.constantcontact.com
Highlighted
Moderator

Re: 400 Bad Request while trying to Post a large amount of customers

Jim,

I'm going to assume (dangerous, I know) that you're using the Bulk Activity Import Contacts endpoint. You import a maximum of 20k contacts per call, or a payload not exceeding 4 MB. Check out the Limitations section on the link to documentation I included.

 

Regards,

Rich Marcucella
Sr. Technical Writer, Content Developer
Web Services Team
http://developer.constantcontact.com
Occasional Visitor

Re: 400 Bad Request while trying to Post a large amount of customers

We are using HTTP POST using URLEncoded Content Type. 

Honored Contributor

Re: 400 Bad Request while trying to Post a large amount of customers

Hello,

 

The issue you are running into is that our URL Encoded bulk import endpoint also has a data limit at 1.9MB. Here is a quote from the documentation for this endpoint:

Currently, we can add up to 1.9MB of encoded data in the string (about 2 million characters).  Larger data strings should be broken up and added in batches.

 

The best method to resolve this is to place a limit on the number of contacts in a single batch before you split it into two parts and upload them separately.

 

If you have any questions, please let me know!

 

Sincerely,

Elijah G.
API Support Engineer