Event registrant list - second page is duplicate of first

SOLVED
Highlighted
Advisor

Event registrant list - second page is duplicate of first

I'm using the event registrant list API to get the list of registrants for an event. I have 8 registrants shown in the Constant Contact UI. The API returns two pages of registrants. The second page appears to be a duplicate of the first.

 

When I get the data for the first page, the header of the atom data is:

 <atom:id>tag:api.constantcontact.com,2010:/ws/customers/0017score/events/a07e4el6neb7e8c0e4b/registrants</atom:id>
    <atom:link rel="current" href="/ws/customers/0017score/events/a07e4el6neb7e8c0e4b/registrants"/>
    <atom:link rel="first" href="/ws/customers/0017score/events/a07e4el6neb7e8c0e4b/registrants"/>
    <atom:link rel="next" href="/ws/customers/0017score/events/a07e4el6neb7e8c0e4b/registrants?pageNumber=1"/>

It clearly shows there is a "next" page to retrieve. So I dutifully retrieve the next page with the ?pageNumber=1 URI. The header for that second page comes back as:

 

<atom:title>Registrants</atom:title>
    <atom:updated>2011-07-29T14:50:33.015-04:00</atom:updated>
    <atom:id>tag:api.constantcontact.com,2010:/ws/customers/0017score/events/a07e4el6neb7e8c0e4b/registrants</atom:id>

 

It seems to me that if there is a link with a rel="next" attribute I should follow it (that's how other APIs work). Am I instead supposed to know that:

 

a) the pageNumber=1 link is actually a duplicate if there is only a single page (what do I do to know when there is a pageNumber=2 inside page 1?)

 

b) call pageNumber=1 initially, rather than with no parameters

 

c) ignore the result of any page where I have already seen the atom:id ?

 

I feel like this worked fine for the event list, and seems to be working differently for the registrant list.

 

Any suggestions?

 

Phil

Phil Ayres

Principle - Consected
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Employee

Re: Event registrant list - second page is duplicate of first

Hey Phil,

 

I have looked into this issue and I believe that there is a defect in our system but the work around would be to use the URI of:

 

https://api.constantcontact.com/ws/customers/0017score/events/a07e4el6neb7e8c0e4b/registrants?pageNu...

 Then on that request if you have more than 50 registrants you will see that there will be the following:

 

    <atom:link rel="current" href="/ws/customers/{username}/events/{event-id}/registrants?pageNumber=1"/>
    <atom:link rel="first" href="/ws/customers/{username}/events/{event-id}/registrants"/>
    <atom:link rel="next" href="/ws/customers/{username}/events/{event-id}/registrants?pageNumber=2"/>

 That way you will have your current page and your next page.  The first page does repeat itself and I am going to look into a more permanent resolution for you.

 

Thanks,

Ryan Davis
Quality Engineer

View solution in original post

2 REPLIES 2
Highlighted
Employee

Re: Event registrant list - second page is duplicate of first

Hey Phil,

 

I have looked into this issue and I believe that there is a defect in our system but the work around would be to use the URI of:

 

https://api.constantcontact.com/ws/customers/0017score/events/a07e4el6neb7e8c0e4b/registrants?pageNu...

 Then on that request if you have more than 50 registrants you will see that there will be the following:

 

    <atom:link rel="current" href="/ws/customers/{username}/events/{event-id}/registrants?pageNumber=1"/>
    <atom:link rel="first" href="/ws/customers/{username}/events/{event-id}/registrants"/>
    <atom:link rel="next" href="/ws/customers/{username}/events/{event-id}/registrants?pageNumber=2"/>

 That way you will have your current page and your next page.  The first page does repeat itself and I am going to look into a more permanent resolution for you.

 

Thanks,

Ryan Davis
Quality Engineer

View solution in original post

Highlighted
Advisor

Re: Event registrant list - second page is duplicate of first

Thanks. I'll code it that way for now, since it shouldn't break (I hope) when the defect is resolved.

 

Phil

Phil Ayres

Principle - Consected
Developer Portal

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

Visit Page

Register for our "Making Sense of Online Marketing for Retail" Webinar

Join us on Thursday, August 13th at 2pm ET for a free webinar where we'll discuss how to incorporate online marketing into your retail store.

Read More
Featured