I’m trying to integrate some functionalities into my application with the use of HubSpot API. Is it possible for me to retrieve a company ID based on company name via a search. The end goal is to create a Task for that specific company. Please advise if a select query can be used to retrieve a company ID.
You can retrieve a company based on the company name using this search the CRM API.
Use that endpoint : “/crm/v3/objects/companies/search”
And the body of your request would look like this :
{
"filterGroups":[
{
"filters":[
{
"propertyName": "name",
"operator": "EQ",
"value": "INSERT THE RELEVANT COMPANY NAME HERE"
}
]
}
]
}
You can vary the operators if you want to find the company using only part of the name.
Be careful though, if you have a unique identification number for the company, it will smooth the process out as company names can vary from one source to another and it’s harder to match a complex string than a unique id.