Search API to get all updated records where object create date/time is not equal to last modified.

Hi all! I am trying to use the search API (https://api.hubapi.com/crm/v3/objects/**objectid**/search) to get all recently modified records for several custom objects. I am using this filter currently:

“filters”: [

{

“propertyName”: “hs_lastmodifieddate”,

“operator”: “GTE”,

“value”: timestamp

}

But, I also want to include a filter that specifie that the “hs_lastmodifiedate” DOES NOT EQUAL “hs_createdatdate” (I forget the exact internal name there but i want it to not equal the creation timestamp.) This is because those records have not been actually updated and it slows down our process. Is there a way to specify an additional filter that “x property Does not equal y property” ?

Thanks for the help!

Hello @ZRuben
you can include an additional filter to exclude records where the hs_lastmodifieddate is equal to the hs_createdatdate. To do so, you can use the “AND” logical operator to combine the two filters together. Here is an example of how you can modify your filter:

"filters": [
 {
 "propertyName": "hs_lastmodifieddate",
 "operator": "GTE",
 "value": timestamp
 },
 {
 "propertyName": "hs_createdatdate",
 "operator": "NEQ",
 "value": "hs_lastmodifieddate"
 }
]

second filter specifies that the hs_createdatdate property should not be equal to the hs_lastmodifieddate property using the “NEQ” (not equal) operator.

Note: You will need to replace “hs_createdatdate” with the actual internal name of the property for the object you are querying.

Thanks & Regards
Himanshu Rauthan