说明:
该接口是开发者帮助线下商家上线/下线广告内容,上线后用户可以在钱包APP上看到广告,下线后用户不能看到广告且该广告内容失效。
创建广告接口参考该贴:[url]https://openclub.alipay.com/read.php?tid=1082&fid=71[/url]
代码调用示例:
//alipay.marketing.cdp.advertise.operate(操作广告接口) public static void operateAd(){ DefaultAlipayClient aliClient = alipayclient(); AlipayMarketingCdpAdvertiseOperateRequest request = new AlipayMarketingCdpAdvertiseOperateRequest(); request.setBizContent( "{\"ad_id\":\"422039\"," + "\"operate_type\":\"online\"}" ); try { AlipayMarketingCdpAdvertiseOperateResponse response = aliClient.execute(request); System.out.print(response.getBody()); } catch (AlipayApiException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
接口同步返回:
{"alipay_marketing_cdp_advertise_operate_response":{"code":"10000","msg":"Success"},"sign":"PK9mGX8uy3xfwRKygPxPCuf62YQU5JrdY4yDSn5dRhRcjtcTlzm8Gzv1yhnNXOhyITDzY6O8+rwPpSUqrQXT3VvS6dkMvEnoXsT5uKefRKX9PuvwbttN5Vc7Me57aPX9dReiBji4HgBVMI22gcugZ8mBTuNIecYNAAxiVcZjUFQ="}
查看效果图:
注意点:
1.ad_id,广告ID,唯一标识一条广告,【创建广告接口】:[url]https://openclub.alipay.com/read.php?tid=1082[/url]
2.operate_type,操作类型,目前包括上线和下线,分别传入:online(ONLINE)和offline(OFFLINE)
报错提供信息:
appid+接口名+调用接口时间,最好将本次请求的完整参数一并发过来
如果大家在测试过程中遇到问题欢迎在帖子下方追问,请按照标准方式提问