favorite.md 4.16 KB

1、PC查询用户收藏商品列表接口

(method=web.favorite.product)

请求参数

参数名称 参数类型 可否为空 示例 默认值 备注
uid int 3407014 0 用户id
limit int 500 10 返回记录数

注意,通用的头部没有列出。
请求示例 http://devapi.yoho.cn:58078/?app_version=3.8.2&client_type=android&os_version=yohobuy%3Ah5&screen_size=720x1280&v=7&method=web.favorite.product&uid=3407014&limit=500

响应

code为200即为成功,否则是失败。 响应JSON格式如下所示:

{
  "alg": "SALT_MD5",
  "code": 200,
  "data": {
    "category_list": [
      {
        "category_id": 1,
        "category_name": "上衣",
        "num": 2
      }
    ],
    "product_list": [
      {
        "attribute": 0,
        "category_id": 1,
        "cnAlphabet": "FLYDFLYDA502TE16DuanXiuTXu",
        "fav_price": "199.00",
        "goodsId": 246351,
        "image": "http://img13.static.yhbimg.com/goodsimg/2015/05/05/02/02a4f22b5dd8902ff265540d8cbd7a29a8.jpg?imageMogr2/thumbnail/160x200/extent/160x200/background/d2hpdGU=/position/center/quality/80",
        "is_join_promotion": "Y",
        "is_price_down": "N",
        "is_subscribe_reduction": "N",
        "market_price": "199.00",
        "price_down": 0,
        "product_id": 181867,
        "product_name": "F.L.Y.D 剪裁印花长款短袖T恤[修身弹力棉]",
        "product_skn": 51106081,
        "product_url": "http://www.yohobuy.com/product/pro_181867_246351/FLYDFLYDA502TE16DuanXiuTXu.html",
        "promotion_list": [
          {
            "promotion_title": "全场59加价购-WEB重构",
            "promotion_type": "加价购"
          },
          {
            "promotion_title": "全场39加价购-WEB重构",
            "promotion_type": "加价购"
          }
        ],
        "sales_price": "199.00",
        "status": 1,
        "storage": 0
      },
      {
        "attribute": 0,
        "category_id": 1,
        "cnAlphabet": "SKINARTSERIESINN201503009DaXiangTEEBai",
        "fav_price": "229.00",
        "goodsId": 221659,
        "image": "http://img12.static.yhbimg.com/goodsimg/2015/03/17/09/024462dc4a951f93066907c8c23df27c95.jpg?imageMogr2/thumbnail/160x200/extent/160x200/background/d2hpdGU=/position/center/quality/80",
        "is_join_promotion": "Y",
        "is_price_down": "Y",
        "is_subscribe_reduction": "N",
        "market_price": "458.00",
        "price_down": 0,
        "product_id": 162553,
        "product_name": "Skin Art Series INN 白色大象印花 TEE",
        "product_skn": 51096290,
        "product_url": "http://www.yohobuy.com/product/pro_162553_221659/SKINARTSERIESINN201503009DaXiangTEEBai.html",
        "promotion_list": [
          {
            "promotion_title": "全场59加价购-WEB重构",
            "promotion_type": "加价购"
          },
          {
            "promotion_title": "全场39加价购-WEB重构",
            "promotion_type": "加价购"
          }
        ],
        "sales_price": "219.00",
        "status": 1,
        "storage": 1
      }
    ],
    "total": 2
  },
  "md5": "7b1910d6696b7a1915ebd95029f888bc",
  "message": "favorite product list"
}

2、取消商品收藏接口

(method=web.favorite.cancel)

请求参数

参数名称 参数类型 可否为空 示例 默认值 备注
uid int 8040274 0 用户id
favIds int 212403,228841 null 商品id列表
type String product null 收藏类型

注意,通用的头部没有列出。
请求示例 http://devapi.yoho.cn:58078/?debug=XYZ&app_version=3.8.2&client_type=android&os_version=yohobuy%3Ah5&screen_size=720x1280&v=7&method=web.favorite.cancel&uid=8040274&favIds=212403,228841&type=product&client_secret=3f31be8d35adb60425882cbb7298afa9

响应

code为200即为成功,否则是失败。 响应JSON格式如下所示:

{
  "alg": "SALT_MD5",
  "code": 200,
  "data": [],
  "md5": "6d729d4b35f10fc73531210bd7ecff91",
  "message": "取消收藏成功"
}