Hi Support,
Here we passed URL like this
https://api.hubapi.com/crm/v3/objects/contacts?lastmodifieddate=2022-08-31T22:38:08.712Z
Its not working for me. Can you please tell us correct form of passing parameters.
Thank you,
Smit Karbhari
Hi Support,
Here we passed URL like this
https://api.hubapi.com/crm/v3/objects/contacts?lastmodifieddate=2022-08-31T22:38:08.712Z
Its not working for me. Can you please tell us correct form of passing parameters.
Thank you,
Smit Karbhari
What are you trying to do here? Are you trying to search for contacts with that modified date? If you are trying to do something like that I believe you have to use the search api: Search the CRM - HubSpot docs and timestamps would be an epoch date as shown further down in the examples on the search API.
Hi,
Yes i am trying to search contact records based on modified date, can you
give me example of it?
Thank you,
Smit
curl --location --request POST 'https://api.hubapi.com/crm/v3/objects/contact/search' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer xxxxxx' \
--data-raw '{
"filterGroups": [{
"filters": [{
"operator": "GT",
"propertyName": "lastmodifieddate",
"value": 1661860800000
}]
}],
"properties": ["firstname","lastname","email"]
}'
Hey, can you give me a hint, how is this time-format called?
Hi Lee,
Thanks its working now. will get back to you if any query over there. thanks again.
Smit Karbhari
It’s a Unix Timestamp/Epoch Time. Basically it represents the amount of time that has passed since 00:00:00 Jan 1, 1970 UTC and it pretty common in programming as a way to store date time irrespective of timezone. In my experience it’s generally expressed in milliseconds, but I don’t think it has to be.
https://en.wikipedia.org/wiki/Unix_time
That helps. Thanks!