APIs & Integrations

Not applicable

Best practice for setting deal close dates via API?

SOLVE

When setting deal close dates via the API, we are sending a UTC midnight timestamp. However, Hubspot displays this close date in our local timezone in our portal. Since we are -7 hours from UTC here on the US west coast, all deals appear as if they closed a day earlier than they actually did (i.e. midnight UTC becomes 5pm the previous day PST). How can we get the best of both worlds here, sending Hubspot the format it needs, while displaying things correctly on the front-end and in reporting?

0 Upvotes
1 Accepted solution
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Best practice for setting deal close dates via API?

SOLVE

Hi @cc2,

Close Date is a datetime property, so you can send a complete unix timestamp and the HubSpot UI will display the full date & time. Only date properties need to be set to UTC midnight; check out the following developer doc for more details:

View solution in original post

3 Replies 3
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Best practice for setting deal close dates via API?

SOLVE

Hi @cc2,

Close Date is a datetime property, so you can send a complete unix timestamp and the HubSpot UI will display the full date & time. Only date properties need to be set to UTC midnight; check out the following developer doc for more details:

leo-foodnome
Member

Best practice for setting deal close dates via API?

SOLVE

It does accept timestamp, though it has to be timestamp in midnight in utc.

0 Upvotes
Not applicable

Best practice for setting deal close dates via API?

SOLVE

Thanks! Thought it was just a date field.

0 Upvotes