名称 | 类型 | 描述 |
---|---|---|
account_id* | integer | 推广帐号 id,有操作权限的帐号 id,包括代理商和广告主帐号 id |
user_property_set_id* | integer | 用户属性数据源 id |
wechat_app_id | string | 微信用户 OpenID 或 UnionID 对应的微信 AppID ;当 wechat_openid 或 wechat_unionid 非空时,必填 字段长度最小 1 字节, |
property* | struct[] | 用户属性列表 数组最大长度 50 |
outer_user_id* | string | 您为用户分配的唯一 id。一般而言,是您在 CRM 或其他后台系统中为该用户分配的 id。您也可以用 user_id 参数中的任一字段(例如手机号/QQ 号)来填写这个标识。 字段长度最小 1 字节,长度最大 32 字节 |
user_id* | struct | 用户 id,hash_qq、hash_phone、hash_idfa、hash_imei、hash_mac、wechat_openid 和 wechat_unionid 至少填写一个 |
hash_qq | string | md5 加密后 qq 号 字段长度最小 1 字节,长度最大 64 字节 |
hash_phone | string | md5 加密后手机号 字段长度最小 1 字节,长度最大 64 字节 |
hash_idfa | string | md5 加密后用户 IDFA 字段长度最小 1 字节,长度最大 64 字节 |
hash_imei | string | md5 加密后用户 IMEI 字段长度最小 1 字节,长度最大 64 字节 |
hash_mac | string | md5 加密后 mac 地址 字段长度最小 1 字节,长度最大 64 字节 |
wechat_openid | string | 微信用户的 OpenID,仅对特定客户开放 字段长度最小 1 字节,长度最大 64 字节 |
wechat_unionid | string | 微信用户的 UnionID,仅对特定客户开放 字段长度最小 1 字节,长度最大 64 字节 |
property_data* | string | 属性数据,最多 50 个键值对,键最大长度 20,值最大长度 40.详见 [property_param_map] 字段长度最小 1 字节,长度最大 204800 字节 |
curl --location --request POST '/v1.3/user_properties/add?access_token=<ACCESS_TOKEN>×tamp=<TIMESTAMP>&nonce=<NONCE>' \
--header 'access_token;' \
--header 'timestamp;' \
--header 'nonce;' \
--header 'fields;' \
--header 'Content-Type: application/json' \
--data-raw '{
"account_id": "<ACCOUNT_ID>",
"user_property_set_id": "<USER_PROPERTY_SET_ID>",
"wechat_app_id": "<WECHAT_APP_ID>",
"property": [
{
"outer_user_id": "testUser",
"user_id": {
"hash_qq": "e10adc3949ba59abbe56e057f20f883e",
"wechat_openid": "ozYoQszwWGZywZLNEogId_d9O-2Y"
},
"property_data": {
"property1": "value1",
"property2": "value2"
}
}
]
}'
{
"code": 0,
"message": "",
"message_cn": ""
}