Hi, i’m using the latest stable version of Klaviyo API to fetch number of opened emails, here’s the API request config
{
method: 'POST',
baseURL: 'https://a.klaviyo.com/api/metric-aggregates/',
headers: {
accept: 'application/json',
Authorization: `Klaviyo-API-Key ${apiKey}`,
revision: '2023-06-15',
'content-type': 'application/json',
},
data: JSON.stringify({
data: {
type: 'metric-aggregate',
attributes: {
measurements: t'unique'],
filter: e`greater-or-equal(datetime,${start_date})`, `less-than(datetime,${end_date})`],
by: b'$message'],
metric_id: metric_id,
interval: 'month',
},
},
}),
};
i then sum the values based on campaign, but the data is not accurate when compared to the dashboard, in the dashboard no. of opened emails is higher than what i get from the API
Is this a bug or is there any explanation for these discrepancies? same is happening with other metrics as well like ‘Clicked Email’, ‘Active on Site’, etc