Need advice for date range filter on Hubspot Email Event Object


#1

Hi,

We are working on fetching Hubspot Email Event data using a cloud based BI Tool consuming Hubspot Rest API. We want to apply date range filter on Hubspot Email Event date range.

We have used startTimestamp and endTimestamp as a parameters for date range filter as shown below:

https://api.hubapi.com/email/public/v1/campaigns{props.campaignID}?startTimestamp=1504224000000&endTimestamp=1504742400000

image 1:
https://goo.gl/TAjR8t

https://api.hubapi.com/email/public/v1/campaigns{props.campaignID}?startTimestamp=1501545600000&endTimestamp=1504137600000

image 2:
https://goo.gl/ErWm3B

However, We are getting same data sources in different timestamps as shown in above images. Auth Token is automatically generated for it. Can you suggest us to the usage of timestamp exactly?

Thanks,


#2

Hi @subhendu,

The request url you’ve listed there appears to be the ‘Get campaign data for a given campaign’ endpoint, which doesn’t support startTimestamp/endTimestamp filters.

It sounds like you might be intending to use the ‘Get email events’ endpoint, which returns email events and supports the startTimestamp/endTimestamp filters