Is there a way to get list of deleted contacts based on deletion date using rest api

NNelissen
Participant

I am trying to fetch contacts deleted depending on the deleted date?

Can contacts be searched based on deletion date using API?

Is it possible to do the same using API call?

If yes please help us with the curl request?

If no is there any other to achieve this apart from using webhook functionality

Thanks!

 

0 Upvotes
7 Replies 7
NNelissen
Participant

Hi @dennisedson 

As I have mentioned in my question I am looking for a way to filter out deleted contacts based on deletion date using the rest API call apart from webhook functionality

So there is no other way to do the same?

Thanks!!

0 Upvotes
NNelissen
Participant

Hi @dennisedson 

@himanshurauthan 

Any updates?

Thanks!!

 

0 Upvotes
dennisedson
Community Manager

@NNelissen 

I think the only way you can approach this is by setting up a webhook to subscribe to the record deletion.  This will include a timestamp that you can the reference.

Example payload:

{
  "eventId": 3062429327,
  "subscriptionId": 1065544,
  "portalId": xxxx,
  "appId": 223916,
  "occurredAt": 1639495413987,
  "subscriptionType": "company.deletion",
  "attemptNumber": 1,
  "objectId": 4889208681,
  "changeFlag": "DELETED",
  "changeSource": "API"
}
Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
NNelissen
Participant

Hi @dennisedson @himanshurauthan

Can someone help me here?

Thanks!!

0 Upvotes
NNelissen
Participant

Hi @dennisedson 

I am aware of this to get all deleted contacts

But I really need to filter depending on the deleted date

Is there any way to achieve this?

Thanks!!

 

0 Upvotes
dennisedson
Community Manager

@NNelissen 

To the best of my knowledge, no.

@himanshurauthan , do you know of a way to do this?

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
dennisedson
Community Manager

Not sure about the deletion date part, but you can get a list of deleted contacts by settinng the archived parameter to true.  eg:

https://api.hubapi.com/crm/v3/objects/contacts?archived=true&hapikey={{hapikey}}
Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes