- 开发指南
- 鉴权模块(新)
- 线索
- 标签
- 分组
- 公司
- 表结构
- 客群
- 行为(新)
- 应用中心
- 系统管理
- 资料下载
- 会议管理
- 内容中心
- 会员管理
- 企业微信
- 其他
- 自动化工作流
添加用户行为
POST
/leads/open-api/save-user-behavior
最后修改时间:2025-04-10 08:53:14
接口描述#
请求参数说明#
参数名称 | 参数类型 | 必须 | 说明 |
---|---|---|---|
associated_properties | string | 是 | 关联人属性类型,支持 mobile,anonymous_id,customer_id,another |
associated_properties_value | string | 是 | 关联人属性值 |
behavior_name | string | 是 | 事件字段名称(大小写字母及数字组合) |
occurrence_time | string | 是 | 行为发生时间,时间格式:2021-01-01 20:01:01 |
envent_other | array | 否 | 事件属性集 |
schema_name | string | 否 | 外部数据源行为时必填 |
返回参数说明#
参数名称 | 说明 |
---|---|
code | 返回码 |
msg | 错误信息 |
请求参数
Query 参数
Body 参数application/json
associated_properties
string
关联人属性
mobile:首要身份识别字段
anonymous_id:匿名ID
customer_id:市场线索customer_id
another: 自定义首要身份识别字段(当首要身份识别字段为自定义时传入)
associated_properties_value
string
关联人属性值
schema_name
string
外部数据源名称
behavior_name
string
事件名称
occurrence_time
string
行为发生时间
envent_other
array [object {2}]
其他事件属性
envent_attr_name
string
事件属性上报名称
envent_attr_value
string
事件属性值
utm_campaign
string
推广活动
view_duration
integer
浏览时长
utm_medium
string
推广媒介
utm_term
string
推广关键字
utm_content
string
推广内容
utm_source
string
推广来源
示例
{
"associated_properties": "customer_id",
"associated_properties_value": "5c383312-7624-89f0-3d4d-c3c6ccac86d3",
"behavior_name": "ces_api",
"occurrence_time": "2023-11-23 20:55:38",
"envent_other": [
{
"envent_attr_name": "ce-api1",
"envent_attr_value": "1000"
},
{
"envent_attr_name": "ce-api2",
"envent_attr_value": "1"
}
],
"view_duration": 67,
"utm_campaign": "utm_campaign",
"utm_medium": "utm_medium",
"utm_term": "utm_term",
"utm_content": "utm_content",
"utm_source": "utm_source"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://openapi.beschannels.com/leads/open-api/save-user-behavior?access_token=uURA1lnYsBr22I6UYoLZH0s9y3HU2Xsn7UHA4dIDgHN_67Z5EZskh4YMcymD5enS4GGjWpOERwQtug3Y4AGwvbvLB_A3TwKBpb_J4z0MUm6oaNQmqA-3Ef9Q-PHbVPk3' \
--header 'Content-Type: application/json' \
--data-raw '{
"associated_properties": "customer_id",
"associated_properties_value": "5c383312-7624-89f0-3d4d-c3c6ccac86d3",
"behavior_name": "ces_api",
"occurrence_time": "2023-11-23 20:55:38",
"envent_other": [
{
"envent_attr_name": "ce-api1",
"envent_attr_value": "1000"
},
{
"envent_attr_name": "ce-api2",
"envent_attr_value": "1"
}
],
"view_duration": 67,
"utm_campaign": "utm_campaign",
"utm_medium": "utm_medium",
"utm_term": "utm_term",
"utm_content": "utm_content",
"utm_source": "utm_source"
}'
返回响应
🟢200成功
application/json
Body
code
integer
状态码
msg
string
错误信息
data
null
必需
示例
{
"code": 0,
"msg": "成功",
"data": null
}
修改于 2025-04-10 08:53:14