CRM objects filtering

Hello! I have a small question regarding the CRM objects API.

Is it possible to filter CRM objects by the `updatedAt` and `deletedAt` fields, like the CMS items?

Hey @OYakymenko

Yes you can try hitting the below code and check the results.

Hope this helps you out

This is an example of searching deals →

searchdeals();

function searchContact()

{

var options = { method: ‘POST’,

url: 'https://api.hubapi.com/crm/v3/objects/deals/search?hapikey='+HUB_API_KEY,

headers:

{

‘Content-Type’: ‘application/json’ },

body: {

“filterGroups”:[

{

“filters”:[

{

“propertyName”: “hs_lastmodifieddate”,

“operator”: “EQ”,

“value”:property_value

}

]

}

]

},

json: true };

request(options, function (error, response, body) {

if(response.statusCode==200){

//deal found now do what you want

console.log(response.body);

}

else

{

console.log(‘no contact found’);

}

});

}

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

Thanks! It looks like this is what I was looking for.