7 Replies Latest reply on Dec 1, 2016 8:48 AM by 9931d0aed78c1b24b5481c229cda4c60a385386c

    Why do no records appear when I change pagingtoken date to a later date?

      Not sure if it's something I'm doing wrong (usually it is).

      The call I'm making in PHP is this:

      $ch = curl_init("https://273-EQL-130.mktorest.com/rest/v1/activities.json?activityTypeIds=1&leadIds=1166102&nextPageToken=" . $pagingToken . "&access_token=" . $accessToken);

      Let's take it as read that the access token is working.

      I'm getting the paging token like this:

      $ch = curl_init("https://273-EQL-130.mktorest.com/rest/v1/activities/pagingtoken.json?sinceDatetime=2016-11-01&access_token=" . $accessToken);

      When I use November 1st as the sinceDateTime value, it works great: I get back 300 records (the max).

      Screen Shot 2016-11-29 at 3.30.54 PM.png

      When I use October 1st as the sinceDateTime value, I get a similar result (300 records).

      $ch = curl_init("https://273-EQL-130.mktorest.com/rest/v1/activities/pagingtoken.json?sinceDatetime=2016-10-01&access_token=" . $accessToken);

      But when I use September 1st as the sinceDateTime value, I get no records returned, but "moreResult" is true:

      Screen Shot 2016-11-29 at 3.33.39 PM.png

      This page says

      The first is a paging token which represents a date.  These are used to retrieve activities, data value changes, and deleted leads which occurred after the date represented by the paging token.

      Should it not be the case that if I go to an earlier date, everything after that date would be subsumed under the description "which occurred after the date represented by the paging token"? And if that's true, should I not be getting results in my call with the September paging token, just like I do for October and November? Our Marketo installation was active as of July, so it's not that I'm going back before we had records...

      Any help is much appreciated - thanks in advance!