Skip to main content
October 25, 2015
Répondu

REST endpoint to pull LeadActivities

Hi, I want to pull lead activities periodically. I have a scheduled job that does the work.

Below is one of the lead activity in Marketo.

I am getting this lead activity when I acquires a page token with below URLs.

<>.mktorest.com/rest/v1/activities/pagingtoken.json?access_token=<>&sinceDatetime=2015-10-23 10:00:00Z

and

<>.mktorest.com/rest/v1/activities/pagingtoken.json?access_token=<>&sinceDatetime=2015-10-23 10:02:00Z

Can some one explain why I am getting this activity with second page token as its datetime is greater then the datetime when activity was created?

Why is activityDate and date inside attributes different?

Time zone of the user who reated this activity is IST, timezone of api user is PDT.

Activity

____________________________________________________

{

  "requestId": "13442#150a031a1e2",

  "result": [

    {

      "id": 911881,

      "leadId": 157210,

      "activityDate": "2015-10-23T10:00:20Z",

      "activityTypeId": 46,

      "primaryAttributeValue": "Milestone",

      "attributes": [

        {

          "name": "Date",

          "value": "2015-10-23 05:00:20"

        },

        {

          "name": "Description",

          "value": "IM Milestone"

        },

        {

          "name": "Source",

          "value": "Lead action"

        }

      ]

    }

  ],

  "success": true,

  "nextPageToken": "44FLW5KAAOOYT5OI7XY5XJIS6G54FZWS52MTWFJCRMSM3EBIGQLA====",

  "moreResult": true

}

Ce sujet a été fermé aux réponses.
Meilleure réponse par SanfordWhiteman

'2015-10-23 10:00:00Z' is not actually a valid format.  It should be '2015-10-23T10:00:00Z'.  Your timestamp might be being interpreted as 2015-10-23T00:00:00Z' because of the formatting error.  Fix it and test again.

1 commentaire

SanfordWhiteman
Level 10
October 25, 2015

'2015-10-23 10:00:00Z' is not actually a valid format.  It should be '2015-10-23T10:00:00Z'.  Your timestamp might be being interpreted as 2015-10-23T00:00:00Z' because of the formatting error.  Fix it and test again.