APIs & Integrations

BPerram
Member

Upon successful create of an object, it seems to disappear

SOLVE

I've recently switched from the API key auth to Private Apps, and I can see that all things are working correctly in terms of the CRUD updates. However after the initial create, I call subsequent updates to this new object, but start getting 404's for it not being there. 

Below is the contact and deal creation.

 

BPerram_0-1667179943191.png

Then within the same minute, It starts 404ing

This behaviour does not occur when using the API key, so was wondering if this is some sort of underlying behaviour of private apps.

I had been using this guide to transition from the api key to the private apps.
https://developers.hubspot.com/docs/api/migrate-an-api-key-integration-to-a-private-app

0 Upvotes
1 Accepted solution
BPerram
Solution
Member

Upon successful create of an object, it seems to disappear

SOLVE

So just to update this post.

In the end It was related to our own webhook hubspot application we had implemented feeding back into our server, which aimed to stop hubspot deals/contacts being created and then we deleted them. So entirely our fault 🙂 

View solution in original post

8 Replies 8
BPerram
Solution
Member

Upon successful create of an object, it seems to disappear

SOLVE

So just to update this post.

In the end It was related to our own webhook hubspot application we had implemented feeding back into our server, which aimed to stop hubspot deals/contacts being created and then we deleted them. So entirely our fault 🙂 

BPerram
Member

Upon successful create of an object, it seems to disappear

SOLVE

Hi Lee, good catch on the V1, i'll investigate that now.

As far as the deal_id being there, I have not been able to verify it. I can see that I'm getting successful 200's and 204's on other post and patch requests, but then suddenly it dissapears as if it was deleted. I've checked the portal id to ensure it's creating against the correct portal and that is correct.

0 Upvotes
weiliang_lee
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Upon successful create of an object, it seems to disappear

SOLVE

Hi there,

 

Could I get more information on what you meant by 404 during subsequent updates? 

 

Any screenshots of your postman params, endpoints, etc. would be useful in describing the issue you are facing. Hope to be able to assist!

 

Cheers

WL

BPerram
Member

Upon successful create of an object, it seems to disappear

SOLVE

Hi, so I'm using the npm package that wraps the hubspot client. 

BPerram_0-1667196515749.png

So initially as you saw in the original screenshot, it's working as a creation, but then shortly after it seems to dissapear

BPerram_1-1667196643296.png

BPerram_2-1667196686168.png

BPerram_3-1667196706036.png

 

0 Upvotes
weiliang_lee
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Upon successful create of an object, it seems to disappear

SOLVE

Hi there,

 

From your logs it feels like the endpoint could be wrong. An update to the deals api should be patch instead:

PATCH /crm/v3/objects/deals/{dealId}

 

If you're using the Nodejs library, it should also be automatically wrapped into a v3 api call instead of v1. Are you using this command?

hubspotClient.crm.deals.basicApi.update(dealId, SimplePublicObjectInput, idProperty);

 

You can refer to the documentation for the sample code for node: https://developers.hubspot.com/docs/api/crm/deals

 

Also, could you verify that deal_id 10748174711 exists in your portal? You can see the ID in the url when you navigate to Sales > Deals.

 

Happy to help debug further!

 

Cheers

WL

 

BPerram
Member

Upon successful create of an object, it seems to disappear

SOLVE

So I had done some debugging, to the point where I'm just simply creating the deal and no long doing the updates. I'm using the V3 endpoint for creation, and I can see that there is a successful create, 

BPerram_1-1667261190126.png

 

BPerram_0-1667261078951.png


However when I then go to access the deal via it's deal id, yeah it's not there.

BPerram_2-1667261282673.png

 

0 Upvotes
BPerram
Member

Upon successful create of an object, it seems to disappear

SOLVE

@weiliang_lee Any further thoughts on this? We need to switch over our api key to private apps by end of this month, so this is extremely business critical. If you can elevate this, or if you could check what happened to some specific deals/contacts within our account I would greatly appreciate it.

0 Upvotes
weiliang_lee
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Upon successful create of an object, it seems to disappear

SOLVE

Hello there, I've dropped you a private note with my details. Happy to help check it out when I get the time this evening!

0 Upvotes