接口使用场景等说明:【特别公告】
抖音精选联盟官方平台于3月13日关闭,请参考 https://www.veapi.cn/gonggao/detail_84.html
做为平替,将由穿山甲接口替代,佣金直接在本站会员中心结算。
详情见穿山甲API说明 https://www.veapi.cn/apidoc/douyindouke/369
该接口用于获取活动页物料列表,需要获取抖客授权
环境 | http 地址 | https 地址 |
---|---|---|
正式环境 | http://api.veapi.cn/douke/douke_ActivityMaterialList | 暂无 |
参数名称 | 参数类型 | 必填 | 示例值 | 描述 |
---|---|---|---|---|
vekey | String | 是 | V123M56 | 公共参数,接口秘钥,请在会员中心获取 |
page | Int32 | 否 | 1 | 分页(默认1) |
page_size | Int32 | 否 | 默认20 | 每页的数量(小于等于20) |
activity_status | Int32 | 否 | 2 | 活动状态,可选值:1:待开始,2:进行中,3: 已结束。不填默认2-返回进行中活动 |
GET/POST http://api.veapi.cn/douke/douke_ActivityMaterialList?vekey=xxx&product_ids=3551685081619900931,3602945008157750326&fields=promotion_info&pid=dy_107213597798095225100_20865_2675084869
$api="http://api.veapi.cn/douke/douke_ActivityMaterialList?vekey=xxx&product_ids=3551685081619900931,3602945008157750326&fields=promotion_info&pid=dy_107213597798095225100_20865_2675084869"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api); //curl_setopt($ch, CURLOPT_POST, true); //POST方式时启用 //curl_setopt($ch, CURLOPT_POSTFIELDS, $postData ); //POST方式时传参 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //如果使用https请启用 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //如果使用https请启用 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true ); //返回数据流,不直接输出 curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); //使用gzip压缩传输让访问更快 curl_setopt($ch, CURLOPT_TIMEOUT, 6); //允许执行的最长秒数。这里设定6S curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); $result = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); echo $result; //返回值
import cn.hutool.http.HttpResponse; import cn.hutool.http.HttpRequest; public class testGetParam { public static void main(String[] args) { // API网址 String url = "http://api.veapi.cn/douke/douke_ActivityMaterialList?vekey=xxx&product_ids=3551685081619900931,3602945008157750326&fields=promotion_info&pid=dy_107213597798095225100_20865_2675084869"; // JDK 8u111版本后,若目标页面为HTTPS协议,请启用proxy用户密码鉴权 //System.setProperty("jdk.http.auth.tunneling.disabledSchemes", ""); // 发送请求 String result = HttpRequest.get(url) .timeout(10000)//设置超时,毫秒 .execute().body(); System.out.println(result); } }
import requests # 要访问的API网页 target_url = "http://api.veapi.cn/douke/douke_ActivityMaterialList?vekey=xxx&product_ids=3551685081619900931,3602945008157750326&fields=promotion_info&pid=dy_107213597798095225100_20865_2675084869" # 发送请求 response = requests.get(target_url) # 获取页面内容 if response.status_code == 200: print response.text
参数名称 | 参数类型 | 示例值 | 描述 |
---|---|---|---|
activity_main_cover | String | https://xxxxxx/xxx | 活动主图 |
activity_promotion_cover | String | https://xxxxxx/xxx | 活动推广配图 |
activity_preview_cover | String | https://xxxxxx/xxx | 活动预览图 |
activity_promotion_asset | String | https://xxxxxx/xxx | 活动推广素材 |
activity_type | String | 0 | 活动类型,0:频道活动,1:营销活动 |
activity_id | String | 1000 | 活动ID |
material_id | Int64 | 7208154716478685497 | 活动页物料ID |
activity_name | String | 超值购 | 活动名称 |
activity_validity_type | Int32 | 0 | 活动有效类型(0:短期(限时)活动,1:长期活动) |
start_time | Int64 | 1234567890 | 短期(限时)活动开始时间 |
end_time | Int64 | 1234567890 | 短期(限时)活动结束时间 |
activity_rule | String | 活动推广规则 | 推广规则 |
activity_rule_link | String | https://xxxxxx/xxx | 活动推广规则详情链接 |
activity_status | Int32 | 2 | 活动状态(1:待开始,2:进行中,3: 已结束) |
total | Int64 | 100 | 活动页物料总数 |
{ "error": "0", "msg": "查询成功!", "data": { "activity_material_list": [ { "activity_id": "7211451123994100027", "activity_main_cover": "https://sf6-ttcdn-tos.pstatp.com/obj/cmp-ecom-alliance/ab_057e9c1ef17d0a080985395eb35d135c", "activity_name": "轻食季抖客高佣千万补贴爆品", "activity_preview_cover": "https://sf3-ttcdn-tos.pstatp.com/obj/cmp-ecom-alliance/ab_d4e22d71795c700681ffa359f39d8cb1", "activity_promotion_asset": null, "activity_promotion_cover": "https://sf6-ttcdn-tos.pstatp.com/obj/cmp-ecom-alliance/ab_dfe3b0f09e229a2aac494d43a4e5f596", "activity_rule": "", "activity_rule_link": "", "activity_status": 2, "activity_type": "1", "activity_validity_type": 0, "end_time": 1680451199, "material_id": 7210987204653367589, "start_time": 1679241600 }, { "activity_id": "7213643188668465468", "activity_main_cover": "https://sf3-ttcdn-tos.pstatp.com/obj/cmp-ecom-alliance/ab_31538e817de602b4e634f0800debf848", "activity_name": "囤货节纸品一分购", "activity_preview_cover": "https://sf3-ttcdn-tos.pstatp.com/obj/cmp-ecom-alliance/ab_5a94718af26832315621fb2c5ae03c18", "activity_promotion_asset": "https://sf3-ttcdn-tos.pstatp.com/obj/cmp-ecom-alliance/ab_4a5668ad9cd06a19c87e7aef712c1f13", "activity_promotion_cover": "https://sf6-ttcdn-tos.pstatp.com/obj/cmp-ecom-alliance/ab_f37cea8e92fa2299aca1092350f080c1", "activity_rule": "参与行业:个护、亲子、家居、跨境\n推广规则:活动期间,抖客渠道通过指定链接,销售页面商品或指定行业商品卡,按新入口新引流达成给予现金奖励,最高3万元\n", "activity_rule_link": "https://bytedance.feishu.cn/docx/QthYdKBFWoXUIYxW7mscdxcnnmb", "activity_status": 2, "activity_type": "1", "activity_validity_type": 0, "end_time": 1680451199, "material_id": 7215231250053726520, "start_time": 1679587200 } ], "total": 13 }, "request_id": "UFEqcyn" }