How to Use Campaign ID to obtain Program ID with API Calls

Issue

Issue Description
How to Pull Data for Program ID, similarly to Campaign ID.

(Example): Pull Individual Program Activity Data, then join Data with Programs via Program ID.

 

Solution

Issue Resolution
[Note]: You can not get the Program directly from the Activity Endpoint.

- After one has obtained the Smart Campaign ID, they can use a seperate API Call to get the Program ID.

- Within the Get Activity API Call, there will be a Campaign ID.

- Once this has been obtained, one can make a Get Campaign API Call with that Campaign ID and it will return the Program ID.

[Get Activity]:

> Use this [Get Activity - URL] to Obtain Campaign ID.

http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#/Activit...

[Get Campaign, with the ID]:

> Use this [Get Campaign, with the ID - URL] to Obtain Program ID.

http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Campai...


The Program ID is not something that is returned in an Activity Call.

The above method is the quickest possible way to obtain that information.

Who This Solution Applies To
API Users

Updated Links

Activity API

https://developers.marketo.com/rest-api/lead-database/activities/

Swagger: https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Activ...

 

Get Campaign By ID

https://developers.marketo.com/rest-api/assets/smart-campaigns/#by_id

Swagger: https://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Smart_Campaig...