Not returning deleted company


#1

Hi Team,

I create a company and retrieve it in the GetAllCompanies call fine and store it in my SQL database.

I then delete that company in HubSpot.

I call GetRecentlyModifiedCompanies which works fine for the most part, however, I expect to get the deleted company here with the IsDeleted value being true so that I can delete this in my SQL database. Unfortunately, I am not returning anything for the company I deleted.

How should I go about removing a deleted company, am I missing something?

I hope this makes sense and is clear, if not let me know (I have one more question I will ask in a separate Topic).

Thank you,
Toby


#2

Hi @rainsfordt,

Deleted companies are not returned by the Companies API. Your best bet would be to use the Webhooks API to subscribe to company deletion events: