newera
February 2, 2024, 2:43pm
1
Hi,
I wonder if there is a way to search for more than 1 company at a time with
https://api.hubapi.com/crm/v3/objects/companies/search
I have tried with one which works
filterGroups: [
{
filters: [
{
propertyName: ‘domain’,
operator: ‘EQ’,
value: ‘test.com ’,
},
],
},
],
properties: [‘domain’, ‘name’, ‘website’],
but with 2 I get an empty response even doe test.com exists
filterGroups: [
{
filters: [
{
propertyName: ‘domain’,
operator: ‘EQ’,
value: ‘test.com ’,
},
{
propertyName: ‘domain’,
operator: ‘EQ’,
value: ‘test1.com ’,
},
],
},
],
properties: [‘domain’, ‘name’, ‘website’],
Or is there a easier way to search on multiple companies?
regards
@newera - I would have thought, like you, that filter groups should have worked. But there is a more direct option I believe - use of the IN filter type, which enables testing against a array of names for any property.
Does that help?
Steve
newera
February 2, 2024, 6:51pm
3
Thanks @SteveHTM the IN works
I’m trying to use the search to get the company ID based on a custom property.
The filtergroups does not seem to filter, but gives me all companies.
How would you format the IN filter type.
I’ve used cURL.exe in numerous situations to retrieve from APIs and the documentation doesn’t give examples to make this easy.
I’m also trying in Postman and ended up retrieving all companies when I want just one..