Skip to main content
Solved

Query Metric Aggregate by list ID


Forum|alt.badge.img+4

Hi there,

I'm currently working on obtaining the "Subscribed to List" metric with a specific List ID. My objective is to correlate metrics with list data, which requires me to access metrics filtered by List ID. I'm already familiar with using the Query Metric Aggregates Endpoint to retrieve metrics by Flow ID ($flow) and Campaign ID ($message).

Could you please guide me on how to retrieve metrics specifically by List ID? Your assistance is greatly appreciated.

Thank you for your response.

Best,
Santi

Best answer by Brian Turcotte

Hi @santiagosanti!

At this time, List ID is not a supported attribute, but you could also use the Get Lists endpoint to build a dictionary of List Names and List IDs, and reference that.

 

Best,

Brian

View original
Did this topic or the replies in the thread help you find an answer to your question?

9 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @santiagosanti!

 

According to this guide on using the endpoint, you can separate/filter the response using the filter or by attributes:

 

In your case, you would filter/group by ‘List’. For a list of the attributes by which you can filter/group, see here:

 

Best,

Brian


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • 25 replies
  • October 10, 2023

Hello,

I am looking for some guidance on how to retrieve the "Subscribed to List" metric for lists by List ID rather than List Name.

The reason I need to filter by List ID is because List Names are not guaranteed to be unique, while the List ID will unambiguously identify the list I want to analyze.

I've reviewed the API documentation I don't see a way to get metrics by List ID.

Could someone please advise if there is a way to get metrics for a particular list using the unique List ID value? That would allow me to correlate the metric data with the list meta data.

Any pointers would be greatly appreciated!.

Best,
Santi


Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • October 23, 2023

Hi @santiagosanti!

At this time, List ID is not a supported attribute, but you could also use the Get Lists endpoint to build a dictionary of List Names and List IDs, and reference that.

 

Best,

Brian


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • 25 replies
  • November 20, 2023

Hi Brian,

Quick question - are list names guaranteed to be unique?

Thanks, Santi


Brian Turcotte
Forum|alt.badge.img+37

Hi @santiagosanti!

No they’re not, so if your account has many lists, List ID would probably be more appropriate.

 

Best,

Brian


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • 25 replies
  • November 21, 2023

Hi Brian,

I've seen the API documentation I don't see a way to get metrics by List ID. Can I expect this in next API revision update?

Thanks,
Santi


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • 25 replies
  • December 8, 2023

Hi Brian,

any update on this?

Thanks,
Santi


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • 25 replies
  • December 15, 2023

Hi 

I don't see a way to get metrics by List ID. Can I expect this in next API revision update?

can anyone answer this?

Thanks,
Santi


Brian Turcotte
Forum|alt.badge.img+37

Hi @santiagosanti!

Our API team is currently working on ways to streamline this, so I’ll make sure to update the thread when more information is available!

Best,

Brian