APIs & Integrations

Sigloo
Member

Filter search API results that weren't modified via the API

I'm making a request to filter companies via the search API by last modified in some period, which is working great. I'm wondering if there is a filter that can be used to exclude results that were modified programmatically.

 

For example: A company is updated in our 3rd party system => we POST that change to HubSpot via an app authenticated with Oauth => HubSpot now returns that result in companies that were recently modified => We needlessly make the update again in our system.

 

We can of course do a diff to detect whether there is a change to perform, but I'd rather have the API not even return that change if it wasn't done by a human.

 

"hs_updated_by_user_id" appears to be a dead end. From what I can tell, it only updates if the change was done by a human.

 

Is there some other field we can reference for this purpose?

0 Upvotes
3 Replies 3
nikodev
Top Contributor | Elite Partner
Top Contributor | Elite Partner

Filter search API results that weren't modified via the API

Hey @Sigloo

I don't know of a way to get this done without adding to the amount of API requests you're making, which would defeat the purpose if I'm understanding your question. There isn't a property that will give you data you're looking for in a manner that would allow you to use it in a search filter. 

However, depending on the details of your use case, making use of the "propertiesWithHistory" parameter of the batch read endpoint will give you more details on the source than the hs_updated_by_user_id property will.

Maybe graphql? 

Curious to know if there is a way to do this though. Hopefully someone can fill us both in. 

Good luck.  

A8 Labs

Jaycee_Lewis
Community Manager
Community Manager

Filter search API results that weren't modified via the API

Hey, @nikodev! Thank you very much 🙌

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Filter search API results that weren't modified via the API

Hi, @Sigloo 👋 Thanks for the interesting question. Let's see if the community has ever tackled anything similar. Hey, @nikodev @Mike_Eastwood @Teun have you played around here before?

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes