Skip to main content
Solved

API endpoint to fetch campaign ID and flow stats

  • February 1, 2024
  • 2 replies
  • 89 views

Forum|alt.badge.img+1

We are currently integrating with Klaviyo for email reporting. We need to fetch campaign performance stats and flow performance stats from the API using Query Metric Aggregate Endpoint. We encountered two problems: 

  1. In the supported attributes, it seems that we can only fetch data aggregated by campaign name not by campaign id. In this case, how can we ensure the campaign is unique (sometimes different campaign ids can have same campaign name)?
  2. In the supported attributes, it seems that there is no flow stats. Is there an API endpoint to fetch flow stats?

Best answer by saulblum

You can use the aggregates call to group events like Opened Email by flow, with the $flow property. 

2 replies

Forum|alt.badge.img+7
  • Klaviyo Employee
  • 182 replies
  • February 1, 2024

Hi! Good timing, there will be an API release this month (planned for 02-15) that adds a reporting API that will let you fetch the analytics you can currently access in the UI for campaigns and flows.

Subscribe to the developer newsletter at https://developers.klaviyo.com/en and you’ll be notified about the new API calls.

 

 

 


Forum|alt.badge.img+7
  • Klaviyo Employee
  • 182 replies
  • Answer
  • February 1, 2024

You can use the aggregates call to group events like Opened Email by flow, with the $flow property.