APIs & Integrations

Stanza
メンバー

Deal Search API - filtering last modified date

解決

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.

0 いいね!
1件の承認済みベストアンサー
RMones
解決策
投稿者 | Platinum Partner
投稿者 | Platinum Partner

Deal Search API - filtering last modified date

解決

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

元の投稿で解決策を見る

3件の返信
Stanza
メンバー

Deal Search API - filtering last modified date

解決

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.

0 いいね!
RMones
解決策
投稿者 | Platinum Partner
投稿者 | Platinum Partner

Deal Search API - filtering last modified date

解決

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

dennisedson
HubSpot製品開発チーム
HubSpot製品開発チーム

Deal Search API - filtering last modified date

解決

Spot on @RMones !

Also, make sure you are working with a unix timestamp in milliseconds!