APIs & Integrations

marinamele
Participant | Diamond Partner
Participant | Diamond Partner

CRM API Objects Contacts → Error when adding multiple filters (4 or more filters)

SOLVE

Hi,

I'm using the CRM API → Objects → Contacts → Search endpoint (/crm/v3/objects/contacts/search)
I didn't have any errors when performing a filter serach with 3 conditions. However, today I tried 4 conditions and it faild with the following error:

Invalid input JSON on line 1, column 319: Cannot construct instance of `com.hubspot.inbounddb.publicobject.core.v3.sea...

 

I've checked that the error disappears if sending only 3 of these 4 conditions or filters.

 

Can you help me? Thanks!

0 Upvotes
1 Accepted solution
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

CRM API Objects Contacts → Error when adding multiple filters (4 or more filters)

SOLVE

Hey @marinamele,

 

As stated on the documentation

 

When multiple filters are provided within a filterGroup, they will be combined using a logical AND operator. When multiple filterGroups are provided, they will be combined using a logical OR operator. The system supports a maximum of three filterGroups with up to three filters each.

 

 

View solution in original post

0 Upvotes
3 Replies 3
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

CRM API Objects Contacts → Error when adding multiple filters (4 or more filters)

SOLVE

Hey @marinamele,

 

As stated on the documentation

 

When multiple filters are provided within a filterGroup, they will be combined using a logical AND operator. When multiple filterGroups are provided, they will be combined using a logical OR operator. The system supports a maximum of three filterGroups with up to three filters each.

 

 

0 Upvotes
marinamele
Participant | Diamond Partner
Participant | Diamond Partner

CRM API Objects Contacts → Error when adding multiple filters (4 or more filters)

SOLVE

Thanks Wendy for your reply!

 

I think this limit is quite low. I'm filtering contacts between two dates so I'm using 2 filters inside a filterGroup. This lets me with only a filter to narrow my search. And it has to be a property.

 

Do you know if HubSpot will increment the limit of filters inside a filterGroup?

 

Thanks!

 

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

CRM API Objects Contacts → Error when adding multiple filters (4 or more filters)

SOLVE

Hey @marinamele,

 

Currently, I'm not aware of increasing the filter limit as part of our product roadmap. 

 

Having said that, one other suggestion that I have for your team is to create a list within HubSpot and use the Get contacts in a list | Contact Lists API to retrieve the contacts in a list.

0 Upvotes