APIs & Integrations

rainsfordt
Member

Not returning deleted company

SOLVE

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

0 Upvotes
1 Accepted solution
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Not returning deleted company

SOLVE

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:

View solution in original post

1 Reply 1
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Not returning deleted company

SOLVE

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: