I want to get all the contacts with hs_lead_status = Open & I am testing
https://api.hubapi.com/contacts/v1/lists/all/contacts/all?property=phone&property=hs_lead_status
It returns not all the contacts but a few ones like I am getting only 19 contacts with hs_leads_status = Closed as well.
How to pass the correct parameters?
Teun
2
Hi @AbdulQayyum ,
You should probably use the Search API instead. Where your code should look something like this:
curl https://api.hubapi.com/crm/v3/objects/contacts/search \
--request POST \
--header "Content-Type: application/json" \
--data '{
"filterGroups":[
{
"filters":[
{
"propertyName": "hs_lead_status",
"operator": "EQ",
"value": "Open"
}
]
}
]
}'
Yes. Thanks.
It helps me to resolve the issue.
POST Request : https://api.hubapi.com/crm/v3/objects/contacts/search?
Body:
{
"properties": \[ "phone", "hs\_lead\_status" ],
"filterGroups":\[
{
"filters":\[
{
"propertyName": "hs\_lead\_status",
"operator": "EQ",
"value": "Open"
}
]
}
]
}
there is one thing so weird and that is:
I am using this https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=25000&property=phone&property=hs_lead_status but it only returns few records, i have 3200+ records in hubpost account which are specifically having leads status as Open but here it is returning only 432 records.