HubSpot Owner Endpoint occasionally missing owner details in the response

Hi there,

We are currently facing an intermittent issue with the HubSpot Owner endpoint. On certain occasions, the response from the endpoint does not include the owner details.

We are using the following request to retrieve HubSpot owner information:

GET https://api.hubapi.com/crm/v3/owners/{ownerId}

While this issue does not occur frequently, it arises randomly, making it challenging to identify the root cause.

I would greatly appreciate any insights or recommendations from the community on how to address this issue. Has anyone else experienced a similar problem with the HubSpot Owner endpoint, where the response occasionally omits the owner details?

Thank you in advance for your time and assistance.

Hey @RSPerera, this is weird! Not something I’ve experienced before. What particular properties is it omitting when it does this? (firstName, useId, teams, etc)

Have you reached out to HS Support with any screenshots of your results to see if they can review?

Hi,

This issue is occured to one of our customer. We are able to get the owner Id from deals endpoint but the owner details (firstname, lastname) are not fetched in the response.

we got this response as the error:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>

Do you have a screenshot of your Headers/Body? Would be useful to review.

Hi ,

This is our request:

curl --location --request GET 'https://api.hubapi.com/crm/v3/owners/' \
--header 'Authorization: Bearer <Token>'

Hey, I’ve tried a few different variations to try and replicate this issue, and the only way I can get HubSpot to return a 404 is if I’m inserting an {ownerId} that HubSpot doesn’t recognise. Are you confident that the ID you’re looking for does exist in the portal?

If you’re just trying to list all Owners (without using the {ownerId}) then I can see no reason it wouldn’t work. If it isn’t an incorrect id as above, my only suggestion would be to ask Support to see if they can assist you.

Hope you find the issue soon!

Hi.

We are using deals endpoint to get hubspot_owner_id to use as owner_id

curl --location --request GET 'https://api.hubapi.com/crm/v3/objects/deals/?properties=hubspot_owner_id&associations=contacts,companies,products,quotes,line_items' \
--header 'Authorization: Bearer <Token>'

After this, we will use

curl --location --request GET 'https://api.hubapi.com/crm/v3/owners/{hubspot_Owner_id}' \
--header 'Authorization: Bearer <Token>'

So this is the way we are getting the owner id.

Is there anything to do with the permission for the paticular user?

Hey,

It wouldn’t be a particular user’s permissions as you’re accessing the API from the permissions of the Private App - and you do have permission to query those particular objects, otherwise you’d be getting a scope error.

I have though found something interesting, now that I know you’re getting the ownerId from the Deals properties first. I’ve run a couple of tests, and aside from Deals that have no Owner - which we’d expect to fail - I’ve been able to replicate the 404 error for this Deal here in my portal:

When I take the ownerId from here and use it to Query the Owners object, I get the same thing as you:

When I look into this particular Deal, I can see that the Deal Owner is someone who has left our company, and whose HS account has now been Deactivated:

Untitled.png

I’m now wondering if this is the reason you’re getting 404 errors too. From the examples of the OwnerIds that you get 404s on, have you checked if they are Deactivated users?

Hi.

Yes This make sense.

Thank you

No worries, hope that solves your issue! If it does, feel free to mark this as solved.