APIs & Integrations

testuser27
Participant

Search Contact by specific property value

SOLVE

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?

0 Upvotes
1 Accepted solution
quentin_lamamy
Solution
Key Advisor

Search Contact by specific property value

SOLVE

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


View solution in original post

0 Upvotes
8 Replies 8
testuser27
Participant

Search Contact by specific property value

SOLVE

Thank you for support. My issue is resolved your suggestions helped me to resolve this.

0 Upvotes
quentin_lamamy
Key Advisor

Search Contact by specific property value

SOLVE

Can you post me all your request code ?

 


0 Upvotes
testuser27
Participant

Search Contact by specific property value

SOLVE

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.

0 Upvotes
quentin_lamamy
Key Advisor

Search Contact by specific property value

SOLVE

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 ?


0 Upvotes
testuser27
Participant

Search Contact by specific property value

SOLVE

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 

0 Upvotes
quentin_lamamy
Solution
Key Advisor

Search Contact by specific property value

SOLVE

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


0 Upvotes
quentin_lamamy
Key Advisor

Search Contact by specific property value

SOLVE

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 ?


0 Upvotes
testuser27
Participant

Search Contact by specific property value

SOLVE

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.

0 Upvotes