...
Markdown |
---|
**接口地址** `/api/integrate/audience/tag/batchAdd`
**请求方式** `POST`
**consumes** `["application/json"]`
**produces** `["application/json"]`
**接口描述** `企业级接口,hearer必须携带X-Token`
#请求参数
***
###请求头参数
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| ------ | ------ | ------ | ------ | ------ | ------ |
| X-Token | 自建应用访问token | header | true | string | |
###公共参数
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| ------ | ------ | ------ | ------ | ------ | ------ |
| publicParams | 导入配置 | body | true | object | [客户标签导入配置](#客户标签导入配置) |
| data | 导入数据 | body | true | array | [客户标签](#客户标签) |
###客户标签导入配置
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| ------ | ------ | ------ | ------ | ------ | ------ |
| isMatching | 是否进行客户匹配(true, false) | body | true | boolean | |
| matchingType | 匹配方式(1: 精准匹配, 2: 模糊匹配) | body | false | int | |
| identifyWay | 模糊匹配 必传->身份识别方式(1: unionid>openid>手机号>客户ID, 2: 手机号>unionid>openid>客户ID) | body | false | int | |
| optType | 导入方式(add: 新增, delete: 删除) | body | true | int | |
###客户标签
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| ------ | ------ | ------ | ------ | ------ | ------ |
| identityType | 精确匹配 必填,身份识别类型(phone: 手机号码, uid: 客户ID, openid: 微信openid, unionid: 微信unionid) | body | false | string | |
| thirdId | 客户ID | body | false | string | |
| openid | 微信openid | body | false | string | |
| unionid | 微信unionid | body | false | string | |
| phone | 手机 | body | false | string | |
| tags | 客户标签,多个用,号隔开 | body | false | string | |
###请求示例
```json
{
"publicParams":{
"isMatching":true,
"matchingType":2,
"identifyWay":1,
"optType":"add"
},
"data":[{
"audienceUserId":"1",
"tags":"tag1,tag2"
}]
}
```
#响应参数
***
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| ------ | ------ | ------ | ------ | ------ | ------ |
| code | 状态码 | body | true | string | |
| errorCode | 异常码 | body | true | string | |
| msg | 描述 | body | true | string | |
| data | 响应数据 | body | true | object | [客户标签导入结果](#客户标签导入结果) |
###客户标签导入结果
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| ------ | ------ | ------ | ------ | ------ | ------ |
| status | 任务状态(-1: 失败, 0: 进行中, 1: 成功, 2: 部分导入成功) | body | true | int | |
| message | 提示信息 | body | true | string | |
| importSuccessNum | 导入成功数量 | body | true | int | |
| importFailNum | 导入失败数量 | body | true | int | |
| errorData | 导入失败数据 | body | true | array | [客户标签](#客户标签) |
###响应状态
| 状态码 | 说明 | schema |
| ------ | ------ | ------ |
| 200 | OK | |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found | |
###响应示例
```json
{
"code": "500126",
"errorCode": "IMPORT_DATA_ERROR",
"msg": "导入失败",
"data": {
"importSuccessNum": 0,
"message": "失败",
"importFailNum": 1,
"errorData": [
{
"audienceUserId": null,
"unionid": null,
"phone": null,
"identityId": null,
"openid": null,
"tags": "tag1,tag2",
"errorMsg": "测试失败"
}
],
"status": -1
}
}
```
|
...