APIs & Integrations

dja
Participant

How to use /crm/v3/objects/deals or another api to get the deals updated after a date

SOLVE

I am trying to get all deals updated after a specific date building an incremental integration and not needing to refresh the entire deal's structure. 

Is it possible to get the deals after specific date or any criteria?

Thanks in advance

 

0 Upvotes
1 Accepted solution
Willson
Solution
HubSpot Employee
HubSpot Employee

How to use /crm/v3/objects/deals or another api to get the deals updated after a date

SOLVE

Hey @dja 


Your best bet would be to work with our CRM Search API searching for Deals with a create_date after a certain timestamp or, you can use the hs_lastmodifiedDate like this:

{ "propertyName" => "hs_lastmodifieddate", "operator" => "GTE", "value" => "YOUR_VALUE" }

This would result in a request looking like this:

POST https://api.hubapi.com/crm/v3/objects/deals/search?hapikey={{hapikey}}

Payload:
{
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "hs_lastmodifieddate",
            "operator": "GTE",
            "value": "1584748800000" (This is 30 days ago, from now as of posting, in milliseconds)
          }
        ]
      }
    ]
  }

I hope this helps!

Product Manager @ HubSpot

View solution in original post

0 Upvotes
2 Replies 2
Willson
Solution
HubSpot Employee
HubSpot Employee

How to use /crm/v3/objects/deals or another api to get the deals updated after a date

SOLVE

Hey @dja 


Your best bet would be to work with our CRM Search API searching for Deals with a create_date after a certain timestamp or, you can use the hs_lastmodifiedDate like this:

{ "propertyName" => "hs_lastmodifieddate", "operator" => "GTE", "value" => "YOUR_VALUE" }

This would result in a request looking like this:

POST https://api.hubapi.com/crm/v3/objects/deals/search?hapikey={{hapikey}}

Payload:
{
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "hs_lastmodifieddate",
            "operator": "GTE",
            "value": "1584748800000" (This is 30 days ago, from now as of posting, in milliseconds)
          }
        ]
      }
    ]
  }

I hope this helps!

Product Manager @ HubSpot
0 Upvotes
dja
Participant

How to use /crm/v3/objects/deals or another api to get the deals updated after a date

SOLVE
Thanks it works for me.
0 Upvotes