Recent Deals, how to use the since parameter


#1

Hi all,
/deals/v1/deal/recent/modified
how to use the since=x parameter (Only return deals modified after timestamp x).
What format to use for x ?
an epoch timestamp ?
I didn’t find any example.
Thanks.


#2

@deJean216 good catch I will throw a note out there to update the docs. Yes it is in milliseconds from epoch. Here is an example

https://api.hubapi.com/deals/v1/deal/recent/modified?hapikey={myHapiKey}&since=1479861994000

Some of the other endpoints share that is in milliseconds from epoch. My apologies for our inconsistency in the documentation.


#3

Great, thanks.
If i need to get data “since 1 hour”, I will then need to calculate the ts for “now-1 hour”, correct ?


#4

@deJean216 Yes, most languages have libraries that will allow you to this easily.