接口说明

请求URI

/event/batchAdd

功能描述

对于企业业务系统、未接入斐波SDK的自有APP、小程序等产生的客户行为事件,如需导入兔展平台,需先在自定义事件中先进行定义

注意事项

注意: 自建应用权限 事件->事件

调用方式

HTTPS 调用


POST https://integrate.rabbitpre.com/api/open/event/batchAdd

请求数据类型

[  "application/json" ]

响应数据类型

[ "application/json" ]


请求头参数


属性

类型

必填

说明

X-Token

string

自建应用访问token


请求体参数


属性

类型

必填

说明

publicParams
object导入配置
└─isMatchingboolean是否进行客户匹配(true, false)
└─matchingTypeint32匹配方式(1: 精准匹配, 2: 模糊匹配)
└─identifyWayint32
模糊匹配 必传->身份识别方式(1: 开放平台unionid>公众号openid>手机号>客户ID, 2: 客户ID>手机号>公众号openid>开放平台unionid)
└─accurateMatchTypestring
精确匹配的应用类型(gzh: 公众号, workwechat: 企业微信, YOUZAN: 有赞, EZR: 驿客, contentminiapp: 小程序, contenthome: 小程序首页)
└─accurateMatchValuestring
精确匹配的应用ID
dataarray事件。导入数据,每次最大500条
└─identityTypestring精确匹配 必填,身份识别类型(phone: 手机号码, uid: 客户ID, openid: 公众号openid, unionid: 开放平台unionid)
└─thirdIdstring玩家用户ID
└─openidstring公众号openid
└─unionidstring开放平台unionid
└─phonestring玩家用户手机号
└─timeint64事件时间戳,毫秒,不传系统自动生成当前时间
└─uuidstring不超过36位的唯一随机字符串
└─eventKeystring事件ID,兔展平台获取
└─intidstring场景互动ID
└─eventargsmap事件参数,必有系统预设参数,可能包含自定义参数。系统预设参数


返回参数


属性

类型

说明

code
string
响应状态码。200-请求成功, 100100-appid、secret错误, 100200-token错误 ,100300-授权code错误
errorCode
string
错误码
msg
string消息提示


调用示例

示例说明: HTTPS调用

请求数据示例

{
    "publicParams":{
        "isMatching":true,
        "matchingType":1,
        "accurateMatchType":"gzh",
        "accurateMatchValue":"wxzj983hhg02ujd"
    },
    "data":[{
        "identityType":"openid",
        "openid":"wxnoafe-wjowjfoj-fsfs",
        "time":1605490615673,
        "uuid":"asd123",
        "eventKey":"c_buy",
        "intid":"jjsfia-fjfoha99-ljflw0h-90dsj",
        "eventargs":{
            "c_goods":"创维洗衣机",
            "c_price":1420.00,
            "unionid":"d3f4g2ferg3t2ff2g4g2f21f2",
            "title":"下单"
        }
    }]
}



返回数据示例

{
    "code""200",
    "errorCode""SUCCESS",
    "msg""ok"
}

错误码


错误码

错误码取值

解决方案

200
Success
401Unauthorized

403Forbidden
404Not Found