淘宝联盟高级API - 淘宝联盟活动转链,饿了么转链, 口碑活动转链

支持通过推广位和活动物料id获取活动详情,包含推广url(长链、短链),淘口令、微信推广二维码地址等。淘宝联盟官方活动推广API-工具,支持二方、三方

官方活动地址:https://pub.alimama.com/fourth/promo/activity.htm

饿了么活动ID:1571715733668

饿了么餐饮页面物料ID:1579491209717

饿了么新零售页面物料ID:1585018034441

口碑主会场活动ID:1583739244161

生活服务分会场活动ID:1583739244162

1、注册订单侠开放平台账号

注册地址: https://www.dingdanxia.com/user/register/index.html  

2、获取接口秘钥apikey

登录个人中心 - 系统设置 - 接口管理 找到接秘钥apikey,apikey 接口秘钥是调用接口的唯一凭证,请妥善保管! 

3、授权淘宝联盟账号、填写推广位PID

登录个人中心 - 授权管理 - 淘宝授权, 授权自己的淘宝联盟账号,填写推广位pid (什么是推广位pid?

4、PHP代码调用示例

<?php
// +----------------------------------------------------------------------
// | 订单侠开放平台 www.dingdanxia.com  [ 专为淘客开发者提供一站式API解决方案 ] 
// +----------------------------------------------------------------------
//接口秘钥
$apikey = '这里填写你的apikey';
//接口地址
$apiurl = "http://api.tbk.dingdanxia.com/tbk/activityinfo";


//开始调用
$result = curl_post($apiurl, array(
    //接口秘钥
        "apikey"    => $apikey,
	//物料id
	"activity_material_id"        => "1571715733668",
	//渠道id
	"relation_id"    =>    ""
));


//打印结果
print_r($result);

/**
 * post请求
 * @param string $url
 * @param array $params
 * @param int $timeout
 */
function curl_post($url, $params, $timeout = 3) {
    try {
        foreach ($params as $key => $val) {
            $post[] = "{$key}={$val}";
        }
        $post_data  = implode('&', $post);
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
        return curl_exec($ch);
    }
    catch (Exception $e) {
        return false;
    }
}

5、接口返回结果

{
	"code": 200,
	"msg": "请求成功【success】",
	"data": {
		"click_url": "https://s.click.taobao.com/t?e=m%3D2%26s%3DxYovRIbn2fVw4vFB6t2Z2iperVdZeJviU%2F9%2F0taeK29yINtkUhsv0B7b%2FtJDuRUI3DFB1GerKruXX8jSMzRlNjF3Y%2BbYt%2FaMJpZDSlCQtzzY06PVtVSdYQBiMdKHtl9oWXye2UMQtf1dITvXwTxvKBnN%2B%2Bbw2FWOpS5nEhyn2l%2Bo1PiBSY9okemovcNixBDH5MRYl0%2FyOZHb9no%2FURc5w7o18kPD%2BYRAFveQ9Ld2jorKLJiYzWv6xmKche5LvsSo37%2FLmqNFMyUlnDDpzrVwmL8PCu79SqkZbA724fELe4fANsSD1f6QQrvl7I%2FJEPSoHIi1sJNUGbI%3D&union_lens=lensId%3AMAPI%401589938255%400b84769a_0efa_1722fb47671_974a%4001",
		"page_end_time": "2020-05-20",
		"page_name": "2020年天猫520告白季—天猫主会场",
		"page_start_time": "2020-05-15",
		"terminal_type": "2"
	}
}

接口文档:https://www.dingdanxia.com/doc/122/8

在线测试:https://www.dingdanxia.com/apitest/122/8

实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值