获取订单列表(增强版)
本接口为增强型订单列表接口,除了订单列表标准的查询条件之外,还可以按买家留言、订单旗帜、卖家备注、宝贝Id等条件查询订单。
说明:
商家首次订购授权后,一般1,2分钟后即可使用本接口,时间取决于商家的历史订单数据多寡。
1.请求参数:
请求URL:
参数名 | 类型 | 必须 | 示例值 | 说明 |
---|---|---|---|---|
appid | String | true | uwkahf@jfs92 | 合作伙伴AppId |
timestamp | String | true | 1633618722 | 当前时间戳 |
seller_nick | String | true | kingdo | 1688账号 |
sign | String | true | 999de41d862efaa6f1084ead3b3ba480 | 如何计算生成见示例代码 |
start_created | Date | true | 查询1个月内交易创建时间开始。格式:yyyy-MM-dd HH:mm:ss | |
end_created | Date | true | 查询交易创建时间结束。格式:yyyy-MM-dd HH:mm:ss | |
buyer_open_uid | String | fasle | 淘宝买家昵称实施模糊化后, 买家唯一身份标识, 此值可传空字符串 | |
status | String | false | 2 | 交易状态,1-> waitbuyerpay:等待买家付款; 2->waitsellersend:等待卖家发货; 3-> waitlogisticstakein:等待物流公司揽件; 4-> waitbuyerreceive:等待买家收货; 5-> waitbuyersign:等待买家签收; 6-> signinsuccess:买家已签收; 7-> confirm_goods:已收货; 8-> success:交易成功; 9-> cancel:交易取消; 10-> terminated:交易终止; 11-> 未枚举:其他状态 |
page_no | int | false | 当前页,默认1 | |
page_size | int | false | 每页大小, 最大500, 每100为一个阶梯 | |
buyer_message | String | false | 买家留言 ,受buyer_message_op控制 | |
buyer_message_op | String | false | 对买家留言的操作。 all 或是不传值,买家留言将不参与查询; eq: 等于 ; ne: 不等于; like: 模糊匹配(包含) | |
seller_memo | String | false | 卖家备注,受seller_memo_op控制 | |
seller_memo_op | String | false | 对卖家备注的操作。 all 或是不传值,卖家备注将不参与查询; eq: 等于 ; ne: 不等于; like: 模糊匹配(包含) | |
seller_flag | int | false | 订单旗帜不传入,表示全部 。 0: 默认(即没有插过旗) 1为红色图标,2为蓝色图标,3为绿色图标,4为黄色图标 | |
num_iid | long | false | 商品id | |
tid | string | false | 订单号, 如果多个订单号,请用英文逗号”,”隔开 | |
refunding | long | false | 订单退款状态,默认为全部 , 0: 表示没有退款中的订单, 1:表示有退款中的订单 | |
date_type | int | false | 查询时间(start_created和end_created)的时间类型, 0:按订单创建时间查询 ,1 :按订单更新时间查询 | |
order_asc | String | false | 查询时间(start_created和end_created)的排序,DESC:按时间降序返回,ASC: 按时间升序返回 | |
sysid | String | 100 | 可空, 默认105 |
2. 请求示例代码(Java)
@Test
public void TaoBaoOrderExtList() throws Exception {
String seller_nick = Config.alibabaSellerNick;
//业务参数
Map<String, String> data = new HashMap<String, String>();
data.put("appid", Config.AppId);
data.put("seller_nick", seller_nick);
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
data.put("start_created", "2024-05-28 00:00:00");
data.put("end_created", "2024-05-30 23:10:59");
// data.put("date_type", "1");
// data.put("order_asc", "DESC");
data.put("status", "2");
// data.put("buyer_message_op", "ne");
// data.put("buyer_message", "不要搞错");
// data.put("seller_memo_op", "like");
// data.put("seller_memo", "加急发货");
// data.put("seller_flag", "1");
// data.put("refunding", "1");
// data.put("tid", "2494295280998769316");
data.put("page_no", "1");
data.put("page_size", "10");
data.put("sign", Utils.Sign(data, Config.AppSecret));
// 调用服务API
String response = doHttpRequest(Config.AlibabaOrderExtListUrl, data);
}
3. 返回结果
返回结果如下
{
"code": 0,
"message": "ok",
"data": {
"total": 62,
"items": [
{
"nativeLogistics": {
"caid": "DE3q8ISo6sQMaHHHMC6Qv86mUh9c4z3DficPCN53AXyN1v0iavJsBu7Hj5kiabJHM2ibicejSZo-DnZxQpIicj880g22RO3dxkVwa2sia7eym0Hu9zhYy0ibibIVSCyqx0aCCBicOKL1WHdttL",
"address": "某条路路*弄*号*室",
"area": "杨浦区",
"areaCode": "310110",
"city": "上海市",
"contactPerson": "张*",
"mobile": "151****0000",
"province": "上海",
"zip": "000000"
},
"productItems": [
{
"productID": 787976764203,
"guaranteesTerms": [
{
"assuranceInfo": "卖家承诺买家签收货物后7天内,在“商品完好”的情形下,向买家提供退货服务。",
"assuranceType": "qtwlybt",
"qualityAssuranceType": "7天无理由退货",
"shortCode": "qtwlybt"
},
{
"shortCode": "qtwlybt_2"
},
{
"assuranceInfo": "卖家在承诺买家保障服务的基础上,向买家提供“48小时发货延必赔”的服务。在买家通过支付宝担保交易完成付款或通过货到付款下单成功后,卖家承诺在买家支付成功起48小时内发货。如卖家未履行前述承诺,买家可在指定期限内发起维权,并申请赔付。",
"assuranceType": "ssbxsfh",
"qualityAssuranceType": "48小时发货",
"shortCode": "D"
},
{
"shortCode": "D_2"
},
{
"assuranceInfo": "“在符合一定的退款申请原因、时效和退款金额范围内,可享受0秒退款服务。",
"assuranceType": "jstk_p",
"qualityAssuranceType": "极速退款",
"shortCode": "jstk_p"
}
],
"type": "common",
"orderSharedPromotionFee": "0",
"price": "69",
"tbId": 3876532491612498400,
"specId": "333ed9840c8b0521e492370e5345dbbe",
"subItemID": 3876532491612498400,
"skuInfos": [
{
"name": "颜色",
"value": "黑白方格"
},
{
"name": "尺码",
"value": "26/S"
}
],
"itemDiscountFee": "0",
"quantityFactor": "1",
"unit": "件",
"name": "超薄裙子女夏季2024新款半身裙薄款长款冰丝百搭显瘦时尚潮流裙裤",
"status": "waitsellersend",
"gmtModified": "20240506162940000+0800",
"productImgUrl": [
"http://cbu01.alicdn.com/img/ibank/O1CN01dvssfP1Bs2xInkFlU_!!0-0-cib.80x80.jpg",
"http://cbu01.alicdn.com/img/ibank/O1CN01dvssfP1Bs2xInkFlU_!!0-0-cib.jpg"
],
"statusStr": "等待卖家发货",
"actualPaidFee": 6900,
"crossPromotionFee": "0",
"productSnapshotUrl": "https://trade.1688.com/order/offer_snapshot.htm?order_entry_id=3876532491612498520",
"itemAmount": "69",
"quantity": 1,
"subItemIDString": "3876532491612498520",
"gmtCreate": "20240506162935000+0800",
"productCargoNumber": "YYSP2017A33",
"logisticsStatus": 1,
"skuID": 5549191331204
},
{
"productID": 792892854846,
"guaranteesTerms": [
{
"assuranceInfo": "卖家承诺买家签收货物后7天内,在“商品完好”的情形下,向买家提供退货服务。",
"assuranceType": "qtwlybt",
"qualityAssuranceType": "7天无理由退货",
"shortCode": "qtwlybt"
},
{
"shortCode": "qtwlybt_2"
},
{
"assuranceInfo": "卖家在承诺买家保障服务的基础上,向买家提供“24小时发货延必赔”的服务。在买家通过支付宝担保交易完成付款或通过货到付款下单成功后,卖家承诺在买家支付成功起24小时内发货。如卖家未履行前述承诺,买家可在指定期限内发起维权,并申请赔付。",
"assuranceType": "essxsfh",
"qualityAssuranceType": "24小时发货",
"shortCode": "C"
},
{
"shortCode": "C_2"
},
{
"assuranceInfo": "“在符合一定的退款申请原因、时效和退款金额范围内,可享受0秒退款服务。",
"assuranceType": "jstk_p",
"qualityAssuranceType": "极速退款",
"shortCode": "jstk_p"
}
],
"type": "common",
"orderSharedPromotionFee": "0",
"price": "24",
"tbId": 3876532491613498400,
"specId": "84e7ee080deb9ae2225ed81b66f81aa8",
"subItemID": 3876532491613498400,
"skuInfos": [
{
"name": "颜色",
"value": "黑紫"
},
{
"name": "尺码",
"value": "35"
}
],
"itemDiscountFee": "0",
"quantityFactor": "1",
"unit": "双",
"name": "2024跨境新款大码35-45tenis橡胶袜子鞋户外旅游运动女鞋",
"status": "waitsellersend",
"gmtModified": "20240506162940000+0800",
"productImgUrl": [
"http://cbu01.alicdn.com/img/ibank/O1CN01L1z3cB1Bs2wNiLl2H_!!0-0-cib.80x80.jpg",
"http://cbu01.alicdn.com/img/ibank/O1CN01L1z3cB1Bs2wNiLl2H_!!0-0-cib.jpg"
],
"statusStr": "等待卖家发货",
"actualPaidFee": 2400,
"crossPromotionFee": "0",
"productSnapshotUrl": "https://trade.1688.com/order/offer_snapshot.htm?order_entry_id=3876532491613498520",
"itemAmount": "24",
"quantity": 1,
"subItemIDString": "3876532491613498520",
"gmtCreate": "20240506162935000+0800",
"productCargoNumber": "1855",
"logisticsStatus": 1,
"skuID": 5415467545150
}
],
"extAttributes": [
{
"value": "0",
"key": "b_i24h"
},
{
"value": "0",
"key": "b_i48h"
}
],
"orderRateInfo": {
"buyerRateStatus": 5,
"sellerRateStatus": 5
},
"baseInfo": {
"businessType": "cn",
"createTime": "20240506162935000+0800",
"id": 3876532491611498500,
"modifyTime": "20240506162940000+0800",
"shippingFee": "4.3",
"status": "waitsellersend",
"totalAmount": "97.3",
"discount": "0",
"buyerContact": {
"phone": "86-************555",
"imInPlatform": "a*",
"name": "服*",
"companyName": "AOP对外xxx"
},
"tradeType": "50060",
"idOfStr": "3876532491611498520",
"buyerLoginId": "a*",
"sellerLoginId": "a*",
"buyerAlipayId": "2088611492691533",
"sellerAlipayId": "2088522185245811",
"sumProductPayment": "93",
"flowTemplateCode": "assureTrade",
"buyerLevel": "L6",
"sellerContact": {
"phone": "8-888-5676544",
"imInPlatform": "a*",
"name": "测试xxxx",
"companyName": "xxxxxxxx"
},
"newStepOrderList": [
{
"gmtStart": "20240506162935000+0800",
"stepNo": 1,
"lastStep": true,
"stepName": "全款交易",
"activeStatus": 1,
"payStatus": 2,
"logisticsStatus": 1,
"payFee": "97.3",
"paidFee": "97.3",
"adjustFee": "0",
"discountFee": "0",
"postFee": "4.3",
"paidPostFee": "4.3"
}
],
"couponFee": "0",
"tradeTypeDesc": "4.0担保交易",
"payChannelList": ["账期支付"],
"tradeTypeCode": "assureTrade",
"payChannelCodeList": ["account_period"],
"ccid": "MDdZp3lhWD0ZM7+H18C1gUqTHL2PxBomkdlTsuHnQ28wc=",
"buyerOpenUid": "BBBSfGKuvWKXzU1nn-VGpGISA",
"payTime": "20240506162941000+0800"
}
}
]
}
}
说明: code为0表示成功,非0为失败,message会包含失败原因。total为符合查询的总记录数,可根据返回的总记录数进行分页查询, data字段包含订单列表的数据, 返回的字段说明见文档
文档更新时间: 2024-09-06 18:22 作者:admin