获取订单列表(增强型)
获取商家视角的订单列表数据。若此API调用超时,请减少筛选条件,并将orderViewStatus值设置为1后重试
1. 请求参数
请求URL:
公共参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
appid | String | 是 | 合作伙伴AppId | |
timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
seller_nick | String | 是 | 38173182 | 快手的店铺账号,对应蜂巢授权返回seller_nick字段 |
sign | String | 是 |
业务参数
参数名 | 类型 | 必须 | 示例值 | 详情描述 |
---|---|---|---|---|
start_date | datetime | 是 | 2023-01-25 00:00:00 | 开始,默认按修改时间查询。 1为按订单创建时间查询;2 为按订单(订单状态、修改运单号)修改时间 |
end_date | datetime | 是 | 2023-01-27 00:00:00 | 结束时间 ,默认按修改时间查询。 1为按订单创建时间查询;2 为按订单(订单状态、修改运单号)修改时间 |
order_state | Integer | 否 | 30 | 状态 订单状态:[0, “未知状态”], [10, “待付款”], [30, “已付款”], [40, “已发货”], [50, “已签收”], [70, “订单成功”], [80, “订单失败”]; |
page | Integer | 是 | 1 | 页码 默认 1, |
page_size | Integer | 是 | 30 | 每页大小, 最大500, 每100为一个阶梯 |
sort_type | Integer | 是 | 1 | 排序方式,默认升序, 1是降序, 其它数字都是升序 |
date_type | Integer | 否 | 1 | 1为按订单创建时间查询;2 为按订单(订单状态、修改运单号)修改时间 |
seller_flag | String | 否 | red_flag_tag_order | 如果不想按旗帜查询,此字段传空字符串。注意:新订单默认不是灰色旗帜(虽然官方后台看起来是灰色,没有插旗记录的)而是无旗帜状态。 订单旗帜编码:[red_flag_tag_order:红色],[yellow_flag_tag_order:黄色],[green_flag_tag_order:绿色],[blue_flag_tag_order:蓝色],[purple_flag_tag_order:紫色],[grey_flag_tag_order:灰色] |
order_id | String | 否 | 3818314 | 订单号,多个可用英文逗号隔开 |
product_id | Long | 否 | 3818341 | 商品Id |
2. 请求示例代码(Java)
请求示例代码
@Test
public void getExtOrderList() throws Exception {
String tb_seller_nick = Config.KSSellerNick ;
//业务参数
Map<String, String> data = new HashMap<String, String>();
data.put("appid", Config.AppId);
data.put("seller_nick", tb_seller_nick);
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
// 状态 订单状态:[0, "未知状态"], [10, "待付款"], [30, "已付款"], [40, "已发货"], [50, "已签收"], [70, "订单成功"], [80, "订单失败"];
// data.put("order_state", "40");
data.put("start_date","2023-01-25 00:00:00" );
data.put("end_date", "2023-06-17 23:59:59");
// 必填 返回页码 默认 1,页码从 1 开始 PS:当前采用分页返回,数量和页数会一起传,如果不传,则采用 默认值
data.put("page", "1");
// 必填 返回数量,
data.put("page_size", "50");
// 非必填 排序类型 1- 降序 ,其它数字:升序
data.put("sort_type", "0");
// 非必填 查询时间类型
data.put("date_type", "0");
data.put("seller_flag","green_flag");
// data.put("product_id", "10023397463670");
// data.put("order_id", "253929851654,253927981481");
data.put("sign", Utils.Sign(data, Config.AppSecret));
doHttpRequest(Config.KS_OPEN_ORDER_EXT_SEARCH, data);
}
3. 返回结果
{
"code": 0,
"message": "ok",
"data": {
"page": 1,
"total": 1,
"size": 50,
"shop_order_list": [
{
"orderAddress": {
"city": "杭州市",
"cityCode": 3301,
"desensitiseAddress": "**口街道****",
"desensitiseConsignee": "金**",
"desensitiseMobile": "134****7572",
"district": "上城区",
"districtCode": 330102,
"encryptedAddress": "~+45optWFdyqwvxM+ZjubaOQ1bE gzNzMSMMJlsl7io5pc7CRgJjktcwWkzdyvfsCxMABQ3rJRLxRG8q7LvKMYpITXl9MyzFLn8RoSsZxMWCiTN6zCiAncj881O+0GIiBX4V+si2wDiStLD5C2ldFEEWmbjcmo7e3lpJfkl617VygFMAE=~1~~",
"encryptedConsignee": "#1kt+12a7dUbJ#Ci1tZXJjaGFudC5vcG HtM2suMX2+kQkUKF3cJwh9RjrwhoSDdaKxdNZx+d4UV6+V0GKg+R+IiDfitlfaZlOO5/x71V7dmkscaWgBcNluuvFwB8TxREYoygFMAE=#1##",
"encryptedMobile": "$6ajBOHk/0JJRoTqsTwUOc6/yNGtwmP1S68q8GcHHsZc=$Ci1tZXJjaGFudC5vcGVuLnNlY3JldC5rZXkua3M2NjY1MzI3NDUwMDYyOTgzNzMSIK3xX6sWfp6MFIxE EPxtnoHrbPC2cKU/0kssEr1NC+tMZ+dBdJxnHim9s/WrFzltEumWzsfARoSDdaKxdNZx+d4UV6+V0GKg+R+IiBR2qbxWlHYRxEj2kkosPXyGjwuB9xZC+tEQ1//Bc9gBSgFMAE=$1$$",
"province": "浙江省",
"provinceCode": 33,
"oaid":"761da7c0c97dcdd080dc6102b86eea0a"
},
"orderBaseInfo": {
"activityType": 1,
"buyerImage": "http://static.yximgs.com/s1/i/def/head_m.png",
"buyerNick": "kingjang",
"buyerOpenId": "f198f0846993046e14bf57241c6cd6c1",
"coType": 0,
"commentStatus": 0,
"cpsType": 1,
"createTime": 1675945697737,
"discountFee": 0,
"expressFee": 0,
"oid": 2304000051323475,
"payChannel": "ALIPAY",
"payTime": 1675945712773,
"payType": 2,
"preSale": 0,
"promiseTimeStampOfDelivery": 1676118512773,
"recvTime": 0,
"refundTime": 0,
"remark": "",
"riskCode": 0,
"sellerDelayPromiseTimeStamp": 1676118512773,
"sellerNick": "刻骨铭心的爱情",
"sellerOpenId": "f198f0846993046e14bf572443812bdb",
"sendTime": 1676875429873,
"status": 40,
"theDayOfDeliverGoodsTime": 120,
"totalFee": 10,
"updateTime": 1676875429873,
"validPromiseShipmentTimeStamp": 1676118512773
},
"orderDeliveryInfo": {
"enableAppendPackage": true,
"maxPackageNum": 20
},
"orderItemInfo": {
"discountFee": 0,
"goodsCode": "",
"itemExtra": {
"categoryInfo": { "categoryName": "其他日用", "itemCid": 2995 }
},
"itemId": 3655213008601,
"itemLinkUrl": "https://app.kwaixiaodian.com/merchant/shop/detail?id=3655213008601\u0026hyId=kwaishop\u0026layoutType=4",
"itemPicUrl": "https://u2-201.ecukwai.com/ufile/adsocial/6195808d-8969-46a5-a7e9-bb506c95e856.jpg",
"itemTitle": "专用的回形针",
"itemType": 1,
"num": 1,
"orderItemId": 64143209614475,
"originalPrice": 10,
"price": 10,
"relItemId": 3655213008601,
"relSkuId": 0,
"skuDesc": "黑色",
"skuId": 4810616921601,
"skuNick": "837",
"warehouseCode": ""
},
"orderLogisticsInfo": [
{
"expressCode": 4,
"expressNo": "SF1662058624301",
"logisticsId": 43422144062475
}
],
"orderNote": { "sellerNote": ["备注"] },
"orderFlag": { "flag": null },
"orderRefundList": []
}
]
}
}
4. 返回字段说明
返回字段说明见官方文档: https://open.kwaixiaodian.com/docs/api?categoryId=43&apiName=open.order.cursor.list&version=1
文档更新时间: 2024-06-07 20:51 作者:admin