Pull Company data based upon query string

companies

#1

We create orders in our system, but the company and contact data resides in Hubspot. When creating an order by our customer service team we need to query Hubspot for a “company or contact record” and we pull that record [data] into our system for that person [name, address, phone, email etc] so our customer service doesn’t have to type all the basic contact information.

After reviewing the Hubspot API specification we couldn’t find any API which could return us a list of matching companies based upon the query string entered by the user (in our ordering system).

We are referring to this API documentation. http://developers.hubspot.com/docs/methods/companies/companies-overview

Are missing something or is there a workaround?


#2

Hi @jgries

At the moment our Companies API only allows you to find a company by the domain name. Otherwise the only way to get a company is with our internal ID for that company record. If you’re trying to search by other data, you’d need to keep a separate index of the companies, which you may also want to do if you’re querying as people are typing anyways, to cut down on the API calls you’re using.


#3

Hi @dadams… Thanks for your reply. A couple follow-up items:

  1. When you indicated a separate index of the companies, are you referring to us creating our own ID (possibly from our system) and using that as a custom company or contact property that will be unique to us? If so, how would we add that custom property to our existing 18K companies and 5K contacts in Hubspot already loaded from our IMPORT2 process we did when we migrated from Pipedrive to Hubspot.

  2. Secondly, we are trying to get the Unique Company and /or Contact ID for each of our records (to use as a lookup in our e-commerce system), but there does not appear to be a way to do this via Export. Therefore, can we use the API with “Company name” or “Associated company” field to pull the Company ID for all 18K Company records and put the data into a table/CSV (from our developers) that has ID and unique company name… if we can get the data from the API into a CSV table, then I could do a vlookup in Excel to match the unique ID with Company Name field. How can we best get the unique Company and / or Contact ID into our export data table for lookup purposes in our e-commerce system? Any insights are greatly appreciated.
    http://developers.hubspot.com/docs/methods/companies/get_company


#4

We don’t have a way to set up a secondary ID for companies, so you’d need to use the companyId to reference the company record in HubSpot.

We don’t have a way to get the ID from an export, but you can get it using the Companies API.

Using that endpoint, you can page through all of your company records 250 records at a time, and get the company name included in the returned data to match against your existing data.


#5

Does anyone know if HubSpot has this in the works at all in the near future? That is, the ability to query companies by parameters such as name or address. Is there something I’m missing or doesn’t this seem like pretty basic functionality to be missing in an API? We don’t have the want or capacity to create an index of all of the data on HubSpot just so we can query locally and then get more info by HubSpot’s unique ID.


#6

+1 on this as a feature request. It’s a real pain to have to maintain a separate index and introduces its own set of problems.


#7

When will this feature be available? Is there any plan to implement this feature?