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

{{item.type_name}}:

API 市场 / 唯品会猜你喜欢
 

唯品会猜你喜欢
吐槽建议
应用场景:
一般用在首页底部,或者个人中心底部,根据用户浏览的类型,进行猜你喜欢推荐,进一步提升用户转化
接口说明:
暂不支持排序,最多返回40条,算法可能无推荐商品,因此数据可能为空
使用人数: 10+
唯品会猜你喜欢 接口测试 建议使用通用GET方法调用
  • 接口说明
  • 更新日志
  • 接口版本号:v1.0.0

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

请求方式:GET

公共参数:
请求参数:

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

返回数据:
调用示例:
$data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.2.1",
        ...
    ];
    $host = "https://openapi.dataoke.com/open-api/vip/user-recommend";
    $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 VipUserRecommend();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.2.1");

    $res = $client->setParams([])->request();
//唯品会猜你喜欢
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.2.1",
        ...
    ];
    $host = "https://openapi.dataoke.com/open-api/vip/user-recommend";
    $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 VipUserRecommend();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.2.1");

    $res = $client->setParams([])->request();
返回示例:
{
    "cache": false,
    "code": 0,
    "data": {
        "goodsInfoList": [
            {
                "brandId": 1710614606,
                "brandLogoFull": "http://a.vpimg3.com/upload/brandcool/0/LOG      O/10000750/51f79b0e17d04bc6abb150c2f5a50c05/primary.png",
                "brandName": "丸美",
                "brandStoreSn": "10000750",
                "cat1stId": 1012,
                "cat1stName": "美容护肤",
                "cat2ndId": 1014,
                "cat2ndName": "面部护理",
                "categoryId": 7477,
                "categoryName": "护肤套装",
                "commission": "4.41",
                "commissionRate": "3",
                "couponInfo": {
                    "activateBeginTime": 1654308000000,
                    "activateEndTime": 1655294400000,
                    "activedAmount": -1,
                    "buy": "20.00",
                    "couponName": "丸美20元优惠券",
                    "couponNo": "11125748",
                    "couponType": 5,
                    "fav": "20.00",
                    "totalAmount": 10000000,
                    "useBeginTime": 1654308000000,
                    "useEndTime": 1655294400000
                },
                "cpsInfo": {
                    "1": "adp%3AC01V4mmj58rhjl1o%3A%3Amig_code%3A98743%3Aac03164mmj58000023a55406wocezcqo",
                    "2": "pages/productDetail/productDetail?brandId=1710614606&goodsId=6919328534140963342&tra_from=adp%3AC01V4mmj58rhjl1o%3A%3Amig_code%3A98743%3Aac03164mmj58000023a55406wocezcqo&chl_type=wxk"
                },
                "destUrl": "https://m.vip.com/product-1710614606-6919328534140963342.html",
                "discount": "0.51",
                "goodsId": "6919328534140963342",
                "goodsMainPicture": "https://a.vpimg4.com/upload/merchandise/pdcvis/107013/2022/0210/194/66d4e81b-3840-4ef4-8fe6-57401365a966.jpg",
                "goodsName": "【镇店抗初老】巧克力丝滑爽肤水乳液收缩毛孔抗氧抗初老礼盒装",
                "goodsThumbUrl": "https://a.vpimg3.com/upload/merchandise/pdcvis/107013/2022/0210/194/66d4e81b-3840-4ef4-8fe6-57401365a966_750x750_50.jpg",
                "haiTao": 0,
                "isSubsidyActivityGoods": false,
                "marketPrice": "566.00",
                "schemeEndTime": 2145888000000,
                "schemeStartTime": 1649398405000,
                "sellTimeFrom": 1537901819000,
                "sellTimeTo": 1735660800000,
                "sn": "5888000000924",
                "sourceType": 0,
                "spuId": "SPU-0CC70E4C800000CF",
                "status": 1,
                "storeInfo": {
                    "storeId": "ST00000",
                    "storeName": "唯品自营"
                },
                "vipPrice": "167.00"
            }
        ],
        "page": 4,
        "pageSize": 1,
        "total": 1
    },
    "msg": "ok",
    "requestId": "318d3d4d3bdc48f69498d8e47fb57440",
    "time": 1655200245110606
}
错误码列表: