New or changed contacts - ODATA filtering

Highlighted
New Contributor

We have many many new contacts (as in: ten thousands per month). Is there any way to filter the results (with OData?) of the /contacts/v1/lists/recently_updated/contacts/recent endpoint? Now I get some 10.000 new or changed contacts back each time, which of course are for 99% the same contacts. I'm only interested in new/changed in the last xx minutes or so. Is this possible?

 

Or do we have to just save the  vid-offset and time-offset to the first record of the response to the previous request?

Reply
0 Upvotes
1 Reply 1
Highlighted
HubSpot Moderator

Hey @tendenztest,

 

When looking to retrieve contacts that has been created after a certain date, you can use the CRM API | Search. E.g. if I'm looking to get contacts created or during after 7th Feb 2020, 3:33:56 PM UTC +8 which is 1581060836897 in miliseconds, I would do the following:

 

POST URL - https://api.hubspot.com/crm/v3/objects/contacts/search?hapikey={{hapikey}}

 

POST Body - 

{
    "filters": [
      {
        "propertyName": "createdate",
        "operator": "GTE",
        "value": "1581060836897"
      }
    ]
  }

Hope this helps to shed some light!

Reply
0 Upvotes