Start a new topic

Make campaigns index function return all campaign

Currently the campaign index function only return 'sent', 'draft', and 'recurring' campaigns. There is no indication in the documentation that transactional and workflow campaigns would not be listed in the results. I think it make more sense for all campaigns to be return since to get a individual campaign, you have to use the campaigns endpoint.


Hi Christopher,

We can certainly clarify what types of campaigns are returned in the GET /campaigns method call.


Transactional campaigns and Journey campaigns are stored differently in the system.  That is why they each have their own corresponding index function.


We split them up on purpose to compartmentalize the amount of data that can potentially be retured in a GET call.  REST is a nice framework for system-to-system communication and for development.  But HTTP is not inherently appropriate for transferring large quantities of data.


Best regards,

Manny Ju

Vice President - Product and Client Success

Maropost Marketing Cloud

Manny, I would suggest then that the transactional campaign be used to access the individual transactional campaigns then as well (transactional_campaigns/{:id}) and a similar endpoint be made for workflow campaigns and ab_campaigns so you have consistent behaviour. Right now there is not much consistency. I have to use /campaigns to get sent, and recurring campaigns. Then I have to parse the details for each campaign to decide if it is an ab_campaign and load those results through /campaign/{:id}/ab_report just to get a list of the ab campaigns. I have to request the /transactional_campaigns endpoint to get those and then request /reports/journeys to get a list of workflow and their related campaigns.


The end goal for us was to import all the campaigns and reports into our DB for analysis. I have finished this task but I seemed way more complicated than it should have been. It should have been as simple as query campaigns to get all the campaigns and the getting the info for each campaign.

Login or Signup to post a comment