请选择 进入手机版 | 继续访问电脑版

有赞新零售社区

发帖
有赞云历史板块»【商品接口】场景三:外部系统同步有赞商品场景

【商品接口】场景三:外部系统同步有赞商品场景

有赞-大羽 2018-10-25 2237 浏览 0 评论 | [显示全部楼层] [打印]
场景说明:
有赞微商城在有一定的商品量之后,外部系统想要从有赞同步商品信息或是拉取商品信息做运营,如何从有赞获取到想要的商品信息?

——微商城后台-商品-商品管理,点击“导出报表”即可一键导出商品信息,导出文件为csv文件;
image035.png

——通过哪个接口可以批量查询出售中的商品信息?
(1)获取出售中的商品列表:youzan.items.onsale.get
(3)重要字段说明:
》》order_by:排序方式,格式为column:asc/desc,目前排序字段:1.创建时间:created_time,2.更新时间:update_time,3.价格:price,4.销量:sold_num;
》》page_no:页码,显示第几页的数据;
》》page_size:每页显示的条数,最大不能超过300;
》》q:搜索字段,根据关键词搜索title,只返回title中包含此关键词的商品;
》》update_time_start:更新开始时间,格式为时间戳,如 1534176000000,单位ms ;
》》update_time_end:更新结束时间,格式为时间戳,如 1534262400000,单位ms;
(4)调用格式,通过(2)中链接访问后:
image037.png
(5)HTTP调用示例:
image039.png
(6)JAVA调用示例:
YZClient client = new DefaultYZClient(new Token("token")); //newSign(appKey, appSecret)
YouzanItemsOnsaleGetParams youzanItemsOnsaleGetParams = newYouzanItemsOnsaleGetParams();
youzanItemsOnsaleGetParams.setPageNo(1L);
youzanItemsOnsaleGetParams.setPageSize(10L);
YouzanItemsOnsaleGet youzanItemsOnsaleGet = newYouzanItemsOnsaleGet();
youzanItemsOnsaleGet.setAPIParams(youzanItemsOnsaleGetParams);
YouzanItemsOnsaleGetResult result =client.invoke(youzanItemsOnsaleGet);
——通过哪个接口可以批量查询仓库中的商品列表?
(1)获取仓库中的商品列表:youzan.items.inventory.get
(3)重要字段说明:
》》banner:分类字段,可选值:for_shelved(已下架的)/ sold_out(已售罄的)
》》order_by:排序方式。格式为column:asc/desc,目前排序字段:1.创建时间:created_time,2.更新时间:update_time,3.价格:price,4.销量:sold_num;
》》page_no:页码,拉取第几页的数据;
》》page_size:每页条数,即每页显示多少条的商品数据,最大不超过300;
》》q:搜索字段,根据关键词搜索title,只返回title中包含此关键词的商品;
》》update_time_start:更新开始时间,格式为时间戳,如 1534176000000,单位ms ;
》》update_time_end:更新结束时间,格式为时间戳,如 1534262400000,单位ms;
》》tag_id:商品分组的ID,可以通过接口https://www.youzanyun.com/apilist/detail/group_item/item_category/youzan.itemcategories.taglist.search 批量获取;
(4)调用格式,通过(2)中链接访问后:
image041.png
file:///C:/Users/CAROLI~1/AppData/Local/Temp/msohtmlclip1/01/clip_image012.gif(5)HTTP调用示例:
image043.png
(6)JAVA调用示例:
YZClient client = new DefaultYZClient(new Token("token")); //newSign(appKey, appSecret)
YouzanItemsInventoryGetParams youzanItemsInventoryGetParams = newYouzanItemsInventoryGetParams();
youzanItemsInventoryGetParams.setPageNo(1L);
youzanItemsInventoryGetParams.setPageSize(10L);
youzanItemsInventoryGetParams.setOrderBy("asc");
YouzanItemsInventoryGet youzanItemsInventoryGet = newYouzanItemsInventoryGet();
youzanItemsInventoryGet.setAPIParams(youzanItemsInventoryGetParams);
YouzanItemsInventoryGetResult result =client.invoke(youzanItemsInventoryGet);


总帖 > 【商品接口】四大场景接口对接说明
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

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

    • 评分

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

    复制成功