批量查询商品列表
批量查询商品列表使用场景:批量查询商家抖店商品信息 1、支持使用商品状态,商品类型、商品创建时间和更新时间筛选商品 2、最大支持1次查询1万条,如返回商品数据大于1万条,请增加筛选条件。
请求URL:
公共参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
appid | String | 是 | 合作伙伴AppId | |
timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
seller_nick | String | 是 | 38173182 | 抖店的账号,对应蜂巢授权返回doudianseller字段 |
sign | String | 是 |
业务参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
status | Int64 | 否 | 0 | 商品在店铺中状态: 0-在线;1-下线;2-删除;详见商品状态机:https://op.jinritemai.com/docs/question-docs/92/2070 |
check_status | Int64 | 否 | 3 | 商品审核状态: 1-未提交;2-待审核;3-审核通过;4-审核未通过;5-封禁;7-审核通过待上架;详见商品状态机:https://op.jinritemai.com/docs/question-docs/92/2070 |
product_type | Int64 | 否 | 0 | 商品类型;0-普通;1-新客商品;3-虚拟;6-玉石闪购;7-云闪购 ;127-其他类型; |
start_time | Int64 | 否 | 1619161933 | 商品创建开始时间,unix时间戳,单位:秒; |
end_time | Int64 | 否 | 1619162000 | 商品创建结束时间,unix时间戳,单位:秒; |
update_start_time | Int64 | 否 | 1619161933 | 商品更新开始时间,unix时间戳,单位:秒;注意:查询范围是update_start_time和update_end_time之间的数据,不包含入参时间。 |
update_end_time | Int64 | 否 | 1619161933 | 商品更新结束时间,unix时间戳,单位:秒;注意:查询范围是update_start_time和update_end_time之间的数据,不包含入参时间。 |
page | Int64 | 是 | 1 | 页码,从1开始,最大为100;page* size最大不能超过1万条 |
size | Int64 | 是 | 10 | 页数,填写范围1~100;page* size最大不能超过1万条 |
store_id | Int64 | 否 | 123456 | 小时达商家使用的门店id |
name | String | 否 | 标题 | 商品标题,支持模糊匹配 |
product_id | List | 否 | 3600137140018749665 | 商品id,最大支持传入100个; |
2. 请求示例代码(Java)
请求示例代码
@Test
public void DDProductListV2() throws Exception {
Map<String, Object> data = new HashMap<String, Object>();
data.put("appid", Config.AppId);
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
data.put("seller_nick", Config.DDSellerNick);
data.put("status", 0);
data.put("page",1);
data.put("size",20);
data.put("sign", Sign(data,Config.AppSecret));
// 调用服务API
String resp = doHttpRequest(Config.DDProductListV2Url, data);
System.out.println(resp);
}
3. 返回结果如下:
返回成功的情况,data里包含宝贝的主图链接
{
"code": 0,
"message": "ok",
"data": {
"data": [
{
"category_detail": {
"first_cid": 20006,
"first_cname": "女鞋",
"fourth_cid": 0,
"fourth_cname": "",
"second_cid": 20185,
"second_cname": "拖鞋",
"third_cid": 22374,
"third_cname": "一字拖"
},
"check_status": 3,
"cos_ratio": 0,
"create_time": 1681922834,
"description": "\u003cp\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_3a5a87fa95a99d1771bc1fa43d131ec2_sx_858611_www790-1420\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_72e08e601c90ff0df6525c3cd57aab47_sx_76076_www790-444\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_b681447c3d81e42214376d7784b0c4f7_sx_555089_www790-1028\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_d0f01bd26f2c386b8cbb76ad1f63c703_sx_455519_www790-1044\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_713a633929d718c402d0afc9c49dd460_sx_142426_www790-1244\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_01398667760e79b3a10410b2882edce6_sx_606448_www790-1018\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_38143390b47ae13918e49f7297559eb1_sx_437359_www790-1274\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_a646f159d32a1c885817653894d43ef8_sx_258465_www790-932\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_67c4cc97181cf5e4298347f0b4266bd6_sx_270146_www790-924\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_87f16e822dd9b2f26e98bd8bfcb9fb7a_sx_360634_www790-952\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_de908510e0441d1658c6fba0093152f2_sx_571213_www790-1114\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_5d0ea923cd0070e519e982198d2fc1a0_sx_444496_www790-946\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_99ad3d9a96adcddb718f516f058b300e_sx_408168_www790-790\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_85151bf7d7fdd217cbbbf74600008d60_sx_505772_www790-960\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_eab9c0f01dc4babdac29a930a6afdeb3_sx_772756_www790-1429\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_937bc6e45f2ccc71de7013cd3fe595c0_sx_375289_www790-858\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_150a03c8aab9ea0c03f36a9722f0e317_sx_452151_www790-858\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_c5c066eff2ea1b2e6aa2c3b7f1b6d08d_sx_525563_www790-929\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_df8d80932eb67aada5221e4ca35d2486_sx_409209_www790-970\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_eb4ef86e5ef00c16d7caecac7529b5b8_sx_452935_www790-912\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_4d311acf2ded2e5b3a82f99337716e1c_sx_371374_www790-888\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_4b6d7c72812abae8ff1a0e22f9a8811e_sx_483865_www790-858\" style=\"max-width:100%;\"/\u003e\u003cimg src=\"https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_951fcf1f2a028cf7393ad63f337531ae_sx_581226_www790-1008\" style=\"max-width:100%;\"/\u003e\u003c/p\u003e",
"discount_price": 1780,
"extra": "{\"category_detail\":{\"first_cid\":20006,\"first_cname\":\"女鞋\",\"fourth_cid\":0,\"fourth_cname\":\"\",\"is_leaf\":true,\"second_cid\":20185,\"second_cname\":\"拖鞋\",\"third_cid\":22374,\"third_cname\":\"一字拖\"},\"class_quality\":\"\",\"is_publish\":1,\"quality_list\":[{\"quality_attachments\":[],\"quality_content_name\":null,\"quality_id\":null,\"quality_key\":\"3457058945162709852\",\"quality_name\":\"质检报告\"},{\"quality_attachments\":[],\"quality_content_name\":null,\"quality_id\":null,\"quality_key\":\"6924586049331085575\",\"quality_name\":\"人物肖像授权资质\"},{\"quality_attachments\":[],\"quality_content_name\":null,\"quality_id\":null,\"quality_key\":\"6945746852176363820\",\"quality_name\":\"赠品资质\"},{\"quality_attachments\":[],\"quality_content_name\":null,\"quality_id\":null,\"quality_key\":\"3457058919409648559\",\"quality_name\":\"报关单\"}],\"quality_opId\":\"7223805791844024591\",\"quality_report\":\"\",\"spec_seq_info\":{\"child_spec_seq\":[\"颜色\",\"类型\"],\"spec_values_seq\":[[\"【致青春】白色\",\"【致青春】浅黄\",\"【致青春】浅绿\",\"【致青春】粉色\",\"【致青春】灰色\",\"【致青春】米色\",\"【2829】白色\",\"【2829】浅绿\",\"【2829】深绿\",\"【2829】橘色\"],[\"36-37 女 拍大一码\",\"38-39 女 拍大一码\",\"40-41 女 拍大一码\",\"40-41 男 拍大一码\",\"42-43 男 拍大一码\",\"44-45 男 拍大一码\"]]}}",
"img": "https://p9-aio.ecombdimg.com/obj/ecom-shop-material/RFSVVggl_m_b38454da26044c04168f45a6ce31502c_sx_530481_www800-800",
"is_package_product": false,
"market_price": 2780,
"mobile": "13827050173",
"name": "时尚情侣家用拖鞋女夏季情侣家居室内防滑浴室洗澡外穿凉拖鞋男士",
"out_product_id": 0,
"outer_product_id": "",
"pay_type": 1,
"product_id": 3611901784588717587,
"product_type": 0,
"recommend_remark": "",
"spec_id": 1763623916481566,
"status": 0,
"update_time": 1681923369
}
],
"page": 1,
"size": 1,
"total": 128
}
}
说明: code为0表示成功,非0为失败,message会包含失败原因。返回字段说明见文档
https://op.jinritemai.com/docs/api-docs/14/633
文档更新时间: 2023-04-21 20:07 作者:admin