SAAS saas_sea_plat openapi batch_create - nxtele/http-api-document GitHub Wiki
批量创建客户
批量创建客户
- URL:
https://api.nxcloud.com/saas/sea/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 |
消息类型
参数名 |
类型 |
必选 |
示例值 |
说明 |
first_name |
String |
是 |
- |
First Name最大长度为128字符 |
last_name |
String |
是 |
- |
Last Name最大长度为128字符 |
sms_phone |
String |
否 |
- |
手机号码最大长度为30字符 |
whats_app_phone |
String |
否 |
- |
WhatsApp最大长度为30字符 |
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字符 |
请求示例
批量发送请求示例
body(application/json) 参数:
{
"type": 0,
"tenant_id": 144,
"customers": [
{
"first_name": "张",
"last_name": "三",
"sms_phone": "18163725558",
"whats_app_phone": "18667728886",
"country": "中国",
"email": "[email protected]",
"address": "贵州省威海市东坡区",
"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\"}"
},
{
"first_name": "李",
"last_name": "四",
"sms_phone": "18135539411",
"whats_app_phone": "18178516529",
"country": "中国",
"email": "[email protected]",
"address": "福建省泰安市武进区",
"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"
}