APIs & Integrations

rOsborn123
Colaborador(a) | Parceiro Elite
Colaborador(a) | Parceiro Elite

Delete Custom Object Error

resolver

I've deleted custom objects many times before hitting the endpoint

 

DELETE https://api.hubapi.com/crm/v3/schemas/{objectType}

 

then with archived=true appended to "purge" the database so that I could start over. I'm following the exact same protocol. I first deleted all records of the object and am attempting to delete the object but am receiving a 400 error with the following response:

 

data: {
      status: 'error',
      message: 'Unable to access requested object type',
      correlationId: '26550887-373f-47ef-9916-36ebec96cc9c',
      category: 'VALIDATION_ERROR'
}

 

The api key matches and is working with the other schema requests, so I'm not entirely sure what could be the cause of this issue, but I need it resolved rather quickly. 

Any insight would be greatly appreciated.

 

0 Avaliação positiva
1 Solução aceita
dennisedson
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Delete Custom Object Error

resolver

Hi @rOsborn123 ,  just getting back from my break and I was checking in on this.  Looks like there wasn't a good answer.  Hopefully just a quirk that will not happen again. 

Please let us know if it happens again 😀

Exibir solução no post original

10 Respostas 10
rOsborn123
Colaborador(a) | Parceiro Elite
Colaborador(a) | Parceiro Elite

Delete Custom Object Error

resolver

@dennisedson I appreciate the support!

dennisedson
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Delete Custom Object Error

resolver

Hi @rOsborn123 ,  just getting back from my break and I was checking in on this.  Looks like there wasn't a good answer.  Hopefully just a quirk that will not happen again. 

Please let us know if it happens again 😀

rOsborn123
Colaborador(a) | Parceiro Elite
Colaborador(a) | Parceiro Elite

Delete Custom Object Error

resolver

@tominal 
I've deleted custom objects many times before. If it helps you, make sure you've delete all records of a custom object then hit the 

https://api.hubapi.com/crm/v3/schemas/{objectType}

 

endpoint, then hit the 

https://api.hubapi.com/crm/v3/schemas/{objectType}?archived=true

endpoint to completely delete the object. You can then recreate a custom object with the same name if you want. Purge has been deprecated, I believe. The key is to make sure all instances of the object are deleted first. I'm not sure if this helps but just giving some background in case it might help. This seems to be a particular error. Let me know if you've tried that and are getting this same error on the initial delete endpoint. Might help to pinpoint what's going on and where. 

tominal
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Delete Custom Object Error

resolver

It's working for me. Then again I used the example custom object in the docs.

I specified p9101656_my_object as the {objectType}.

Hope that helps.


Thomas Johnson
Community Champion


Kahu Software LLC
A Texan HubSpot consulting firm
https://kahusoftware.com
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Delete Custom Object Error

resolver

I have not attempted recently, but this is the method I have successfully done in the past.  @rOsborn123 saw your support ticket and it looks like it is in  the right hands.

rOsborn123
Colaborador(a) | Parceiro Elite
Colaborador(a) | Parceiro Elite

Delete Custom Object Error

resolver

Nice! My issue seems to be unique then. 

tominal
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Delete Custom Object Error

resolver

I'll give it a shot to help!

I misread the thread thinking this was about the purge endpoint. Why was it deprecated? 😭


Thomas Johnson
Community Champion


Kahu Software LLC
A Texan HubSpot consulting firm
https://kahusoftware.com
0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Delete Custom Object Error

resolver

@rOsborn123 , does this issue persist?

Might be worth getting in touch with support, if you have not already, to look under the hood

rOsborn123
Colaborador(a) | Parceiro Elite
Colaborador(a) | Parceiro Elite

Delete Custom Object Error

resolver

Thanks @dennisedson 
I went ahead and did so - seems to be a bug of some sort. Waiting for a resolution

tominal
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Delete Custom Object Error

resolver

I'll tell you I gave up trying to purge custom objects because of this exact error. Inserting myself here for any updates on this fix.

Deleting these records from the UI is nightmarish.


Thomas Johnson
Community Champion


Kahu Software LLC
A Texan HubSpot consulting firm
https://kahusoftware.com