会员业务消息模板推送API,提供给ISV用于发送消息模板,智慧门店(istoreCRM)获取到消息模板在线下等新零售业务场景推送消息或者展示;
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
site | String | 可选 | taobao | 消费者账号类型 | |
push_msg | IsvPushMessage | 必须 | 消息对象 | ||
|
|||||
open_id | String | 可选 | 234234234 | 消费者openId | |
union_id | String | 可选 | 234324234234 | 消费者unionId |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
total | Number | 0 | 操作总记录数(可选),可无业务语义 |
result | Boolean | true | 发送是否成功:trule/false |
result_code | String | 0 | 返回码:0:表示成功,非0:表示失败 |
result_msg | String | 成功 | 返回信息 |
1 2 3 4 5 6 7 8 9 10 11 12 13 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlibabaCemMemberMsgPushRequest req = new AlibabaCemMemberMsgPushRequest(); req.setSite( "taobao" ); AlibabaCemMemberMsgPushRequest.IsvPushMessage obj1 = new AlibabaCemMemberMsgPushRequest.IsvPushMessage(); obj1.setTemplateId( "12321" ); obj1.setExtParams( "{\"gradeName\":\"金星\",\"rewardPoints:好礼积分\":\"1.4\"}" ); obj1.setPartnerMemberId( "SBUX0112231" ); req.setPushMsg(obj1); req.setOpenId( "234234234" ); req.setUnionId( "234324234234" ); AlibabaCemMemberMsgPushResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 | < alibaba_cem_member_msg_push_response > < total >0</ total > < result >true</ result > < result_code >0</ result_code > < result_msg >成功</ result_msg > </ alibaba_cem_member_msg_push_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|---|---|
isp.top-remote-connection-timeout | isp超时 | isp优化响应速度 |
isp.top-mapping-parse-error | isp返回异常 | 按接口协议返回 |