Skip to content

SAAS saas_plat openapi customer_query

zjc1750514326 edited this page Oct 29, 2024 · 6 revisions

查询客户

查询客户

  • URL:https://api.nxcloud.com/saas/cdp/openapi/customers/query
  • Method:POST
  • Content-Type:application/json
  • 需要鉴权:

请求参数

header参数:

参数名 类型 必选 示例值 说明
accessKey String fme2na3kdi3ki 用户身份标识
ts String 1655710885431 当前请求的时间戳(单位是毫秒),牛信服务端允许用户端请求最大时间误差为60秒
bizType String 2 WhatsApp业务类型,取固定值“2”
action String mt WhatsApp业务操作,取固定值“mt”
sign String 6e9506557d1f289501d333ee2c365826 API入参参数签名 查看公共约定

body参数:

参数名 类型 必选 示例值 说明
tenant_id integer 123 租户id
app_key string 46oKF=os appkey
start_time string 2024-05-07 00:00:00 开始时间
end_time string 2024-05-08 00:00:00 结束时间
tags array[data JsonObject] 标签id
his_tags array[data JsonObject] 历史标签id
source_type Integer 1 来源 0: 未知, 1: 新增, 2: excel导入, 3: 客户主动发起, 4: 短信群发, 5: 语音群发, 6: 第三方API, 7: callbot, 8: 客户发起-呼叫中心, 9: 邮箱渠道, 10: 表单新增, 11: 客户主动发起, 12: 客户发起-Viber, 13: 客户发起-Messenger, 14: 客户发起-Instagram, 15: 客户发起-Line
name string test first_name
tags_logic_type string and tags列表逻辑类型。"and",且; "or",或; 不选择时传空串""
source_channel_key string xx 来源通道
sms_phone string 8618593272678 手机号
whatsApp_phone string 8618593272678 WhatsApp手机号码
email string [email protected] email
viber_phone string 8618593272678 viber
after Long 693324 向后分页游标值
before Long 693324 向前分页游标值
limit Long 25 每页大小,范围1-50
  • data 参数:
参数名 类型 必选 示例值 说明
id Long - 标签id
tag_name String - 标签名称

消息类型

  • paging参数:
参数名 类型 必选 示例值 说明
after Long - 这是指向已返回的数据页面末尾的游标。
before Long - 这是指向已返回的数据页面开头的游标。
previous Long - 上一页数据的开始游标。如果为null,则显示的是第一页数据
next Long - 下一页数据的开始游标。如果为null,则显示的是最后一页数据
  • customers参数:
参数名 类型 必选 示例值 说明
id Long 1021110718827683840 客户id,游标值
first_name String simon
last_name String kang
full_name String simon kang 姓名
sms_phone String 8618593271111 短信手机号
whatsApp_phone String 8618593271111 whatsApp_phone手机号
viber_phone String 8618593271111 viber_phone手机号
line String xxx line号
messenger String xxx messenger号
instagram String xxx instagram号
email String xxx 邮箱
country String CN 国家
birthday String 2024-08-01 生日
remark String xxx 备注
source_type Integer 1 来源 0: 未知, 1: 新增, 2: excel导入, 3: 客户主动发起, 4: 短信群发, 5: 语音群发, 6: 第三方API, 7: callbot, 8: 客户发起-呼叫中心, 9: 邮箱渠道, 10: 表单新增, 11: 客户主动发起, 12: 客户发起-Viber, 13: 客户发起-Messenger, 14: 客户发起-Instagram, 15: 客户发起-Line
source_channel_key string xx 来源通道
gender Integer 0 0 女 1 男
created_at String 2024-07-19T17:29:27 创建时间
updated_at String 2024-07-19T17:29:27 更新时间
status Integer 1 状态(0禁用、1启用)
whatApp_subscribe String 1 是否订阅whatsApp
sms_subscribe String 1 是否订阅sms
customize_field String 1 自定义字段
tenant_id Long 1 所属租户
weight Long 1 客户等级

请求示例

批量发送请求示例

body(application/json) 参数:

{
    "tenant_id": 123,
    "limit": 5,
    "after": 1022100838976413697,
    "whatsApp_phone": "861360301975912",
    "app_key": "8eos"
}

响应参数

参数名 类型 说明
code Integer 结果编码
data JsonObject 请求结果
message String 请求结果说明
traceId String 链路追踪ID

响应示例

成功示例

{
    "code": 0,
    "message": null,
    "traceId": "44988d9de672422b920182d6960de0a0",
    "data": {
        "paging": {
            "after": 1021110718827683840,
            "before": 1021110718827683840,
            "previous": null,
            "next": null
        },
        "customer_list": [
            {
                "id": 1021110718827683840,
                "first_name": "Simon",
                "last_name": null,
                "full_name": "Simon",
                "sms_phone": null,
                "whatsApp_phone": "861360301975912",
                "viber_phone": null,
                "line": null,
                "messenger": null,
                "instagram": null,
                "email": null,
                "country": "CN",
                "birthday": null,
                "remark": null,
                "source_type": 3,
                "source_channel_key": "18506008399",
                "gender": null,
                "created_at": "2024-07-19T17:29:27",
                "status": 1,
                "updated_at": "2024-07-30T17:56:39",
                "tags": [
                    {
                        "id": 27237,
                        "user_id": 195,
                        "tenant_id": 123,
                        "group_id": 0,
                        "group_name": null,
                        "tag_name": "test",
                        "note": "",
                        "created_at": "2023-02-15T16:45:30",
                        "updated_at": "2023-02-15T16:45:30",
                        "customer_id": 1021110718827683840
                    }
                ],
                "whatApp_subscribe": "1",
                "sms_subscribe": "1",
                "customize_field": "{\"customize_4_52\": [\"1\"]}",
                "tenant_id": 123,
                "weight": 5
            }
        ]
    }
}

简介

短信

语音

云呼叫中心(NXLink)

云呼叫中心(AI自动外呼)

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent(对外api)

Clone this wiki locally