京东联盟高级API - 京东联盟转链接口 京东客转链接口 京粉转链接口 京东联盟返利接口 京东返利接口

接口支持商品链接,活动链接,店铺链接转链,获取普通推广链接和优惠券二合一推广链接,转链后下单佣金归自己所有,结算后可以在京东联盟提现。

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

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

2、获取接口秘钥apikey

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

3、事先准备好京东联盟转链接口所需要的unionId参数,获取方式:打开并登录京东联盟(https://union.jd.com/index)=》账户管理

4、PHP代码调用示例

<?php
// +----------------------------------------------------------------------
// | 订单侠开放平台 www.dingdanxia.com  [ 专为淘客开发者提供一站式API解决方案 ] 
// +----------------------------------------------------------------------
//接口秘钥
$apikey = '这里填写你的接口秘钥';
//京东联盟转链接口
$apiurl = "http://api.tbk.dingdanxia.com/jd/by_unionid_promotion";
 
 
//开始调用
$result = curl_post($apiurl, array(
    //接口秘钥
        "apikey"     => $apikey,
	    "materialId"       =>'https://item.jd.com/100007926326.html',
        //商品链接、活动链接、店铺链接
        "unionId"     =>京东联盟获取的unionId,
        "autoSearch"  =>true
        //是否启用优惠券自动搜索功能,如启用且优惠券链接未传入时,系统会自动查询优惠券,并转成二合一链接,启用之后并不是所有商品都有券
));
 
 
//打印结果
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":{
        "shortURL":"https://u.jd.com/FT5lvH",
        "is_coupon":1,
        "couponInfo":[
            {
                "beginTime":1593446400000,
                "discount":40,
                "endTime":1596470399000,
                "link":"https://coupon.m.jd.com/coupons/show.action?linkKey=AAROH_xIpeffAs_-naABEFoeIb7wwUdNbWC9hHy8Ffz6795qYxm_YG9FM0whY_XNLlv0fTBYedW3BF4VuTcpeMkEFFAKHQ",
                "num":100000,
                "platform":"全平台",
                "quota":129,
                "remainNum":99757,
                "takeBeginTime":1593446400000,
                "takeEndTime":1596211199000,
                "yn":"是"
            }
        ],
        "commissionInfo":{
            "commission":25.69,
            "commissionShare":15.2,
            "couponCommission":19.61,
            "plusCommissionShare":15.2
        },
        "priceInfo":{
            "historyPriceDay":35,
            "lowestCouponPrice":129,
            "lowestPrice":169,
            "lowestPriceType":1,
            "price":169
        },
        "shopInfo":{
            "shopId":1000004205,
            "shopLevel":4.9,
            "shopName":"华光电器京东自营旗舰店"
        },
        "skuName":"华光(HG)手持蒸汽挂烫机家用小家电 电熨斗 便捷熨衣服机 迷你旅行出差熨烫机 QH09奶咖色",
        "skuId":100007926326,
        "imageInfo":{
            "imageList":[
                {
                    "url":"http://img14.360buyimg.com/ads/jfs/t1/140176/34/3494/84521/5f17e81aE830f8e60/112d592dd418d3d5.jpg"
                },
                {
                    "url":"http://img14.360buyimg.com/ads/jfs/t1/130680/32/5080/80732/5f17e81bE92b878ad/555ff8f50c5d7385.jpg"
                },
                {
                    "url":"http://img14.360buyimg.com/ads/jfs/t1/144204/24/3531/123045/5f17e81bEc2aa25ae/5ab5b6163f42ddba.jpg"
                },
                {
                    "url":"http://img14.360buyimg.com/ads/jfs/t1/146499/22/3472/97410/5f17e81aE67a15732/e775ca03ddbdcb12.jpg"
                },
                {
                    "url":"http://img14.360buyimg.com/ads/jfs/t1/131557/21/4981/95483/5f17e81bEbd1a2287/62dfbbe3210533bf.jpg"
                },
                {
                    "url":"http://img14.360buyimg.com/ads/jfs/t1/120975/32/7824/87292/5f17e81bE096e8573/93a3bd277afd61e4.jpg"
                },
                {
                    "url":"http://img14.360buyimg.com/ads/jfs/t1/122419/5/7834/63107/5f17e81bE93e93e0c/d9f5877dfea8ae47.jpg"
                },
                {
                    "url":"http://img14.360buyimg.com/ads/jfs/t1/113309/38/12882/64275/5f17e81bEf332ed6e/1bb30e62fb06d443.jpg"
                },
                {
                    "url":"http://img14.360buyimg.com/ads/jfs/t1/131673/10/5058/105116/5f17e81bE9bf26443/039d797ae752d79d.jpg"
                },
                {
                    "url":"http://img14.360buyimg.com/ads/jfs/t1/122766/1/7680/75845/5f17e830Ecfde3b0a/4c5a829c25b9f6f0.jpg"
                }
            ]
        }
    }
}

 

接口文档:https://www.dingdanxia.com/doc/97/94

在线测试:https://www.dingdanxia.com/apitest/97/94

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

抵扣说明:

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

余额充值