Hello,
I have one dropdown for locations in contact and i want to search contact by specific location using api but i didn’t get any related post where i can filter contact by having fix property value using API.
Can you please help me to as fast as possible to filter contact by specific property value using api?
Hi @testuser27
do yo u want to request directly an api endpoint or do you want to use a sdk ? Does this code is standalone or is part of an exiting code you have with already hubspot integration ?
It is part of hubspot integration. Anyhow i have managed to search contacts with specific property value but api is not returning all properties so if you have idea how to get all properties then pls help for that.
Do you want to use sdk or api endpoint ?
Your issue is not on searching on specific properties it’s that you don’t get all the field you want as return of the request ?
Firstly issue was about search but after that i got solutions for search but using below endpoint i’m not getting all properties list.
https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=apikey
You can use this enpoint to list all your contact :
https://api.hubapi.com/crm/v3/objects/contacts?hapikey={apiKey}&properties=lastname
Just have to add a “&properties={propertyName}” for each additional field you want and loop over pagination
You didn’t get my point let me explain scenario. Firstly i will get contacts for search api by post below data
{
"filterGroups": [
{
"filters": [
{
"propertyName": "referring_office_test",
"operator": "EQ",
"value": "61352"
}
]
}
]
}
Above api will give contact who have this property value and this return only below properties
"results": [
{
"id": "189601",
"properties": {
"createdate": "2020-07-24T00:59:14.277Z",
"email": "dekiefte@iinet.net.au",
"firstname": "CATHERINE",
"hs_object_id": "189601",
"lastmodifieddate": "2020-09-22T23:20:13.267Z",
"lastname": "DE KIEFTE"
},
"createdAt": "2020-07-24T00:59:14.277Z",
"updatedAt": "2020-09-22T23:20:13.267Z",
"archived": false
}
]
So my query is i want to get all properties list using this api.
Can you post me all your request code ?
Thank you for support. My issue is resolved your suggestions helped me to resolve this.