HubSpot Ideas

PrasenjitDas

Search contact ID using any properties

Hi Team,

 

We are trying to get contact ID using other properties not just email. If you can suggest on this or implement this option it will be helpful for us to get contact id with using email and we can use other properties.

 

We tried doing this but got below error

 

Input:-

var client = new RestClient("https://api.hubapi.com/crm/v3/objects/contacts/batch/read?archived=false&hapikey=************888888********* ");

var request = new RestRequest(Method.POST);

request.AddHeader("accept", "application/json");

request.AddHeader("content-type", "application/json");

request.AddParameter("application/json", "{\"properties\":[\"phone\",\"43565656565\"],\"propertiesWithHistory\":[\"phone\",\"111111\"],\"idProperty\":\"phone\",\"inputs\":[{\"id\":\"111111\"}]}", ParameterType.RequestBody);

IRestResponse response = client.Execute(request);

 

Output:-

{

  "status": "error",

  "message": "Contacts may only be looked up by 'email' as part of a unique property value request.  Property requested: phone",

  "correlationId": "************888888*********"

}

 

6 Replies
Kriuthika
Member

Any one please suggest!

 

we are handling Offline customers in Hubspot without having email address.

 

it would be great if i get any suggestion on the above query

PrasenjitDas
Participant

@Developer @hubspotcommunit @hubspot kindly help on this

MiaSrebrnjak
Community Manager

Hi @PrasenjitDas & @Kriuthika,

 

thank you for reaching out to the Community!

HubSpot offers the following search functionalities: 

  • in-app: CRM search  (limited to the following contact properties: First Name, Last Name, Primary Email, Secondary Email, Phone Number, (internal) Contact ID, Comapny Name) and global search,
  • this endpoint (Search for contacts by email, name, phone number, or company. 

Can you explain in more detail which contact properties you would like to use when you're searching for assets in HubSpot? 

If you need advice about the API endpoint, I recommend posting a question in our API board to make sure it's seen by the right experts. Thank you!

 

Cheers
Mia, Community Team

PrasenjitDas
Participant

HI Mia,

 

We need support in API end point

Kriuthika
Member

Hi Mia,

 

can you please elaborate on this?

 

  • in-app: CRM search  (limited to the following contact properties: First Name, Last Name, Primary Email, Secondary Email, Phone Number, (internal) Contact ID, Comapny Name) and global search

I want to get Contact ID Using "Phone Number Property" in Offline Customer scenario (we will have only phone number) in that case

 

Kindly help

MiaSrebrnjak
Community Manager

Hi @Kriuthika,

 

the search methods I described above can be used directly in the HubSpot app, but only if you're connted to the internet. You can use the phone number to find contacts, either by using the search bar under Contacts > Contacts or using the global search bar in the top right corner. If your goal is to find the contact ID (either the default HubSpot property or a custom property) and you haven't added this property to your default contact property view yet (on the left side of a contact record), go to the contact profile and click on "Actions" in the top left corner > "View all properties". You can find the contact ID there.

 

Like I mentioned above: these search functions are only available when you have access to the internet, if you need to use the contact information when you're offline, I recommend to export your contact data. 

I hope this helps! If you need more advice regarding the HubSpot CRM, I recommend to post a question in our CRM board to get help from experts. This forum (HubSpot Ideas) is usually used to submit feature requests and product feedback. Thank you!

 

Cheers
Mia, Community Team