We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Dec 2, 2021 10:11 PM - edited Dec 2, 2021 10:13 PM
Hi,
I have the search API:
https://api.hubapi.com/crm/v3/objects/deals/search?hapikey=[API_KEY]
{
"filterGroups": [
{
"filters": [
{
"value": "7695775",
"operator": "EQ",
"propertyName": "dealstage"
},
{
"value": "hs_lastmodifieddate",
"operator": "GTE",
"propertyName": "1638316800"
}
]
}
],
"properties": [
"dealname"
]
}
I get the following error:
{
"status": "error",
"message": "There was a problem with the request.",
"correlationId": "24709551-9717-4d21-b969-f4a2442ac88e"
}
I have tried seconds and milliseconds but get the same error.
Any ideas ?
I have tried using the epoch time converter but no luck.
Solved! Go to Solution.
Dec 3, 2021 6:44 AM
Hi @Stanza ,
You have to swap the value and propertyName. You mixed the value and propertyName aths_lastmodifieddate:
{
"value": "hs_lastmodifieddate",
"operator": "GTE",
"propertyName": "1638316800"
}
to
{
"propertyName": "hs_lastmodifieddate",
"operator": "GTE",
"value": "1638316800"
}
Regards, Ronald
Dec 5, 2021 9:49 PM
yes - have sorted this oiut - there were multiple tickets from me about this - I have to created another one since the first got tagged as spam - dunno why.
Dec 3, 2021 6:44 AM
Hi @Stanza ,
You have to swap the value and propertyName. You mixed the value and propertyName aths_lastmodifieddate:
{
"value": "hs_lastmodifieddate",
"operator": "GTE",
"propertyName": "1638316800"
}
to
{
"propertyName": "hs_lastmodifieddate",
"operator": "GTE",
"value": "1638316800"
}
Regards, Ronald
Dec 3, 2021 10:40 AM
Spot on @RMones !
Also, make sure you are working with a unix timestamp in milliseconds!
![]() | Make sure to subscribe to our YouTube channel where you can find the HubSpot Community Developer Show |