How to delete Company and Opportunities using Rest API?

BACKGROUND
I’m creating an app that integrates with Infusionsoft. I’m developing using Laravel PHP.

I NEED
to prepare the CRUD functionalities with the respective objects (Contacts, Companies, …)
But I wasn’t able to implement the Delete operation for Companies and Opportunities using the Rest API (and the documentation doesn’t say anything about deleting too)

I TRIED
to force delete using Guzzlehttp:

Sent DELETE HTTP to Companies with this URL. But this returns 404 not found
https://api.infusionsoft.com/crm/rest/v1/companies/25?access_token=xxxxxxxxxxxxxxxxxxxxxxxx

Sent DELETE HTTP to Opportunities with this URL. But this returns 405 method not allowed
https://api.infusionsoft.com/crm/rest/v1/opportunities/1?access_token=xxxxxxxxxxxxxxxxxxxxxxxx

QUESTION
Is there some way that our app can delete companies and opportunities? I know that we can manually delete using the Keap site. But it would be great if the app user wouldn’t need to manually do it himself.

Hi, @Garik_Tate,

The answer to this is going to depend on what you’re app is…ie is it Infusionsoft or a Keap app?

Hey @John_Borelli, its an Infusionsoft app.

Please correct me if i’m wrong with this. In my understanding, our app may be Infusionsoft. But our Sandbox account is in Keap. (Or technically we Login at Keap in order to access our sandbox account there).

Garik:

Everything is now technically Keap. Keap is the new name of the company.

They now have their Keap product (in 3 flavors) — that has the new look and feel.

They also have Infusionsoft by Keap — which is the ‘original’ Infusionsoft and what we all call Infusionsoft.

Everybody logs in via the Keap.com website, though.

Jeff

Oh okay thanks @Jeff_Arnold! This line made me understand it all.

To: @John_Borelli
Our app is in Infusionsoft. Since (after logging via Keap.com) it redirects to our app with a url like:
xxxxx.infusionsoft.com/Dashboard

We were able to delete from there. But what we need is a way to delete by integrating thru it.

Hi, @Garik_Tate,

Ok so the companies and contacts can certainly be deleted and managed through the api. REST doesn’t have all the functionality (yet) that the RPC does so the RPC will allow the deletion of records from the table views or through the provided SDK methods. Either will work fine. From there it’s just a matter of your implementation for your project (ie the particulars of what you’re working with).

18 months later and still cannot delete companies from rest api

Read the company id and then use that id on the contact delete method. A company is stored on the contact table and company related functions will work on it if you give it the correct id.

Hi @John_Borelli , delete call on contacts url with company id param returns 404 “Unable to find this Contact” error