I am writing a console application to retrieve ALL of the campaigns (https://developers.hubspot.com/docs/methods/email/get_campaigns_by_id) and then lookup the counts for the email performance individually using the Get campaign details endpoint (https://developers.hubspot.com/docs/methods/email/get_campaign_data).
The problem I am seeing is that there are many duplicate entries for a campaign in the Get ALL response. I thought this might be due to starting and then stopping and restarting an email campaign or when changes occurred to the campaign. I attempted to aggregate the sum of the duplicates and this seemed to work when I set my limit to 200. When I upped that amount because I still wasn’t seeing campaigns back to January of this year to 500, I started seeing the counts as being exactly double what HubSpot is reporting online for those campaigns. When I tried setting my limit to anything higher than 500, I think I exceeded the max because it would only send 500, regardless of what I set as the limit (over 500).
My question is… how should I treat duplicate entries in the GET All Campaigns response? Can I assume that I can aggregate the counts on the details GET or not, and if not, is there another way to get the actual performance over all time for the campaign? Thank you.