APIs & Integrations

impor2developer
Participant

Getting companies with all the properties over API results in error code 414 url too large

Hello!

 

It seems that when companies have a lot of custom fields, then HubSpot API doesn't return anything and instead responds with 414 HTTP status code. This doesn't leave any choice, but to make 1+N API calls: a. load the batch of companies b. for each company load its full data.

 

Is there a way to do this in a better way?

 

Seems like an oversight in API design.  For example, for contacts there is an API endpoint to load a group of contacts by id. Why isn't there something like that for companies?

0 Upvotes
2 Replies 2
WendyGoh
HubSpot Employee
HubSpot Employee

Getting companies with all the properties over API results in error code 414 url too large

Hi @impor2developer,

 

To get a full picture of things, could you share with me the API endpoint that you're using and the custom properties appended on the endpoint url? 

 

If it's more comfortable for you, you can share it via dm.

0 Upvotes
impor2developer
Participant

Getting companies with all the properties over API results in error code 414 url too large

We had a private conversation about this with HubSpot reprsentative and it seems that, currently, HubSpot API doesn't have a good solution for this issue.

 

Shortly, this is expected error for HubSpot portals with large number of custom fields: listing all the fields in GET API request would make request exceed the GET request size limit and one would get a 414 error code.

0 Upvotes