The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Issue with Fetching more than 9K Records

Highlighted
Occasional Advisor

Issue with Fetching more than 9K Records

Hi everyone,

 

I have implemented paging in the code as shown below. If the records are more than/equal to 9K, however, an application error says:

 

"http.status.internal_server_error:We are currently experiencing an issue with our service, please try again in a few minutes or contact Customer Support at webservices@constantcontact.com." (We've contacted the email provided but have yet to receive a response.)

 

My question: How can we handle this issue if there are records exceeding 9K?

 

myContactlist = _contact.GetContacts(null, 500, modifiedsince, null);//to fetch all the records(active+optout)

                //myContactlist = _contact.GetContacts(null, 500, modifiedsince, ContactStatus.OPTOUT);

                //pagination to fetch the records >500

                var pagination = myContactlist.Meta.Pagination;

 

                //pagination to fetch the records >500

                // if there are more then 500 results, pagination.Next is populated

                // with the next URL to fetch

                while (pagination.Next != null)

                {

                    ResultSet<Contact> morecontacts = _contact.GetContacts(modifiedsince, pagination);

                    myContactlist.Results = myContactlist.Results.Union(morecontacts.Results).ToList();

                    pagination = morecontacts.Meta.Pagination;

 

                }

 

If I call this through the API, it also fails:

https://api.constantcontact.com/v2/contacts?next=c3RhcnRBdD0xMjQ1MDYxNjYzJmxpbWl0PTUwMCZtb2RpZmllZF9...

 

 

I've provided screenshots for your reference. Thanks for your time.

 

Kind regards,

Nick

1 REPLY 1
Highlighted
Honored Contributor

Re: Issue with Fetching more than 9K Records

Hi Nick,

 

Thank you very much for this information. I have been researching your report of this issue and the symptoms match a known issue that is happening with one of our internal systems that powers the API. This issue has been escalated as a high priority and I am hopeful that we should be able to give a specific timeframe for resolution soon. If you have any questions or concerns, please let me know!

 

Sincerely.

Elijah G.
API Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured