Hello All,
I am currently working with hubspot’s contacts API and I want to check how to fetch/get contact ID via API (and not doing it manually) for a particular contact using property like phone number. If the anwer is yes, please share some suggestions.
Also please see the below json data that I am currently using:
{
“filterGroups”:[
{
“filters”:[
{
“propertyName”: “phonenumber”,
“operator”: “EQ”,
“value”:“+491xxxxxxxxxx”
}
]
}
]
}
And url that I am using is: " https://api.hubapi.com/crm/v3/objects/contacts/search "
Thank you and be safe.
Best,
Priyanka Sharma
Hi @PSharma92
HubSpot’s default contact object has the property name ‘phone’ instead of ‘phonenumber’ - is this the issue with your current code?
Hope this helps?
Hi @Phil_Vallender .
Thank you for your response. I just replaced phone number with phone and it’s still showing the following error responses :
For GET request, I am getting the error meesage: " Error 405 Method Not Allowed "
For POST request, I am getting the error message: " Object not found /objectId are usually numeric. "
Thank you,
Best,
Priyanka Sharma
Hi @PSharma92
Try https://api.hubapi.com/contacts/v1/search/query instead.
Are you refferring to legacy docs by the way? There is an updated API documentation which may help you: https://developers.hubspot.com/docs/api/crm/contacts
Hello @Phil_Vallender again.
I am indeed following the updated documentation only. Can you please have a look at the below screenshot and if you can help me out with what would be the values for the parameters like “query”, “sorts” and “properties”.
Thank you,
Best,
Priyanka Sharma
Hello again @Phil_Vallender
I am following the updated API documentation only. Can you please have a look on the below screenshot and if you can help me out with what would be the values of the parameters like “query”, “sorts” and “properties”
Thank you again for your quick responses 
Best,
Priyanka Sharma