APIs & Integrations

brightgauge1
Mitglied

GET all contacts endpoint returning 414

lösung

Hello,

When making a GET request to the /contacts/v1/lists/all/contacts/all endpoint, and passing in property as a query param, we are receiving a 414 URI Too Long, due to the fact that one of our mutual customers has a lot of properties in their Hubspot account.

 

My question is: is there a way for this particular customer to remove properties from this call, on their end, in their Hubspot instance? What is the best way to handle this issue?

 

Thank you!

0 Upvotes
1 Akzeptierte Lösung
WendyGoh
Lösung
HubSpot Employee
HubSpot Employee

GET all contacts endpoint returning 414

lösung

Hey @brightgauge1,

 

Do you mind sharing with me what's the differences that your team is seeing? 

 

In this case, while it isn't possible to block out certain properties when retrieving it via the properties/v1/contacts/properties endpoint, I would recommend them to look through their contact properties and see if there's any properties that they can leave it out i.e. email optout properties? As those properties tend to have longer name. 

 

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
4 Antworten
WendyGoh
HubSpot Employee
HubSpot Employee

GET all contacts endpoint returning 414

lösung

Hey @brightgauge1,

 

I'd recommend for you to use the HubSpot V3 CRM Search API in which you can control the returned properties on the POST body instead of passing it through as query parameters.

 

i.e. POST crm/v3/objects/contacts/search?hapikey=YOUR_HUBSPOT_API_KEY \

 

POST body

{
    "properties": [ "email", "state" ]
   }
brightgauge1
Mitglied

GET all contacts endpoint returning 414

lösung

Hi Wendy,

 

Thanks for the idea! I tested it out, but the results ended up being too differen than what we currently have.  

 

What we're doing now,  is making a GET request to the 'properties/v1/contacts/properties' endpoint and using the result of that as a parameter to pass into the 'contacts/v1/lists/all/contacts/all' call. (I hope this makes sense?)

 

When doing so for just one of our mutual customers, we're receiving the 414 because it looks like they have a *lot* of properties, causing the URI to be way too long. Any advice for this one customer? (Can they "block out" some of their properties, somehow?)

 

Thanks!

Maddie

0 Upvotes
WendyGoh
Lösung
HubSpot Employee
HubSpot Employee

GET all contacts endpoint returning 414

lösung

Hey @brightgauge1,

 

Do you mind sharing with me what's the differences that your team is seeing? 

 

In this case, while it isn't possible to block out certain properties when retrieving it via the properties/v1/contacts/properties endpoint, I would recommend them to look through their contact properties and see if there's any properties that they can leave it out i.e. email optout properties? As those properties tend to have longer name. 

 

0 Upvotes
brightgauge1
Mitglied

GET all contacts endpoint returning 414

lösung

Hey Wendy,

 

Thank you for your help! It looks like we can pass on this info, if need be:

 

I would recommend them to look through their contact properties and see
if there's any properties that they can leave it out i.e. email optout properties? As those properties tend to have longer name. 

 

 

0 Upvotes