有赞新零售社区

发帖
API使用问题»有赞连锁Lyouzan.item.search/3.0.0接口怎么确定两个数据是同一个商品

[API调用-商品/交易] 有赞连锁Lyouzan.item.search/3.0.0接口怎么确定两个数据是同一个商品

xxl 2023-09-15 978 浏览 3 评论 | 只看楼主 [打印]
我新增一个商品,发布了两个渠道,后在api/youzan.item.search/3.0.0?access_token=0e3e28f8f5d694e7d57fd8de752f7de中可以看到两条记录,有赞的商品列表(https://store.youzan.com/v2/goods/storage#)里只有一条记录,是根据什么条件做的合并处理呢?

{
                "page_url": "packages/goods/detail/index",
                "detail_url": "https://h5.youzan.com/v2/showcase/goods?alias=3nkuk8h3a3gbe29",
                "share_detail": 1000,
                "post_fee": 0,
                "item_type": 0,
                "num": 0,
                "origin": "",
                "channel": 0,
                "title": "柠檬汁",
                "item_no": "BM230904853571121",
                "update_time": "2023-09-04 14:59:10",
                "price": 1000,
                "alias": "3nkuk8h3a3gbe29",
                "post_type": 1,
                "meas_prop": {
                    "meas": []
                },
                "created_time": "2023-09-04 14:59:10",
                "image": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/0/w/240/h/240/q/75",
                "tag_ids": [
                    14591890982
                ],
                "sub_title": "",
                "quantity": 12695,
                "item_id": 3401799743,
                "item_imgs": [
                    {
                        "thumbnail": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/290/h/290/q/75/format/jpg",
                        "created": "2023-09-15 14:18:43",
                        "medium": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/600/h/0/q/75/format/jpg",
                        "url": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png",
                        "combine": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/600/h/0/q/75/format/jpg"
                    }
                ],
                "group_names": [
                    "其他"
                ],
                "has_multi_sku": true,
                "share_icon": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/0/w/240/h/240/q/75",
                "classid": "youzan_goods_selling",
                "item_source": 0,
                "actual_quantity": "12695",
                "share_title": "柠檬汁",
                "sku_extension_attributes": [
                    {
                        "sku_id": 24779391949
                    },
                    {
                        "sku_id": 24779391950
                    },
                    {
                        "sku_id": 24779391951
                    }
                ],
                "root_item_id": 0,
                "delivery_template": {},
                "root_kdt_id": 140980410,
                "properties": {
                    "publics": [],
                    "privates": []
                },
                "video_id": 0
            },
            {
                "page_url": "packages/goods/detail/index",
                "detail_url": "https://h5.youzan.com/v2/showcase/goods?alias=36ei37qrrwc0a84",
                "share_detail": 1000,
                "post_fee": 0,
                "item_type": 0,
                "num": 0,
                "origin": "",
                "channel": 1,
                "title": "柠檬汁",
                "item_no": "BM230904853571121",
                "update_time": "2023-09-04 14:59:10",
                "price": 1000,
                "alias": "36ei37qrrwc0a84",
                "post_type": 1,
                "meas_prop": {
                    "meas": []
                },
                "created_time": "2023-09-04 14:59:10",
                "image": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/0/w/240/h/240/q/75",
                "tag_ids": [
                    277589618
                ],
                "sub_title": "",
                "quantity": 0,
                "item_id": 3401799060,
                "item_imgs": [
                    {
                        "thumbnail": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/290/h/290/q/75/format/jpg",
                        "created": "2023-09-15 14:18:43",
                        "medium": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/600/h/0/q/75/format/jpg",
                        "url": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png",
                        "combine": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/600/h/0/q/75/format/jpg"
                    }
                ],
                "group_names": [
                    "水果茶"
                ],
                "has_multi_sku": true,
                "share_icon": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/0/w/240/h/240/q/75",
                "classid": "youzan_goods_selling",
                "item_source": 0,
                "actual_quantity": "0",
                "share_title": "柠檬汁",
                "sku_extension_attributes": [
                    {
                        "sku_id": 24779385272
                    },
                    {
                        "sku_id": 24779385273
                    },
                    {
                        "sku_id": 24779385274
                    }
                ],
                "root_item_id": 0,
                "delivery_template": {},
                "root_kdt_id": 0,
                "properties": {
                    "publics": [],
                    "privates": []
                },
                "video_id": 0
            }


用手机打开
收藏 ··· 回复
    千寻   有赞云团队   2023-09-15 | 只看该作者
    您好,youzan.item.search/3.0.0 分页查询微商城销售中和已售罄商品列表,获取到的两个商品是来自不同类目下的
    • xxl 2023-09-15
      你说的不同类目是值不同的渠道吗,上边结果channel不一样,也就是说我在有赞里面新建一个商品,分配多个渠道的话,总部youzan.item.search/3.0.0存在多个对应的数据是吧?但是我想问的是怎么把这多条数据合并成一个数据的呢?比如https://store.youzan.com/v2/goods/storage里一个商品,在youzan.item.search/3.0.0里面有多条
    • 千寻 回复 xxl 2023-09-16
      您好,1、辛苦提供一下这次调用接口返回给你的traceID(traceID是会在你调用接口会返回给你的一个字段,关于traceID你还可以参考文档:API日志排查工具:https://doc.youzanyun.com/doc#/content/27027/39835/51209)
      2、或者补充一下调用接口时使用的access_token值+接口名称(包括版本号)+具体调用时间+请求参数值。方便精准获取日志解决问题。
    • xxl 回复 千寻 2023-09-16
      api/youzan.item.search/3.0.0?access_token=0e3e28f8f5d694e7d57fd8de752f7de{
          "page_size":30,
          "channel":-1,
          "show_sold_out":2,
          "q":"柠檬汁"
      }
      返回
      {
          "trace_id": "yz7-0a350a48-1694768016470-363452",
          "code": 200,
          "data": {
              "count": 2,
              "items": [
                  {
                      "page_url": "packages/goods/detail/index",
                      "detail_url": "https://h5.youzan.com/v2/showcase/goods?alias=3nkuk8h3a3gbe29",
                      "share_detail": 1000,
                      "post_fee": 0,
                      "item_type": 0,
                      "num": 0,
                      "origin": "",
                      "channel": 0,
                      "title": "柠檬汁",
                      "item_no": "BM230904853571121",
                      "update_time": "2023-09-15 16:21:50",
                      "price": 1000,
                      "alias": "3nkuk8h3a3gbe29",
                      "post_type": 1,
                      "meas_prop": {
                          "meas": []
                      },
                      "created_time": "2023-09-04 14:59:10",
                      "image": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/0/w/240/h/240/q/75",
                      "tag_ids": [
                          14591890982
                      ],
                      "sub_title": "",
                      "quantity": 12695,
                      "item_id": 3401799743,
                      "item_imgs": [
                          {
                              "thumbnail": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/290/h/290/q/75/format/jpg",
                              "created": "2023-09-15 16:53:36",
                              "medium": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/600/h/0/q/75/format/jpg",
                              "url": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png",
                              "combine": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/600/h/0/q/75/format/jpg"
                          }
                      ],
                      "group_names": [
                          "其他"
                      ],
                      "has_multi_sku": true,
                      "share_icon": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/0/w/240/h/240/q/75",
                      "classid": "youzan_goods_selling",
                      "item_source": 0,
                      "actual_quantity": "12695",
                      "share_title": "柠檬汁",
                      "sku_extension_attributes": [
                          {
                              "sku_id": 24779391949
                          },
                          {
                              "sku_id": 24779391950
                          },
                          {
                              "sku_id": 24779391951
                          }
                      ],
                      "root_item_id": 0,
                      "delivery_template": {},
                      "root_kdt_id": 0,
                      "properties": {
                          "publics": [],
                          "privates": []
                      },
                      "video_id": 0
                  },
                  {
                      "page_url": "packages/goods/detail/index",
                      "detail_url": "https://h5.youzan.com/v2/showcase/goods?alias=36d9qw8qv3z6i6j",
                      "share_detail": 1000,
                      "post_fee": 0,
                      "item_type": 0,
                      "num": 0,
                      "origin": "",
                      "channel": 1,
                      "title": "柠檬汁",
                      "item_no": "BM230904853571121",
                      "update_time": "2023-09-15 16:29:53",
                      "price": 1000,
                      "alias": "36d9qw8qv3z6i6j",
                      "post_type": 1,
                      "meas_prop": {
                          "meas": []
                      },
                      "created_time": "2023-09-15 16:29:53",
                      "image": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/0/w/240/h/240/q/75",
                      "tag_ids": [
                          277589618
                      ],
                      "sub_title": "",
                      "quantity": 0,
                      "item_id": 2705130747,
                      "item_imgs": [
                          {
                              "thumbnail": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/290/h/290/q/75/format/jpg",
                              "created": "2023-09-15 16:53:36",
                              "medium": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/600/h/0/q/75/format/jpg",
                              "url": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png",
                              "combine": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/2/w/600/h/0/q/75/format/jpg"
                          }
                      ],
                      "group_names": [
                          "水果茶"
                      ],
                      "has_multi_sku": true,
                      "share_icon": "https://img.yzcdn.cn/upload_files/2020/05/19/FhO5Y19m1QWzD_FXF3lxF8IllIgN.png?imageView2/0/w/240/h/240/q/75",
                      "classid": "youzan_goods_selling",
                      "item_source": 0,
                      "actual_quantity": "0",
                      "share_title": "柠檬汁",
                      "sku_extension_attributes": [
                          {
                              "sku_id": 14319917706
                          },
                          {
                              "sku_id": 14319917707
                          },
                          {
                              "sku_id": 14319917708
                          }
                      ],
                      "root_item_id": 0,
                      "delivery_template": {},
                      "root_kdt_id": 0,
                      "properties": {
                          "publics": [],
                          "privates": []
                      },
                      "video_id": 0
                  }
              ]
          },
          "success": true,
          "message": "successful"
      }

    xxl 青铜   2023-09-16 | 只看该作者
    1111111111111111111111111111

      千寻   有赞云团队   2023-09-16 | 只看该作者
      您好,接口返回的没有问题,您查询的是全部渠道 "channel": -1,返回的商品一个是网店的,一个是门店的,该商品设置的售渠道就是网店与门店同时销售
      • xxl 2023-09-16
        切换总部门店下https://store.youzan.com/v2/goods/storage页面里这个商品只有一条记录,是根据什么条件做的合并处理呢
      • 千寻 回复 xxl 2023-09-18
        您好,若是想查询门店的商品在调用youzan.item.search.3.0.0接口时,channel传1 : 门店,获取的商品就是门店的
      • xxl 回复 千寻 2023-09-18
        我要查的是总部下商品以及对应的渠道信息,比如A商品有门店和网店,切换总部门店下https://store.youzan.com/v2/goods/storage页面里这个商品只有一条记录,渠道写2个,是根据什么条件做的合并处理呢
      • 千寻 回复 xxl 2023-09-18
        您好,这个https://store.youzan.com/v2/goods/storage页面麻烦提供下截图哈
      • xxl 回复 千寻 2023-09-18
        截图地址https://img01.yzcdn.cn/upload_files/2023/09/18/Fii5B565F1ugrc9hX0E8fYtpGzC1.png
        里面的商品都有两个渠道
      • 千寻 回复 xxl 2023-09-18
        您好,你查看的商品库中的商品,在创建的时候设置了两个渠道,一个是门店一个是网店,网店跟门店销售的是同一件商品,没有合并一说,查看商品库商品信息可以使用https://doc.youzanyun.com/detail/API/0/216
      加载更多

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

      本版积分规则

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

      • 评分

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

      复制成功