获取订单列表v2
获取商家视角的订单列表数据。若此API调用超时,请减少筛选条件,并将orderViewStatus值设置为1后重试
建议使用《获取订单列表增强型》接口,查询条件更全,同时返回oaid(用于合单)
1. 请求参数
请求URL:
公共参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
appid | String | 是 | 合作伙伴AppId | |
timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
seller_nick | String | 是 | 38173182 | 快手的店铺账号,对应蜂巢授权返回seller_nick字段 |
sign | String | 是 |
业务参数
参数名 | 类型 | 必须 | 示例值 | 详情描述 |
---|---|---|---|---|
orderViewStatus | Integer | 是 | 1 | 订单状态,0未知 1 全部 2 待付款 3 待发货 4 待收货(已发货)5 已收货 6 交易成功订单 7 已关闭订单。若此API返回超时,请传入1后重试 |
pageSize | Integer | 是 | 10 | 每页请求数量 最多一页50条 |
sort | Integer | 否 | 1 | 1时间降序 2时间升序 默认降序 |
queryType | Integer | 否 | 1 | 1按创建时间查找 2按更新时间查找 默认创建时间 |
beginTime | Long | 是 | 1543817629000 | 订单生成时间的开始时间,单位毫秒, 不能小于90天前,且需要小于结束时间 |
endTime | Long | 是 | 1543817629000 | 订单生成时间的截止时间,单位毫秒,与开始时间的时间范围不大于7天 |
cpsType | Integer | 否 | 1 | 分销类型 0-全部 1-普通订单 2-分销订单 |
cursor | String | 是 | 157356441188_2021345676543 | 游标内容 第一次传空串,之后传上一次的cursor返回值,若返回“nomore”则标识到底 |
2. 请求示例代码(Java)
请求示例代码
@Test
public void getOrderList() throws Exception {
String sellerNick = Config.KSSellerNick ;
//业务参数
Map<String, String> data = new HashMap();
data.put("appid", Config.AppId);
data.put("seller_nick", sellerNick);
Long timestamp = System.currentTimeMillis();
data.put("timestamp", timestamp.toString());
data.put("orderViewStatus","1");//订单状态,0未知 1 全部 2 待付款 3 待发货 4 待收货(已发货)5 已收货 6 交易成功订单 7 已关闭订单
data.put("pageSize","10");//每页请求数量 最多一页50条
data.put("sort","1" );//1时间降序 2时间升序 默认降序
data.put("queryType","2" );//1按创建时间查找 2按更新时间查找 默认创建时间
long beginTime = System.currentTimeMillis() - 89 * 24 * 60 * 60 *60; //7天以前
data.put("beginTime", String.valueOf(beginTime));//订单生成时间的开始时间,单位毫秒, 不能小于90天前,且需要小于结束时间
data.put("endTime", String.valueOf(System.currentTimeMillis()));//订单生成时间的截止时间,单位毫秒,与开始时间的时间范围不大于7天
data.put("cpsType","0");//分销类型 0-全部 1-普通订单 2-分销订单
data.put("cursor","" );//游标内容 第一次传空串,之后传上一次的cursor返回值,若返回“nomore”则标识到底
// 参数签名
data.put("sign", Utils.Sign(data, Config.AppSecret));
String result = doHttpRequest(Config.KS_OPEN_ORDER_CURSOR_LIST, data);
System.out.println("result:"+result);
}
3. 返回结果
{
"code": 0,
"message": "ok",
"data": {
"beginTime": 1687155382641,
"cursor": "1687251104545_2307500074108220",
"endTime": 1687616758641,
"orderList": [
{
"orderAddress": {
"city": "济南市",
"cityCode": 3701,
"desensitiseAddress": "**街道文化北路**号城发广场北楼****",
"desensitiseConsignee": "张**",
"desensitiseMobile": "185****8838",
"district": "莱芜区",
"districtCode": 370116,
"encryptedAddress": "~AjbKvY9u2S0CIAjAg1ZIexIqfPKO6hgRofbOM d9DpOEeBcnFPXfcWQXxutG2+GokyVaSdOEjRx3EgvZUZmH6EtyTWYIrXI+KHHiBoSdqTI4uScWeRNhpufIaPxwnDQIiCRhRcW6NTVEjZ+fOGyRmacHH0WduADwFHw5JNjATWxnigFMAE=~1~~",
"encryptedConsignee": "#YM+/f/VLf/VL#Ci1tZXJjaGFudC5vcGVuLnNlY3JldC5rZXkua3M2ODk2MTM2OTY3MzMyMTA0NzASIClEZa/OIxdiE6iDweZzImdB6oub4ghKR5ja55sEThgOGhIbNd EItSgFMAE=#1##",
"encryptedMobile": "$hgj0WBf4KDketN0trlrGWCivd4lGiRW76Ndomhp9c4E=$Ci1tZXJjaGFudC5vcGVuLnNlY3JldC5rZXkua3M2ODk2MTM2OTY3MzMyMTA0NzASIMOQS058ASctlOTv7vZUN4 9XDc8Rpbb63S0kPwlMpFJIjtPxsHeV0SgFMAE=$1$$",
"province": "山东省",
"provinceCode": 37
},
"orderBaseInfo": {
"activityType": 1,
"buyerImage": "http://p5.a.yximgs.com/s1/i/def/head_f.png",
"buyerNick": "A张张💖会计",
"buyerOpenId": "f198f0846993046e14bf572410405c46",
"coType": 0,
"commentStatus": 0,
"cpsType": 1,
"createTime": 1678975518244,
"disableDeliveryReasonCode": [],
"discountFee": 0,
"expressFee": 0,
"oid": 2307500074108220,
"orderSellerRoleInfo": {
"roleId": 2589256601,
"roleName": "刻骨铭心的爱情",
"roleType": 1
},
"payChannel": "ALIPAY_HB",
"payTime": 1678975524473,
"payType": 2,
"preSale": 0,
"priorityDelivery": false,
"promiseTimeStampOfDelivery": 1679148324473,
"recvTime": 0,
"refundTime": 1681238763008,
"remark": "",
"remindShipmentSign": 0,
"remindShipmentTime": 0,
"riskCode": 0,
"sellerDelayPromiseTimeStamp": 1679148324473,
"sellerNick": "刻骨铭心的爱情",
"sellerOpenId": "f198f0846993046e14bf572443812bdb",
"sendTime": 0,
"status": 80,
"theDayOfDeliverGoodsTime": 120,
"totalFee": 10,
"updateTime": 1687251104545,
"validPromiseShipmentTimeStamp": 1679148324473
},
"orderDeliveryInfo": {
"enableAppendPackage": false,
"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://u1-201.ecukwai.com/ufile/adsocial/6195808d-8969-46a5-a7e9-bb506c95e856.jpg",
"itemTitle": "专用的回形针",
"itemType": 1,
"num": 1,
"orderItemId": 66728722091220,
"originalPrice": 10,
"price": 10,
"relItemId": 3655213008601,
"relSkuId": 0,
"skuDesc": "白色",
"skuId": 4810616922601,
"skuNick": "",
"warehouseCode": ""
},
"orderLogisticsInfo": [],
"orderNote": {
"orderNoteInfo": [
{
"createTime": 1687251104542,
"note": "备注"
},
{
"createTime": 1687251023282,
"note": "备注"
},
{
"createTime": 1687016607061,
"note": "11了"
},
{
"createTime": 1687016142697,
"note": "我用红"
},
{
"createTime": 1687015636455,
"note": "222222"
},
{
"createTime": 1687015251684,
"note": "222"
},
{
"createTime": 1687006331899,
"note": "vip用户"
}
],
"sellerNote": [
"备注",
"备注",
"11了",
"我用红",
"222222",
"222",
"vip用户"
]
},
"orderRefundList": [
{
"refundId": 2310200046841220,
"refundStatus": 60
}
]
}
],
"pageSize": 1
}
}
result: {
"code": 0,
"message": "ok",
"data": {
"beginTime": 1687155382641,
"cursor": "1687251104545_2307500074108220",
"endTime": 1687616758641,
"orderList": [
{
"orderAddress": {
"city": "济南市",
"cityCode": 3701,
"desensitiseAddress": "**街道文化北路**号城发广场北楼****",
"desensitiseConsignee": "张**",
"desensitiseMobile": "185****8838",
"district": "莱芜区",
"districtCode": 370116,
"encryptedAddress": "~AjbKvY9u2S0CIAjAg1ZIexIqfPKO6hgRo wnDQIiCRhRcW6NTVEjZ+fOGyRmacHH0WduADwFHw5JNjATWxnigFMAE=~1~~",
"encryptedConsignee": "#YM+/f/VLf/VL#Ci1tZXJjaGFudC5vcGVuL hDBEItSgFMAE=#1##",
"encryptedMobile": "$hgj0WBf4KDketN0trlrGWCivd4lGiRW7 tt5isQYOM9XDc8Rpbb63S0kPwlMpFJIjtPxsHeV0SgFMAE=$1$$",
"province": "山东省",
"provinceCode": 37
},
"orderBaseInfo": {
"activityType": 1,
"buyerImage": "http://p5.a.yximgs.com/s1/i/def/head_f.png",
"buyerNick": "A张张💖会计",
"buyerOpenId": "f198f0846993046e14bf572410405c46",
"coType": 0,
"commentStatus": 0,
"cpsType": 1,
"createTime": 1678975518244,
"disableDeliveryReasonCode": [],
"discountFee": 0,
"expressFee": 0,
"oid": 2307500074108220,
"orderSellerRoleInfo": {
"roleId": 2589256601,
"roleName": "刻骨铭心的爱情",
"roleType": 1
},
"payChannel": "ALIPAY_HB",
"payTime": 1678975524473,
"payType": 2,
"preSale": 0,
"priorityDelivery": false,
"promiseTimeStampOfDelivery": 1679148324473,
"recvTime": 0,
"refundTime": 1681238763008,
"remark": "",
"remindShipmentSign": 0,
"remindShipmentTime": 0,
"riskCode": 0,
"sellerDelayPromiseTimeStamp": 1679148324473,
"sellerNick": "刻骨铭心的爱情",
"sellerOpenId": "f198f0846993046e14bf572443812bdb",
"sendTime": 0,
"status": 80,
"theDayOfDeliverGoodsTime": 120,
"totalFee": 10,
"updateTime": 1687251104545,
"validPromiseShipmentTimeStamp": 1679148324473
},
"orderDeliveryInfo": {
"enableAppendPackage": false,
"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://u1-201.ecukwai.com/ufile/adsocial/6195808d-8969-46a5-a7e9-bb506c95e856.jpg",
"itemTitle": "专用的回形针",
"itemType": 1,
"num": 1,
"orderItemId": 66728722091220,
"originalPrice": 10,
"price": 10,
"relItemId": 3655213008601,
"relSkuId": 0,
"skuDesc": "白色",
"skuId": 4810616922601,
"skuNick": "",
"warehouseCode": ""
},
"orderLogisticsInfo": [],
"orderNote": {
"orderNoteInfo": [
{
"createTime": 1687251104542,
"note": "备注"
},
{
"createTime": 1687006331899,
"note": "vip用户"
}
],
"sellerNote": [
"备注",
"vip用户"
]
},
"orderRefundList": [
{
"refundId": 2310200046841220,
"refundStatus": 60
}
]
}
],
"pageSize": 1
}
}
4. 返回字段说明
返回字段说明见官方文档: https://open.kwaixiaodian.com/docs/api?categoryId=43&apiName=open.order.cursor.list&version=1
文档更新时间: 2024-06-07 19:28 作者:admin