唯品会高级API - 唯品会高佣转链接口 唯品会转链接口 唯品会推广 唯品会返利

根据商品id、商品链接生成联盟链接,支持自定义参数,识别订单

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

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

2、获取接口秘钥apikey

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

3、授权唯品会账号

登录个人中心 - 授权管理 - 唯品会授权, 授权自己的唯品会账号。

4、PHP代码调用示例

<?php
// +----------------------------------------------------------------------
// | 订单侠开放平台 www.dingdanxia.com  [ 专为淘客开发者提供一站式API解决方案 ] 
// +----------------------------------------------------------------------
//接口秘钥
$apikey = '这里填写你的apikey';
//唯品会根据商品ID转链接口
$apiurl = "http://api.tbk.dingdanxia.com/vip/id_privilege";
 
 
//开始调用
$result = curl_post($apiurl, array(
    //接口秘钥
        "apikey"    => $apikey,
        "id"        =>商品ID
        "chanTag"   =>自定义参数,下单后订单中返回
	    
));
 
 
//打印结果
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": {
		"noEvokeUrl": "https://t.vip.com/tBYBHnbFos9?&wq=1",
		"vipQuickAppUrl": "hap://app/com.VIP.VIPQuickAPP/pages/index?target=pages/product/detail¶ms=%7B%22productId%22%3A%226918661798452982548%22%2C%22brandId%22%3A%221710613684%22%7D&tra_from=adp%3AC01V4m8sujrhjl1o%3A%3Amig_code%3A%3Aac02do6npj13imhoj6lvemf8r12p6wku",
		"vipWxUrl": "/pages/productDetail/productDetail?brandId=1710613684&goodsId=6918661798452982548&tra_from=adp%3AC01V4m8sujrhjl1o%3A%3Amig_code%3A%3Aac02do6npj13imhoj6lvemf8r12px9zh&chl_type=wxk",
		"deeplinkUrl": "vipshop://showGoodsDetail?pid=6918661798452982548&goodType=1&tra_from=tra%3AC01V4m8sujrhjl1o%3Avipj7o09%3Amig_code%3A%3Aac02do6npj13imhoj6lvemf8r12p3mhw&f=dx",
		"longUrl": "https://t.vip.com/redirect.php?url=eyJzY2hlbWVjb2RlIjoibWlnX2NvZGUiLCJzaGFyZUNvZGUiOiJkbzZucGoxM2ltaG9qNmx2IiwidmVuZG9yVWNvZGUiOiJlbWY4cjEycCIsIm1vbml0b3JTcG90Q29kZSI6IkMwMVY0bThzdWpyaGpsMW8iLCJhd2FrZSI6InRydWUiLCJ1Y29kZSI6ImN1cjEyOTVnIiwibWFyayI6IjJBcywyNXoscHpxMCIsImRlc3R1cmwiOiJodHRwczpcL1wvbS52aXAuY29tXC9wcm9kdWN0LTE3MTA2MTM2ODQtNjkxODY2MTc5ODQ1Mjk4MjU0OC5odG1sIn0=",
		"vipWxCode": "http://ms.vpimg1.com/upload/actpics/cps/0/2020/03/14/21/plvkmpmphbgldis.png",
		"source": "6918661798452982548",
		"ulUrl": "https://click.union.vip.com/deeplink/showGoodsDetail?pid=6918661798452982548&goodType=1&tra_from=tra%3AC01V4m8sujrhjl1o%3Avipj7o09%3Amig_code%3A%3Aac02do6npj13imhoj6lvemf8r12p3mhw&f=dx&cps_code=tBYBHnbFos9",
		"url": "https://t.vip.com/tBYBHnbFos9",
		"traFrom": "adp%3AC01V4m8sujrhjl1o%3A%3Amig_code%3A%3Aac02do6npj13imhoj6lvemf8r12p6wku",
		"noEvokeLongUrl": "https://t.vip.com/redirect.php?url=eyJzY2hlbWVjb2RlIjoibWlnX2NvZGUiLCJzaGFyZUNvZGUiOiJkbzZucGoxM2ltaG9qNmx2IiwidmVuZG9yVWNvZGUiOiJlbWY4cjEycCIsIm1vbml0b3JTcG90Q29kZSI6IkMwMVY0bThzdWpyaGpsMW8iLCJhd2FrZSI6InRydWUiLCJ1Y29kZSI6ImN1cjEyOTVnIiwibWFyayI6IjJBcywyNXoscHpxMCIsImRlc3R1cmwiOiJodHRwczpcL1wvbS52aXAuY29tXC9wcm9kdWN0LTE3MTA2MTM2ODQtNjkxODY2MTc5ODQ1Mjk4MjU0OC5odG1sIn0=&wq=1"
	}
}

接口文档:https://www.dingdanxia.com/doc/132/124

在线测试:https://www.dingdanxia.com/apitest/132/124

唯品会根据商品url转链接口:https://www.dingdanxia.com/doc/133/124

 

 

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

抵扣说明:

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

余额充值