I am using the metric-aggregates
API with the following request body:
{
"data": {
"type": "metric-aggregate",
"attributes": {
"measurements": [
"unique",
"sum_value",
"count"
],
"filter": [
"greater-or-equal(datetime,2024-09-18)",
"less-than(datetime,2024-10-17)"
],
"by": [
"$message"
],
"interval": "month",
"metric_id": "VDpVWX",
"page_size": 500
}
}
}
In the response, I noticed the following under the dimensions
section:
"dimensions": ["RD499B"]
However, when I use the Get Campaigns endpoint:
https://a.klaviyo.com/api/campaigns/?filter=equals(messages.channel,'email')
I am unable to find a campaign with the ID RD499B
. While some campaigns are listed in the response, others seem missing.
Additionally, when I modify the metric-aggregates
request to include:
"by": ["$message", "Campaign Name"]
I do get the campaign name in the response.
If the Campaign Name
is available through the metric-aggregates
API, why doesn’t the corresponding campaign ID appear in the Get Campaigns endpoint?
Could you clarify the reason for this discrepancy?