cancel
Showing results for 
Search instead for 
Did you mean: 

Max of 62 contacts post with bulk API

Participant

Max of 62 contacts post with bulk API

only 62 contacts post via bulk API. Is there a reason for that?

6 REPLIES 6
CTCT Employee

Bulk Activity

I did some testing with the Bulk Activity this morning and was able to successfully add many more than 62 contacts. Our bulk activity can import up to 20,000 contacts at a time. If you are experiencing issues with this, please reply to this post with your http request body or email it to webservices support team and I would be happy to take a look at this and see if i can provide any further feedback. Thanks.

David J

Highlighted
Participant

Now

Now when I try to add contacts I get a "409 Conflict" response! The contact was cleared from the list and is not an opt out/unsubscribe!!!! This is functionality that has worked for the last 6 weeks but suddenly does not work!


 


Edit:


The only way I can re-add a contact removed is via the bulk api

CTCT Employee

Error 409

Typically a 409 error is because there is a problem with the action you are trying to perform. Commonly, you are trying to "Create" (POST) a resource which already exists. In general, if a resource already exists, you can "Update" the resource with a "PUT" request for that resource.


 


If a contact was added into Constant Contact, they are never fully removed. They will be maintained as an active contact in a contact list, a removed contact that is not a member of any contact lists,  an opted out subscriber that is part of the list, or a member of "Awaiting Confirmation" which is only a possability if you have had the confirmed opt-in option turned on in your account.


 


I would recommend doing a search for this particular contact to see if and where they exist. For example:


https://api.constantcontact.com/ws/customers/{user-name}/contacts?email=testaddress%40testdomain.com


 


This should present you with details regarding this particular contact. If you are unable to find this contact by searching for them, and still receiving a 409 error when attempting to create them, please let us know. Thanks.


 


 

David J

Participant

BULK ACTIVITY SV_ADD STILL NOT WORKING

   this is the code being used to generate the content of the of the request:


         CredentialCache LoginCreds = new CredentialCache();

            LoginCreds.Add(_LoginURI, _AuthorizationType, _NetworkCredentials);



            request = (HttpWebRequest)WebRequest.Create(_RequestHttp + "activities");

            request.Method = "POST";

            request.ContentType = "application/x-www-form-urlencoded";

            request.Credentials = LoginCreds;

            request.Timeout = _RequestTimeOut;



            string content;

            content = "activityType=SV_ADD";

            content += "&data=Email+Address%2CFirst+Name%2CLast+Name%0A";



            foreach (myEmailContact contact in myEmailContacts)

            {

                string emailAddress = myEmailContact.EmailAddress.ToString().Trim();

                emailAddress.Replace("@", "%40");

                content += emailAddress + "%2C" + myEmailContact.FirstName.Trim() + "%2C" + myEmailContact.LastName.Trim() + "%0A";

            }



            content += "&lists=http%3A%2F%2Fapi.constantcontact.com%2Fws%2Fcustomers%2Fusername%2Flists%2F2;


            byte[] byteArray = Encoding.UTF8.GetBytes(content);

            _ByteArray = byteArray;

            request.ContentLength = _ByteArray.Length;


the api will only take 62 contacts. i've tried sending 100 and i've tried sending 20000. both times, only 62 contacts were posted.  i've been able to send is 50 contacts using the bulk api. any help would be apprectiated.


 

CTCT Employee

RE: BULK ACTIVITY SV_ADD STILL NOT WORKING

I apologize for the issue that you are experiencing creating contacts using the bulk activity, but I would like to help you solve this issue.


Could you please send our webservices support team what you have stored as 'content' just before you are making your http request, so that we can see that data that is being uploaded? In addition, could you also provide us with your Constant Contact username so that we can take a look in the account as well to see what kind of activity is being posted?

David J

Regular Visitor

Re: RE: BULK ACTIVITY SV_ADD STILL NOT WORKING

There is possibility that you have repeated email-ids in your content. So its just taking 62 records.