唯品会高级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';
//唯品会商品详情接口
$apiurl = "http://api.tbk.dingdanxia.com/vip/item_info";
 
 
//开始调用
$result = curl_post($apiurl, array(
    //接口秘钥
        "apikey"    => $apikey,
        "id"        =>"6918661798452982548"
        
	    
));
 
 
//打印结果
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":{
        "marketPrice":"599.00",
        "commissionRate":"8",
        "goodsId":"6918661798452982548",
        "discount":"0.33",
        "goodsCarouselPictures":[
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/960169153-1971527585845714944-1971527585845714946-1_750x750_75.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/1606932054-1971527585845714944-1971527585845714946-2_750x750_75.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/594601152-1971527585845714944-1971527585845714946-3_750x750_75.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/1139405595-1971527585845714944-1971527585845714946-4_750x750_75.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/48298936-1971527585845714944-1971527585845714946-15_750x750_75.jpg",
            "https://a.vpimg3.com/upload/merchandise/pdcvop/00100319/10000547/349942073-1971527585845714944-1971527585845714946-16_750x750_75.jpg"
        ],
        "goodsDetailPictures":[
            "https://a.vpimg3.com/upload/merchandise/pdcvop/00100319/10000547/1671954618-1971527585845714944-1971527585845714946-601.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/2128225592-1971527585845714944-1971527585845714946-602.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/1285640825-1971527585845714944-1971527585845714946-603.jpg",
            "https://a.vpimg2.com/upload/merchandise/pdcvop/00100319/10000547/1166753415-1971527585845714944-1971527585845714946-604.jpg",
            "https://a.vpimg3.com/upload/merchandise/pdcvop/00100319/10000547/693512268-1971527585845714944-1971527585845714946-605.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/2091305022-1971527585845714944-1971527585845714946-606.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/1878538880-1971527585845714944-1971527585845714946-607.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/1684625435-1971527585845714944-1971527585845714946-608.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/1567661769-1971527585845714944-1971527585845714946-609.jpg",
            "https://a.vpimg2.com/upload/merchandise/pdcvop/00100319/10000547/1531121197-1971527585845714944-1971527585845714946-610.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/1715031171-1971527585845714944-1971527585845714946-611.jpg",
            "https://a.vpimg2.com/upload/merchandise/pdcvop/00100319/10000547/523463827-1971527585845714944-1971527585845714946-612.jpg",
            "https://a.vpimg3.com/upload/merchandise/pdcvop/00100319/10000547/992472737-1971527585845714944-1971527585845714946-613.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/1182538693-1971527585845714944-1971527585845714946-614.jpg",
            "https://a.vpimg3.com/upload/merchandise/pdcvop/00100319/10000547/1770034939-1971527585845714944-1971527585845714946-615.jpg",
            "https://a.vpimg2.com/upload/merchandise/pdcvop/00100319/10000547/2051286385-1971527585845714944-1971527585845714946-616.jpg",
            "https://a.vpimg4.com/upload/merchandise/pdcvop/00100319/10000547/2146724188-1971527585845714944-1971527585845714946-617.jpg",
            "https://a.vpimg3.com/upload/merchandise/pdcvop/00100319/10000547/1687698675-1971527585845714944-1971527585845714946-618.jpg",
            "https://a.vpimg2.com/upload/merchandise/pdcvop/00100319/10000547/204491665-1971527585845714944-1971527585845714946-619.jpg",
            "https://a.vpimg2.com/upload/merchandise/pdcvop/00100319/10000547/398789859-1971527585845714944-1971527585845714946-620.jpg",
            "https://a.vpimg3.com/upload/merchandise/ugcaudit/2019/09/03/142/8d584674-ce37-11e9-9e3e-02020ad4977c.jpg"
        ],
        "categoryName":"女式牛仔裤",
        "prepayInfo":{
            "isPrepay":0
        },
        "cat2ndName":"女下装",
        "cat1stName":"女装",
        "vipPrice":"199.00",
        "commission":"15.92",
        "cat1stId":311,
        "goodsName":"【2020新款】荧光磨白破洞小脚翻边休闲牛仔裤",
        "storeServiceCapability":{
            "storeScore":"98.00",
            "storeRankRate":"1.00"
        },
        "brandName":"丽丽",
        "brandLogoFull":"http://a.vpimg3.com/upload/brandcool/0/55ff1056f02b4df28f3bad5c1d587cd4/10000547/primary.png",
        "brandStoreSn":"10000547",
        "sellTimeFrom":1537857153000,
        "schemeStartTime":1590027839000,
        "commentsInfo":{
            "comments":130,
            "goodCommentsShare":"88.00"
        },
        "saleStockStatus":2,
        "schemeEndTime":2145888000000,
        "sourceType":0,
        "sellTimeTo":1735660800000,
        "brandId":1710613684,
        "goodsThumbUrl":"https://a.vpimg3.com/upload/merchandise/pdcvop/00100319/10000547/960169153-1971527585845714944-1971527585845714946-1_750x750_50.jpg",
        "cat2ndId":330,
        "storeInfo":{
            "storeName":"唯品自营",
            "storeId":"ST00000"
        },
        "goodsMainPicture":"https://a.vpimg2.com/upload/merchandise/pdcvop/00100319/10000547/960169153-1971527585845714944-1971527585845714946-1.jpg",
        "destUrl":"https://m.vip.com/product-1710613684-6918661798452982548.html",
        "categoryId":390566,
        "status":1
    }
}

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

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

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

抵扣说明:

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

余额充值