Skip to content

SAAS saas_plat openapi batch_create

zjc1750514326 edited this page Jul 8, 2024 · 29 revisions

批量创建客户

批量创建客户

  • URL:https://api.nxcloud.com/saas/cdp/openapi/customers/batch_create
  • 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参数:

参数名 类型 必选 示例值 说明
type integer 1 0:放弃旧数据,使用新数据 1:基于旧数据更新/增加数据项目 2:保留旧数据、放弃新数据
tenant_id integer 123 租户id
app_key string 46oKF=os appkey
customers array customers信息 批量创建,单次限制100

消息类型

  • customers参数:
参数名 类型 必选 示例值 说明
full_name String - full Name最大长度为128字符
sms_phone String - 手机号码最大长度为30字符
whats_app_phone String - WhatsApp最大长度为30字符
viber_phone String - viber phone最大长度为30字符
messenger String - messenger最大长度为30字符
instagram String - instagram最大长度为30字符
line String - line最大长度为50字符
country String - 国家 最大长度为50字符
email String - 邮箱最大长度为50字符
address String - 街道最大长度为100字符
birthday String - 生日 yyyy-MM-dd
tagStr String - 标签
remark String - remark 最大长度100个字符
time_zone String - 时区
gender integer - 性别,1男, 0 女
customize_field String - 自定义字段数据
belong_seat_user String - 归属坐席最大长度为128字符

ps:sms_phone、whats_app_phone、email、viber_phone、messenger、instagram、line不能同时为空。

请求示例

批量发送请求示例

body(application/json) 参数:

{
    "type": 0,
    "tenant_id": 1,
    "customers": [
        {
            "full_name": "zhang san",
            "sms_phone": "18163725558",
            "whats_app_phone": "18667728886",
            "country": "China",
            "email": "[email protected]",
            "address": "Wujin District, Tai'an City, Fujian Province",
            "birthday": "1976-04-12",
            "source": "voluptate Excepteur",
            "remark": "nisi amet",
            "tagStr": "test,99",
            "time_zone": "GMT+8",
            "gender": 0,
            "customize_field": "{\"customize_1_14\": \"aa\"}"
        },
        {
            "full_name": "li si",
            "sms_phone": "18135539411",
            "whats_app_phone": "18178516529",
            "country": "China",
            "email": "[email protected]",
            "address": "Wujin District, Tai'an City, Fujian Province",
            "birthday": "2015-08-19",
            "source": "aliquip laboris dolore",
            "remark": "ut",
            "time_zone": "GMT+8",
            "tagStr": "88,99",
            "gender": 1
        }
    ]
}

响应参数

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

响应示例

成功示例

{
	"code": 0,
	"message": "",
	"data": "",
	"traceId": "56bf81643292cd6a89ecde64ae00db13"
}

简介

短信

语音

云呼叫中心(NXLink)

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

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent

Clone this wiki locally