简要描述:

  • 联系人列表
    备注:列表接口默认查询每页15条,单次查询最大100条,更多通用参数请参考介绍

请求URL:

  • /api/v2/contacts

请求方式:

  • GET

请求参数:

字段名 是否必填 类型 说明
page false Boolean 页码
per_page false Int 每页的数量
query false String 搜索关键字
entity false String 实体(customer, opportunity)
entity_id false Long 实体id
tab_type false String 值为[my, sub, my_assist, sub_assist]或不传
has_phone false String 是否去除无电话的 去除传 true
all_phone_number false String true: 返回联系人的所有电话号码

返回示例:

正确时返回:


{
  "code": 0,
  "data": {
    "contacts": [
      {
        "id": 7982265,
        "name": "分为法人",
        "name_pinyin": "fenweifaren",
        "job": "",
        "customer_id": 1605115,
        "customer_name": "贸易公司49",
        "have_image": false,
        "address": {
          "id": 13161318,
          "addressable_id": 7982265,
          "addressable_type": "Contact",
          "country_id": 4,
          "province_id": null,
          "city_id": null,
          "district_id": null,
          "tel": "",
          "phone": "",
          "email": "",
          "qq": "",
          "fax": null,
          "wechat": "",
          "wangwang": "",
          "zip": "",
          "url": "",
          "detail_address": "",
          "created_at": "2019-02-15T11:26:35.000+08:00",
          "updated_at": "2019-02-15T11:26:35.000+08:00",
          "lat": null,
          "lng": null,
          "off_distance": null,
          "region_info": "中国",
          "snippet": null,
          "organization_id": 49,
          "mode": "compat",
          "time_format": "ruby",
          "use_to_json": true,
          "tel_hidden_result": "",
          "phone_hidden_result": ""
        },
        "need_hidden_dispose": false,
        "updated_at": "2019-02-15 11:26",
        "is_user_self": false,
        "ding_ext_contact_id": null,
        "wx_external_userid": null,
        "wx_contact_type": null
      },
      {
        "id": 5524470,
        "name": "09009909099",
        "name_pinyin": "09009909099",
        "job": "jklvv",
        "customer_id": 18951347,
        "customer_name": "哈哈哈哈哈哈,We’re",
        "have_image": false,
        "address": {
          "id": 10703548,
          "addressable_id": 5524470,
          "addressable_type": "Contact",
          "country_id": 4,
          "province_id": null,
          "city_id": null,
          "district_id": null,
          "tel": "",
          "phone": "12456798362",
          "email": "",
          "qq": "",
          "fax": null,
          "wechat": "",
          "wangwang": "",
          "zip": "",
          "url": "",
          "detail_address": "",
          "created_at": "2018-09-18T15:00:54.000+08:00",
          "updated_at": "2018-12-05T13:52:28.000+08:00",
          "lat": null,
          "lng": null,
          "off_distance": null,
          "region_info": "中国",
          "snippet": null,
          "organization_id": 49,
          "mode": "compat",
          "time_format": "ruby",
          "use_to_json": true,
          "tel_hidden_result": "",
          "phone_hidden_result": "12456798362"
        },
        "need_hidden_dispose": false,
        "updated_at": "2019-01-31 10:54",
        "is_user_self": false,
        "ding_ext_contact_id": null,
        "wx_external_userid": null,
        "wx_contact_type": null
      }
    ],
    "total_count": 276,
    "per_page": 15,
    "page": 1
  }
}

错误时返回:


{
  "code": 100401,
  "data": null,
  "message": "你的帐号已在其他地方登录,本地已经下线"
}

返回参数说明:

参数名 类型 说明
is_user_self boolean 是否自己的数据
need_hidden_dispose boolean 是否需要掩藏客户资料号码(用于呼叫中心)

备注:

文档更新时间: 2025-04-29 14:18   作者:陈胜海