How to get lead activity data for particular email PROGRAM through API ? | Community
Skip to main content
Level 2
September 10, 2024
Solved

How to get lead activity data for particular email PROGRAM through API ?

  • September 10, 2024
  • 1 reply
  • 1260 views

is it possible to filter program name or id when exporting activities through api?

 either rest/v1/activities.json or bulk/v1/activities/export/create.json it's returning mixed activities for all campaigns

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

There’s not, only by the asset itself (e.g. in the case of Send Email, the numeric Email ID).

 

You should be prepared to filter activities on the client side; one advantage of the paginated API in this regard is you can stream data and remove unwanted entries on the fly. Still, the data will go over the wire.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
September 11, 2024

There’s not, only by the asset itself (e.g. in the case of Send Email, the numeric Email ID).

 

You should be prepared to filter activities on the client side; one advantage of the paginated API in this regard is you can stream data and remove unwanted entries on the fly. Still, the data will go over the wire.

Level 2
September 11, 2024

Thank you @sanfordwhiteman 
for rest/v1/activities.json?nextPageToken=token api, do you know what is this campaignId? it is not matching program id. How can i know this activity belongs to which email program? 

{ "id": 79, "marketoGUID": "79", "leadId": 11, "activityDate": "2024-06-14T20:30:22Z", "activityTypeId": 6, "campaignId": 1036, "primaryAttributeValueId": 18, "primaryAttributeValue": "Demo June 14.demo june 14", "attributes": [ { "name": "Campaign Run ID", "value": 10 }, { "name": "Choice Number", "value": 0 }, { "name": "Step ID", "value": 25 }, { "name": "Campaign", "value": "Email Batch Program-1009-send-email-campaign" } ] },
 
SanfordWhiteman
Level 10
September 11, 2024

That’s the Smart Campaign ID. Every Campaign is inside a Program or a Folder.