Working around the 50 contact limit

Highlighted
New Member

Working around the 50 contact limit

 Hello,


 


I'm trying to write a PHP script to find all bounces and make note of them in our internal database. However, because of the 50 contact limit on requests I find that I'm unable to do this. In total there are roughly 600 to bounces note.


How can I split this task across multiple HTTP requests so that I can catch every bounce?


 


Edit: It seems what I need to use is the activities API, however I can't find any code samples for using this and the documentation is a little confusing.


Thanks,


 


Chris

1 REPLY 1
Highlighted
CTCT Employee

Re: Working around the 50 contact limit

All of our API calls are paginated responses, returning 50 entries per response. If you are making a call to a resource that has more than 50 entries, (ie: https://api.constantcontact.com/ws/customers/{user-name}/contacts), it will return a link node with the rel attribute "next". If you were to follow this link it will give you the next page of 50 contacts. An example of this from my account is below.


<?xml version="1.0" encoding="UTF-8"?>

<feed xmlns="http://www.w3.org/2005/Atom">

  <id>http://api.constantcontact.com/ws/customers/djellesma2/contacts</id>

  <title type="text">Contacts for Customer: djellesma2</title>

  <link href="contacts"></link>

  <link href="contacts" rel="self"></link>

  <author>

    <name>djellesma2</name>

  </author>

  <updated>2010-11-29T14:44:11.186Z</updated>

  <link href="/ws/customers/djellesma2/contacts?next=gex4xx7s-3g4r00" rel="next"></link>

  <link href="/ws/customers/djellesma2/contacts" rel="first"></link>

  <link href="/ws/customers/djellesma2/contacts" rel="current"></link>

  <entry>


 


As far as retrieving bounces, you can get this information in two different calls.


1. Obtaining a campaigns results - This will return all the results for one specific email campaign.


2. Obtaining campaign results for a contact - This provides access to the events (email sends, opens, clicks...) associated with a specific contact.


 


I hope this helps. Please let me know if you have any questions or concerns regarding this information. Thanks.


 

David J

Developer Portal

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

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured