Skip to main content
Contributor II
October 25, 2022
Solved

Query Metric Aggregates

  • October 25, 2022
  • 2 replies
  • 300 views

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"
}
}
}

 

    This topic has been closed for replies.
    Best answer by rpaul12

    Try using the by param:

    “by”: [“Bounce Type”]

    2 replies

    rpaul12Answer
    Problem Solver I
    October 25, 2022

    Try using the by param:

    “by”: [“Bounce Type”]

    ZachAuthor
    Contributor II
    October 26, 2022

    Knew it was something simple! Appreciate the quick help!