APIs & Integrations

Not applicable

Need advice for date range filter on Hubspot Email Event Object

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&endT...

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

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

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,

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Need advice for date range filter on Hubspot Email Event Object

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.

Get campaign data for a given campaign | Email Events API

GET /email/public/v1/campaigns/:campaign_id

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

Get email events | Email Events API

GET /email/public/v1/events

0 Upvotes