Solved

Query Metric Aggregates

  • 25 October 2022
  • 2 replies
  • 82 views

Badge +1

Hi,

 

I am trying to build some reporting using the new API. First one I am trying to pull is Bounced Email metric, split by Bounce Type. Here is the data payload I am working with, not sure what I need to change in order to get the correct response.

 

Ideally it responds with number of hard bounce and soft bounce per day.

{
"data": {
"type": "metric-aggregate",
"attributes": {
"measurements": [
"count"
],
"return_fields": [
"Bounce Type"
],
"filter": [
"greater-or-equal(datetime,2022-07-01T00:00:00)",
"less-than(datetime,2022-10-24T00:00:00)"
],
"metric_id": "U54J6U",
"interval": "day",
"timezone": "UTC"
}
}
}

 

icon

Best answer by rpaul12 25 October 2022, 20:31

View original

2 replies

Userlevel 1
Badge

Try using the by param:

“by”: [“Bounce Type”]

Badge +1

Knew it was something simple! Appreciate the quick help!

Reply