APIs & Integrations

MIstvan
Member

Contacts Search API no result

Hey there,

 

I'm trying to do a search by an array of string IDs:

crm/v3/objects/contacts/search

Filters used:

{
  "filterGroups" => [
    {
      "filters" => [
        {
          "propertyName" => "global_contact_id",
          "operator"=>"IN",
          "values"=>["M-COM-5", "M-COM-4392", "M-COM-4393", "M-COM-4394", "M-COM-4395", "M-COM-4396", "M-COM-4397"]
        }
      ]
    }
  ]
}

 But the response has 0 results, when the 133 contacts are using this property.

{
  "total": 0,
  "results": []
}

Does anyone know why I get no results?

0 Upvotes
5 Replies 5
Jaycee_Lewis
Community Manager
Community Manager

Contacts Search API no result

Hey, @MIstvan 👋 Can you post a full request and response, please? Furthermore, can you double-check and make sure you do not have a value of 0 set for the limit in your request?

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
MIstvan
Member

Contacts Search API no result

Hi @Jaycee_Lewis , I retried the Search API request and it still doesn't work as expected.
Do you have any updates about the issue?

0 Upvotes
MIstvan
Member

Contacts Search API no result

Hey, @Jaycee_Lewis
Any updates regarding the issue?

0 Upvotes
MIstvan
Member

Contacts Search API no result

Updates?

0 Upvotes
MIstvan
Member

Contacts Search API no result

Hi @Jaycee_Lewis , here is the full request body. I used the Private App token to authenticate.

{
  "filterGroups":[
   {
     "filters":[
       {
         "propertyName":"global_contact_id",
         "operator":"IN",
         "values":["M-COM-4194","M-COM-4195","M-COM-4196","M-COM-4198","M-COM-4199","M-COM-4200","M-COM-4201","M-COM-4202","M-COM-4203","M-COM-4204"]
       }
     ]
   }
  ],
  "limit":100
}

And this was the response:

{"total":0,"results":[]}

I found out that if I use a property that was created by HubSpot (for example the email) it works fine. But for custom properties that I created, the search API doesn't return any data.

0 Upvotes