Get last 90 days of updated deals

Hi

I want to get last 90 days of modified deals using Hubspot API.

Currently I am using

base_url = f"https://api.hubapi.com/crm/v3/objects/deals/"

    params = {

              "filterGroups": \[{

        "filters": \[{

            "propertyName": "hs\_lastmodifieddate",

            "operator": "GTE",

            "value": date\_filter

        }]

    }],

    "associations": "companies",

    "properties": \["company\_id", "dealname", "dealstage", "hs\_date\_entered\_qualifiedtobuy",

                    'amount', 'closedate', 'hubspot\_owner\_id', 'source', 'underwriter', 'pipeline',

                    'clientuserid', 'hs\_analytics\_source', 'source']}

And get request, but the filter doesn’t work

Hi @NSharma76

curl -X POST "https://api.hubapi.com/crm/v3/objects/deals/search" \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{
 "filterGroups": [{
 "filters": [{
 "propertyName": "hs_lastmodifieddate",
 "operator": "BETWEEN",
 "value": new Date().valueOf() - 91*24*60*60*1000,
 "highValue":new Date().valueOf()+ 
24*60*60*1000
 }]
 }],
 "associations": ["companies"],
 "properties": ["company_id", "dealname", "dealstage", "hs_date_entered_qualifiedtobuy",
 "amount", "closedate", "hubspot_owner_id", "source", "underwriter", "pipeline",
 "clientuserid", "hs_analytics_source", "source"],
 "limit": 100
}' 

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!