淘宝联盟高级API - 淘宝客万能高佣转链接口 多功能转链接口

可将以下类型链接内容,自动进行转链、查券、申请高佣:商品ID、商品淘口令、优惠券淘口令、聚拼团商品淘口令、淘礼金领券淘口令、二合一优惠券链接、淘宝客长/短连接(包含 sclick、uland、m.tb.cn链接),更多支持类型还再研发中...

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/wn_convert";


//开始调用
$result = curl_post($apiurl, array(
    //接口秘钥
        "apikey"    => $apikey,
	//要转链的文案,可填写:商品淘口令、优惠券淘口令、聚拼团商品淘口令、淘礼金领券淘口令、二合一优惠券链接、淘宝客长/短连接(包含 sclick、uland、m.tb.cn链接),更多支持类型还再研发中...
	"content"        => "123456789",
	//渠道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": {
		"category_id": 50002766,
		"coupon_click_url": "https:\/\/uland.taobao.com\/coupon\/edetail?e=ERrdCjEC%2BZAGQASttHIRqYl7%2F8DSkiA1evgn4PHiXSqRFz8q1QnJ3h%2B1G42%2FkpiVjNL2c7ZP8LBmNwWApekjrb9fwBwwUiql9%2BAYBumJvWjt0stvlaC75nYefz8NXcoYTJnbK5InWzloKXCUZd8BcHFf5RMoZqfAYwOD23XOnRHymNXcL2pzBMxE1I69YrVlcv3%2BIxFWPRo%3D&traceId=0b0b45cd15555567673714179e&union_lens=lensId:0bb698e5_0bca_16a2e689719_3025&xId=sMmthYV8WSLEznR8sF6uU9Aji2Q5Y1retWvU2e9S3IR8rxvDYYQYQOyuGP8Q78TaDjdAaaRpRwQ0jl5ns25HyO",
		"coupon_end_time": "2019-04-19",
		"coupon_info": "满168元减20元",
		"coupon_remain_count": 891426,
		"coupon_start_time": "2019-04-16",
		"coupon_total_count": 1000000,
		"coupon_type": 1,
		"item_id": 540702875061,
		"item_url": "https:\/\/s.click.taobao.com\/t?e=m%3D2%26s%3Duas5Cwf5iJFw4vFB6t2Z2ueEDrYVVa64K7Vc7tFgwiHLWlSKdGSYDiRvIO7AjsmKlovu%2FCElQOv%2BqN5xItGbDIU8BKtK9THKAyttkDnyUMf1M2eenISXJGu6Riu1FeF%2BaKxloahyuS%2FNEPXytV9ALq8XLr9cF0l0AOJ7n9hIYuSUmgZvWjGCm1FzQeSXzIFOsQdmUFNDbWyF53HItdrIJKJn5AyUbPoV&union_lens=lensId:0bb698e5_0bca_16a2e689719_3025&xId=sMmthYV8WSLEznR8sF6uU9Aji2Q5Y1retWvU2e9S3IR8rxvDYYQYQOyuGP8Q78TaDjdAaaRpRwQ0jl5ns25HyO",
		"max_commission_rate": "0.45",
		"coupon": "20",
		"itemInfo": {
			"title": "【三只松鼠_坚果大礼包2188g\/12袋】每日坚果干果整箱礼盒送礼",
			"pict_url": "主图",
			"reserve_price": "360",
			"zk_final_price": "188",
			"qh_final_price": 168,
			"qh_final_commission": 0.756
		},
		"coupon_tpwd": "¥wmpGYZ4kvZP¥",
		"item_tpwd": "¥m4ZnYZ4kxdp¥"
	}
}

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

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

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

抵扣说明:

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

余额充值