有赞新零售社区

发帖
API使用问题»调用接口返回值与预期不符

[API调用-商品/交易] 调用接口返回值与预期不符

UP GAME@传奇 2022-05-12 1814 浏览 2 评论 | 只看楼主 [打印]
1.调用接口 批量查询店铺下商品列表  https://open.youzanyun.com/api/youzan.item.common.search/1.0.0请求参数:{
    "page_size":10,
    "category_ids": [xxxx]
}
返回值
{
    "trace_id": "yz7-0a34f82b-1652256731086-875325",
    "code": 200,
    "data": {
        "paginator": {
            "total_count": 0,
            "page_no": 1,
            "page_size": 10
        },
        "items": []
    },
    "success": true,
    "message": "successful"
}
category_ids 真实存在,items未按照预期返回数据




2.调用接口 https://open.youzanyun.com/api/youzan.retail.open.spu.get/3.0.0返回
{
    "trace_id": "yz7-0a34f81e-1652257223804-147742",
    "code": 200,
    "data": {
        "skus": [],
        "unit_settings": []
    },
    "success": true,
    "message": "successful"
}
商品库中有数据,接口未返回

麻烦回复下两个问题 trace_id 真实







用手机打开
收藏 ··· 回复
    UP GAME@传奇 青铜   2022-05-12 | 只看该作者
                    应用名称:upgame
                    应用AppId:10000660
                    ClientId:ce69f54c0fefccc1cf

         有赞云团队   2022-05-12 | 只看该作者
      您好,1.youzan.item.common.search接口,需要您检查下您入参的category_ids值是否正确。
      2.youzan.retail.open.spu.get接口是需要有入参字段,查看日志是没有入参,请按照接口文档入参字段:https://doc.youzanyun.com/detail/API/0/208
      • UP GAME@传奇 2022-05-12
        你好 问题1 经检查 category_ids正确,使用相同 category_ids在 商品库接口返回正常
        麻烦再帮忙看下
      • 回复 UP GAME@传奇 2022-05-12
        您好,您的category_ids是如何获取的,请给下trace_id,以及对应的完整的商品类目名称
      • UP GAME@传奇 回复 2022-05-12
        获取category_id 接口 https://open.youzanyun.com/api/youzan.retail.open.category.query/3.0.0 请求 traceId yz7-0ad26901-1652337221784-564971。
        返回商品类目             {
                        "category_id": 5803353,
                        "parent_id": 0,
                        "name": "主机游戏"
                    },

        请求 https://open.youzanyun.com/api/youzan.item.common.search/1.0.0 接口 参数 {
            "page_size":1,
            "category_ids": [5803353],
            "page_no":"1"
        }
        返回结果
        {
            "trace_id": "yz7-0ad26a5f-1652337319249-504118",
            "code": 200,
            "data": {
                "paginator": {
                    "total_count": 0,
                    "page_no": 1,
                    "page_size": 1
                },
                "items": []
            },
            "success": true,
            "message": "successful"
        }
        trace_id yz7-0ad26a5f-1652337319249-504118

        麻烦了
      • 回复 UP GAME@传奇 2022-05-12
        您好,正在和相关同学确认中,有进展会尽快同步给您。

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

      本版积分规则

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

      • 评分

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

      复制成功