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).
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.
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.
Hi @dadams… Thanks for your reply. A couple follow-up items:
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.
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
GET /companies/v2/companies/paged - Get all companies in a portal
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.