简体   繁体   English

如何使用联系人列表 API 从 hubspot 获取 hs_leads_status = Open 的联系人?

[英]How to get contacts with hs_leads_status = Open from hubspot using Contact List API?

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.我想使用 hs_leads_status = Open 获取/拉取所有联系人,并且我正在使用https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=100&property=phone&property=hs_lead_status&hs_lead_status=Open但它也返回 hs_leads_status = Closed。 How to pass the parameters correctly and achieve it?如何正确传递参数并实现?

This is not possible using the v1 API.使用 v1 API 无法做到这一点。 You can however use the v3 API's search for this.但是,您可以使用 v3 API 的搜索。 https://developers.hubspot.com/docs/api/crm/search https://developers.hubspot.com/docs/api/crm/search

Using an filter group with EQ param should satisfy your usecase.使用带有 EQ 参数的过滤器组应该满足您的用例。

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.但限制是它只返回 100 条分页记录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM