有赞新零售社区

发帖
API使用问题»youzan.item.get可以获取别人家店铺的商品

youzan.item.get可以获取别人家店铺的商品

欧磊优品-小亮 2019-03-31 2221 浏览 13 评论 | 只看楼主 [打印]
youzan.item.get 这个接口通过alias可以获取别的店铺的商品是什么情况?通过item_id正常的提示商品不存在下面不存在的是通过item_id获取的,正常数据的是通过alias获取的


  1. 调用接口店铺ID:42500285
  2. array(1) {
  3.   ["error_response"]=>
  4.   array(2) {
  5.     ["msg"]=>
  6.     string(16) "商品不存在!"
  7.     ["code"]=>
  8.     int(122001001)
  9.   }
  10. }
  11. array(1) {
  12.   ["response"]=>
  13.   array(1) {
  14.     ["item"]=>
  15.     array(37) {
  16.       ["template"]=>
  17.       array(2) {
  18.         ["template_title"]=>
  19.         string(9) "普通版"
  20.         ["template_id"]=>
  21.         int(-1)
  22.       }
  23.       ["detail_url"]=>
  24.       string(80) "https://h5.youzan.com/v2/showcase/goods?alias=1ydyykibsc5bm&from=wsc&kdtfrom=wsc"
  25.       ["skus"]=>
  26.       array(3) {
  27.         [0]=>
  28.         array(11) {
  29.           ["sku_unique_code"]=>
  30.           string(17) "45875905236294910"
  31.           ["with_hold_quantity"]=>
  32.           int(0)
  33.           ["quantity"]=>
  34.           int(9999)
  35.           ["item_id"]=>
  36.           int(458759052)
  37.           ["created"]=>
  38.           string(19) "2019-03-31 14:06:03"
  39.           ["price"]=>
  40.           int(3990)
  41.           ["properties_name_json"]=>
  42.           string(88) "[{"vid":29859632,"v":"双耳+充电仓(续航高达5小时)","kid":33,"k":"款式"}]"
  43.           ["modified"]=>
  44.           string(19) "2019-03-31 14:06:03"
  45.           ["sku_id"]=>
  46.           int(36294910)
  47.           ["sold_num"]=>
  48.           int(0)
  49.           ["item_no"]=>
  50.           string(0) ""
  51.         }
  52.         [1]=>
  53.         array(11) {
  54.           ["sku_unique_code"]=>
  55.           string(17) "45875905236294909"
  56.           ["with_hold_quantity"]=>
  57.           int(0)
  58.           ["quantity"]=>
  59.           int(9999)
  60.           ["item_id"]=>
  61.           int(458759052)
  62.           ["created"]=>
  63.           string(19) "2019-03-31 14:06:03"
  64.           ["price"]=>
  65.           int(2590)
  66.           ["properties_name_json"]=>
  67.           string(89) "[{"vid":29902959,"v":"单耳+充电线(续航时间30分钟)","kid":33,"k":"款式"}]"
  68.           ["modified"]=>
  69.           string(19) "2019-03-31 14:06:03"
  70.           ["sku_id"]=>
  71.           int(36294909)
  72.           ["sold_num"]=>
  73.           int(0)
  74.           ["item_no"]=>
  75.           string(0) ""
  76.         }
  77.         [2]=>
  78.         array(11) {
  79.           ["sku_unique_code"]=>
  80.           string(17) "45875905236294911"
  81.           ["with_hold_quantity"]=>
  82.           int(0)
  83.           ["quantity"]=>
  84.           int(9999)
  85.           ["item_id"]=>
  86.           int(458759052)
  87.           ["created"]=>
  88.           string(19) "2019-03-31 14:06:03"
  89.           ["price"]=>
  90.           int(2990)
  91.           ["properties_name_json"]=>
  92.           string(88) "[{"vid":29902969,"v":"双耳+充电线(续航时间1小时)","kid":33,"k":"款式"}]"
  93.           ["modified"]=>
  94.           string(19) "2019-03-31 14:06:03"
  95.           ["sku_id"]=>
  96.           int(36294911)
  97.           ["sold_num"]=>
  98.           int(0)
  99.           ["item_no"]=>
  100.           string(0) ""
  101.         }
  102.       }
  103.       ["post_fee"]=>
  104.       int(0)
  105.       ["virtual_extend"]=>
  106.       array(1) {
  107.         ["effective_type"]=>
  108.         int(0)
  109.       }
  110.       ["buy_quota"]=>
  111.       int(0)
  112.       ["item_type"]=>
  113.       int(0)
  114.       ["num"]=>
  115.       int(0)
  116.       ["title"]=>
  117.       string(6) "测试"
  118.       ["join_level_discount"]=>
  119.       bool(true)
  120.       ["item_no"]=>
  121.       string(0) ""
  122.       ["kdt_id"]=>
  123.       int(42222034)
  124.       ["purchase_right"]=>
  125.       bool(false)
  126.       ["price"]=>
  127.       int(2590)
  128.       ["presale_extend"]=>
  129.       array(0) {
  130.       }
  131.       ["alias"]=>
  132.       string(13) "1ydyykibsc5bm"
  133.       ["post_type"]=>
  134.       int(1)
  135.       ["summary"]=>
  136.       string(0) ""
  137.       ["tag_ids"]=>
  138.       array(1) {
  139.         [0]=>
  140.         int(105035018)
  141.       }
  142.       ["quantity"]=>
  143.       int(29997)
  144.       ["item_tags"]=>
  145.       array(1) {
  146.         [0]=>
  147.         array(9) {
  148.           ["created"]=>
  149.           string(19) "2018-12-24 23:43:58"
  150.           ["share_url"]=>
  151.           string(63) "https://shop42414202.youzan.com/v2/showcase/tag?alias=71pfiva51"
  152.           ["name"]=>
  153.           string(21) "49元任选6样专区"
  154.           ["alias"]=>
  155.           string(9) "71pfiva51"
  156.           ["id"]=>
  157.           int(105035018)
  158.           ["tag_url"]=>
  159.           string(63) "https://shop42414202.youzan.com/v2/showcase/tag?alias=71pfiva51"
  160.           ["type"]=>
  161.           int(0)
  162.           ["item_num"]=>
  163.           int(19)
  164.           ["desc"]=>
  165.           string(0) ""
  166.         }
  167.       }
  168.       ["item_id"]=>
  169.       int(458759052)
  170.       ["created"]=>
  171.       string(19) "2019-03-31 13:56:02"
  172.       ["item_imgs"]=>
  173.       array(1) {
  174.         [0]=>
  175.         array(6) {
  176.           ["thumbnail"]=>
  177.           string(118) "https://img.yzcdn.cn/upload_files/2019/03/31/FvPQmMDNY-bVuxeD8EhzEfB4X2M5.jpg?imageView2/2/w/290/h/290/q/75/format/jpg"
  178.           ["created"]=>
  179.           string(19) "2019-03-31 14:31:40"
  180.           ["medium"]=>
  181.           string(116) "https://img.yzcdn.cn/upload_files/2019/03/31/FvPQmMDNY-bVuxeD8EhzEfB4X2M5.jpg?imageView2/2/w/600/h/0/q/75/format/jpg"
  182.           ["id"]=>
  183.           int(1339242727)
  184.           ["url"]=>
  185.           string(77) "https://img.yzcdn.cn/upload_files/2019/03/31/FvPQmMDNY-bVuxeD8EhzEfB4X2M5.jpg"
  186.           ["combine"]=>
  187.           string(116) "https://img.yzcdn.cn/upload_files/2019/03/31/FvPQmMDNY-bVuxeD8EhzEfB4X2M5.jpg?imageView2/2/w/600/h/0/q/75/format/jpg"
  188.         }
  189.       }
  190.       ["fenxiao_extend"]=>
  191.       array(0) {
  192.       }
  193.       ["is_listing"]=>
  194.       bool(true)
  195.       ["sold_num"]=>
  196.       int(0)
  197.       ["hotel_extend"]=>
  198.       array(0) {
  199.       }
  200.       ["delivery_template_info"]=>
  201.       array(0) {
  202.       }
  203.       ["share_url"]=>
  204.       string(80) "https://h5.youzan.com/v2/showcase/goods?alias=1ydyykibsc5bm&from=wsc&kdtfrom=wsc"
  205.       ["pic_thumb_url"]=>
  206.       string(89) "https://img.yzcdn.cn/upload_files/2019/03/31/FvPQmMDNY-bVuxeD8EhzEfB4X2M5.jpg!120x120.jpg"
  207.       ["is_lock"]=>
  208.       bool(false)
  209.       ["messages"]=>
  210.       string(2) "[]"
  211.       ["origin_price"]=>
  212.       string(0) ""
  213.       ["pic_url"]=>
  214.       string(77) "https://img.yzcdn.cn/upload_files/2019/03/31/FvPQmMDNY-bVuxeD8EhzEfB4X2M5.jpg"
  215.       ["cid"]=>
  216.       int(7000000)
  217.       ["desc"]=>
  218.       string(0) ""
  219.     }
  220.   }
  221. }
复制代码



用手机打开
收藏 ··· 回复
    这个问题我确认反馈一下
    有赞-技术支持

      客服小二 青铜   2019-04-01 | 只看该作者
      修改好后麻烦说下,我们这边才好继续进行后续的开发,麻烦了

        这个问题是由于之前开放平台获取商品接口的alias值没有根据token授权店铺的kdt_id作判断,导致能通过alias查到其他店铺的商品,这个需求已经帮您提交上去了,产品部门会评估并排期,具体的时间等我这边收到反馈再回复您!
        有赞-技术支持

          12跳至
          您需要登录后才可以回帖 登录 | 立即注册

          本版积分规则

          复制链接
          新浪微博
          QQ空间
          微信扫码
          • 回复

          • 评分

          客服工作时间是9:00-18:00,客服妹子当前不在线,若不能及时回复请谅解。试试右上角的搜索吧,论坛有丰富的经验贴、公告贴,相信一定能够帮到您~

          复制成功