Reputation: 138
I want to get/pull all the contacts with hs_leads_status = Open and i am using https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=100&property=phone&property=hs_lead_status&hs_lead_status=Open
but it returns hs_leads_status = Closed as well.
How to pass the parameters correctly and achieve it?
Upvotes: 0
Views: 1237
Reputation: 138
Finally get succeeded with:
POST - https://api.hubapi.com/crm/v3/objects/contacts/search?
Body - {
"properties": [
"firstname",
"lastname",
"phone",
"hs_lead_status"
],
"limit": 100,
"filterGroups": [
{
"filters": [
{
"propertyName": "hs_lead_status",
"operator": "EQ",
"value": "Open"
}
]
}
]
}
but the limitation is that it returns only 100 records with pagination.
Upvotes: 2
Reputation: 21
This is not possible using the v1 API. You can however use the v3 API's search for this. https://developers.hubspot.com/docs/api/crm/search
Using an filter group with EQ param should satisfy your usecase.
Upvotes: 2