大淘客,让选品更简单! |

{{item.type_name}}:

API 市场 / 唯品会商品详情
 

唯品会商品详情
吐槽建议
应用场景:
当用户点击某个唯品会商品时,调用该接口。获取对应商品的详细信息
接口说明:
通过商品id,获取指定商品的详细详细数据(商品价格,优惠券信息,详情图,主图……)
使用人数: 10+
唯品会商品详情 接口测试 建议使用通用GET方法调用
  • 接口说明
  • 更新日志
  • 接口版本号:v1.0.0

请求地址:https://openapi.dataoke.com/api/vip/goods-detail 复制

请求方式:GET

公共参数:
请求参数:

注:请求参数须区分大小写

返回数据:
调用示例:
$data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.2.1",
        ...
    ];
    $host = "https://openapi.dataoke.com/open-api/vip/goods-detail";
    $url = $host;
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $header = [
        'Content-Type: application/json',
        'Client-Sdk-Type: php',
    ];
    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
    $output = curl_exec($ch);
    $a = curl_error($ch);
    if(!empty($a)){
        return json_encode(array('code'=>10003, 'msg'=>$a));
    }
    curl_close($ch);
    return $output;
   
    SDK调用示例
    $client = new VipGoodsDetail();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.2.1");

    $res = $client->setParams([])->request();
 //唯品会商品详情
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.0.0",
        ...
    ];
    $host = "https://openapi.dataoke.com/open-api/vip/goods-detail";
    $url = $host . '?' . http_build_query($data);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $output = curl_exec($ch);
    $a = curl_error($ch);
    if(!empty($a)){
        return json_encode(array('code'=>10003, 'msg'=>$a));
    }
    curl_close($ch);
    return $output;

    SDK调用示例
    $client = new VipGoodsDetail();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.0.0");

    $res = $client->setParams([])->request();

返回示例:
{
    "cache": false,
    "code": 0,
    "data": [
        {
            "brandId": 1710616254,
            "brandLogoFull": "http://a.vpimg3.com/upload/brandcool/0/LOGO/10028865/8a8b3c3c801342bd8f16e6c0bf6e108e/primary.png",
            "brandName": "Banila CO",
            "brandStoreSn": "10028865",
            "cat1stId": 7469,
            "cat1stName": "彩妆香水",
            "cat2ndId": 384328,
            "cat2ndName": "卸妆",
            "categoryId": 384410,
            "categoryName": "卸妆膏/乳",
            "commentsInfo": {
                "comments": 18367,
                "goodCommentsShare": "98.00"
            },
            "commission": "1.77",
            "commissionRate": "3",
            "destUrl": "https://m.vip.com/product-1710616254-6919013018602350750.html",
            "discount": "0.30",
            "goodsCarouselPictures": [
                "https://a.vpimg3.com/upload/merchandise/pdcvis/112607/2022/0526/169/5d38ee6b-0e1f-425b-9384-d86b633395a2_750x750_75.jpg",
                "https://a.vpimg2.com/upload/merchandise/pdcvis/112607/2021/0628/189/fd9eac8f-4502-46e1-b9f2-ebd71d7d77f2_750x750_75.jpg",
                "https://a.vpimg2.com/upload/merchandise/pdcvis/112607/2021/0330/131/0d7f423a-c396-49ab-a87d-3a2aa238d3dd_750x750_75.jpg",
                "https://a.vpimg4.com/upload/merchandise/pdcvis/112607/2019/0716/137/c7012a49-898f-465c-8b8f-8c81b2b7adce_750x750_75.jpg",
                "https://a.vpimg2.com/upload/merchandise/pdcvis/112607/2019/0716/196/89e8ed84-fb54-4937-bfb0-6ca79687f91b_750x750_75.jpg",
                "https://a.vpimg4.com/upload/merchandise/pdcvis/112607/2019/0716/134/11d7bc47-df5e-4bf0-ab0c-aa4552427f22_750x750_75.jpg",
                "https://a.vpimg2.com/upload/merchandise/pdcvis/112607/2019/0716/47/c47e04d7-3377-45b5-be81-3976ac7116e8_750x750_75.jpg"
            ],
            "goodsDetailPictures": [
                "https://a.vpimg3.com/upload/merchandise/pdcvis/112607/2022/0418/144/6f952453-4918-413b-bd94-561620cb8c42.jpg",
                "https://a.vpimg3.com/upload/merchandise/pdcvis/112607/2020/0225/53/c9a1053c-2369-4304-8fb6-21952e540409.jpg",
                "https://a.vpimg4.com/upload/merchandise/pdcvis/112607/2019/0716/106/c951fe84-ab2f-4626-84b7-15f90a65df43.jpg",
                "https://a.vpimg2.com/upload/merchandise/pdcvis/112607/2020/0921/176/e3e1c415-acbc-47ee-bb4f-98815e8929c7.jpg",
                "https://a.vpimg4.com/upload/merchandise/pdcvis/112607/2019/0716/102/01afa8b7-7506-46da-b0b9-e12d74cd76b0.jpg",
                "https://a.vpimg4.com/upload/merchandise/pdcvis/112607/2019/0716/104/07f7d1f7-0491-4436-b27f-c0c63a453504.jpg",
                "https://a.vpimg3.com/upload/merchandise/pdcvis/112607/2020/1106/144/b7029024-df93-48d4-8f07-1758a33cf61b.jpg",
                "https://a.vpimg3.com/upload/merchandise/pdcvis/112607/2020/1106/29/7380fa9f-893c-497c-b083-46f6373be7e7.jpg"
            ],
            "goodsId": "6919013018602350750",
            "goodsMainPicture": "https://a.vpimg3.com/upload/merchandise/pdcvis/112607/2022/0526/169/5d38ee6b-0e1f-425b-9384-d86b633395a2.jpg",
            "goodsName": "ZERO温和卸妆50ml+25ml套装 卸妆油卸妆膏",
            "goodsThumbUrl": "https://a.vpimg4.com/upload/merchandise/pdcvis/112607/2022/0526/169/5d38ee6b-0e1f-425b-9384-d86b633395a2_750x750_50.jpg",
            "haiTao": 0,
            "isSubsidyActivityGoods": false,
            "marketPrice": "198.00",
            "prepayInfo": {
                "isPrepay": 0
            },
            "saleStockStatus": 2,
            "schemeEndTime": 2145888000000,
            "schemeStartTime": 1649398405000,
            "sellTimeFrom": 1537980619000,
            "sellTimeTo": 1735660800000,
            "sn": "banilan181901",
            "sourceType": 0,
            "spuId": "SPU-05C8D11C800002A7",
            "status": 1,
            "storeInfo": {
                "storeId": "ST00000",
                "storeName": "唯品自营"
            },
            "storeServiceCapability": {
                "storeRankRate": "1.00",
                "storeScore": "98.00"
            },
            "vipPrice": "59.00",
            "whiteImage": "https://a.vpimg4.com/upload/merchandise/pdcvis/2019/07/16/80/afdce67a-ad09-4c4f-b80c-a042b347879a.png"
        }
    ],
    "msg": "ok",
    "requestId": "97b166bb875fcc7397daaf456a62a535",
    "time": 1655200135155330
}
错误码列表: