批量获取订单详情
根据多个订单号获取订单详情信息,一次最多可获取200个订单,建议控制在50左右。
关于订单字段一些特殊说明,见“批量获取订单详情”
1.请求参数:
请求URL:
参数名 | 类型 | 说明 | 示例 |
---|---|---|---|
appid | String | 合作伙伴AppId | uwkahf@jfs92 |
timestamp | String | 当前时间戳 | |
tb_seller_nick | String | 淘宝卖家店铺登录账号,非店铺名称 | kingdo |
sign | String | 接口签名 | 如何计算生成见示例代码 |
tids | String | 必填, 订单号,多个订单用英文逗号隔开,最多传入200个订单号 | |
sysid | String | 可空, 代表不同的应用,具体请咨询客服 |
2. 请求示例代码(Java)
@Test
public void getTradeDetailBatch() throws Exception {
String tb_seller_nick = Config.TBSellerNick ;
//业务参数
Map<String, String> data = new HashMap<String, String>();
data.put("appid", Config.AppId);
data.put("tb_seller_nick", tb_seller_nick);
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
data.put("tids", "1702708671154565830,1645829892702565830,1024065443098565830");
// data.put("sysid", ""); 传什么参数请咨询客服
data.put("sign", Utils.Sign(data,Config.AppSecret));
// 调用服务API
doHttpRequest(Config.TaoBaoOrderDetailBatchUrl ,data);
}
3. 返回结果如下:
{
"code": 0,
"message": "ok",
"data": [{
"request_id": "5imiyhkoxyk4",
"trade": {
"adjust_fee": "0.00",
"alipay_no": "2021081622001125781408521342",
"buyer_area": "上海上海杨浦区 电信",
"buyer_nick": "babyjune1031",
"buyer_obtain_point_fee": 0,
"buyer_open_uid": "AAFL90gYAAjcqSrFKsJKeeNU",
"buyer_rate": false,
"buyer_message": "",
"cod_fee": "0.00",
"cod_status": "NEW_CREATED",
"created": "2021-08-16 12:18:12",
"discount_fee": "0.00",
"paid_coupon_fee": "",
"order_tax_fee": "",
"credit_card_fee": "",
"coupon_fee": 0,
"is_brand_sale": false,
"is_force_wlb": false,
"is_lgtype": false,
"modified": "2021-10-02 17:33:52",
"new_presell": false,
"num": 1,
"num_iid": 544876335798,
"orders": {
"order": [{
"adjust_fee": "0.00",
"buyer_rate": false,
"cid": 50015766,
"discount_fee": "0.00",
"divide_order_fee": "1.50",
"is_daixiao": false,
"is_oversold": false,
"nr_outer_iid": "lianhua007",
"num": 1,
"num_iid": 544876335798,
"oid": "2033338106895029566",
"oid_str": "2033338106895029566",
"order_from": "WAP,WAP",
"outer_iid": "lianhua007",
"outer_sku_id": "white35",
"payment": "6.50",
"pic_path": "https://img.alicdn.com/bao/uploaded/i2/661153176/TB23bWverBmpuFjSZFuXXaG_XXa_!!661153176.jpg",
"price": "1.50",
"refund_status": "NO_REFUND",
"seller_rate": true,
"seller_type": "C",
"sku_id": "3977338583166",
"sku_properties_name": "尺码:35;颜色:white",
"snapshot_url": "t:2033338106895029566_1",
"status": "TRADE_FINISHED",
"title": "联华超市提取货券xx",
"total_fee": "1.50",
"invoice_no": "",
"logistics_company": "",
"part_mjz_discount": "",
"fqg_num": 0,
"is_fqg_s_fee": false,
"recharge_fee": "",
"credit_buy": "",
"consign_time": "2021-09-02 17:33:46",
"modified": "",
"refund_id": "",
"end_time": "2021-10-02 17:33:53",
"shipping_type": "post"
}]
},
"pay_time": "2021-08-16 12:18:27",
"payment": "6.50",
"pic_path": "https://img.alicdn.com/bao/uploaded/i2/661153176/TB23bWverBmpuFjSZFuXXaG_XXa_!!661153176.jpg",
"point_fee": 0,
"post_fee": "5.00",
"price": "1.50",
"real_point_fee": 0,
"received_payment": "6.50",
"receiver_address": "陆**街道**路***弄菊**号楼***室",
"receiver_city": "上海市",
"receiver_district": "浦东新区",
"receiver_mobile": "*******5337",
"receiver_phone": "",
"receiver_name": "杨**",
"receiver_state": "上海",
"receiver_zip": "000000",
"seller_flag": 5,
"seller_memo": "22222",
"seller_nick": "百鞋馆",
"seller_rate": true,
"shipping_type": "post",
"status": "TRADE_FINISHED",
"tid": "2033338106895029566",
"tid_str": "2033338106895029566",
"title": "d[s64535320]",
"total_fee": "1.50",
"type": "fixed",
"you_xiang": false,
"trade_from": "WAP,WAP",
"app_name": "",
"oaid": "1PjcOod9IAtwHtENzrOaUvfib0fAJ4KtTWPqPx95ax2qkHdwAJSOx15ftG788mDK0vOdz7t",
"consign_time": "2021-09-02 17:33:46",
"has_post_fee": false,
"timeout_action_time": "",
"snapshot_url": "t:2033338106895029566_1",
"end_time": "2021-10-02 17:33:53",
"platform_subsidy_fee": "0.00"
},
"tid": "2033338106895029566",
"code": 0,
"message": "success"
}, {
"request_id": "5imiyhkoxyk4",
"trade": {
"adjust_fee": "0.00",
"alipay_no": "2021072122001164271452798327",
"buyer_area": "上海上海杨浦区 电信",
"buyer_nick": "supercode",
"buyer_obtain_point_fee": 0,
"buyer_open_uid": "AAGM90gYAAjcqSrFKsJi7Izh",
"buyer_rate": false,
"buyer_message": "",
"cod_fee": "0.00",
"cod_status": "NEW_CREATED",
"created": "2021-07-21 17:47:16",
"discount_fee": "0.00",
"paid_coupon_fee": "",
"order_tax_fee": "",
"credit_card_fee": "",
"coupon_fee": 0,
"is_brand_sale": false,
"is_force_wlb": false,
"is_lgtype": false,
"modified": "2021-09-03 09:35:33",
"new_presell": false,
"num": 1,
"num_iid": 544876335798,
"orders": {
"order": [{
"adjust_fee": "0.00",
"buyer_rate": false,
"cid": 50015766,
"discount_fee": "0.00",
"divide_order_fee": "5.00",
"is_daixiao": false,
"is_oversold": false,
"nr_outer_iid": "lianhua007",
"num": 1,
"num_iid": 544876335798,
"oid": "1966873069415565830",
"oid_str": "1966873069415565830",
"order_from": "WAP,WAP",
"outer_iid": "lianhua007",
"outer_sku_id": "red36",
"payment": "10.00",
"pic_path": "https://img.alicdn.com/bao/uploaded/i2/661153176/TB23bWverBmpuFjSZFuXXaG_XXa_!!661153176.jpg",
"price": "5.00",
"refund_status": "SUCCESS",
"seller_rate": false,
"seller_type": "C",
"sku_id": "3977338583163",
"sku_properties_name": "尺码:36;颜色:red",
"snapshot_url": "t:1966873069415565830_1",
"status": "TRADE_CLOSED",
"title": "联华超市提取货券xx",
"total_fee": "5.00",
"invoice_no": "",
"logistics_company": "",
"part_mjz_discount": "",
"fqg_num": 0,
"is_fqg_s_fee": false,
"recharge_fee": "",
"credit_buy": "",
"consign_time": "",
"modified": "",
"refund_id": "127495153056563058",
"end_time": "2021-09-03 09:35:33",
"shipping_type": ""
}]
},
"pay_time": "2021-07-21 17:47:18",
"payment": "10.00",
"pic_path": "https://img.alicdn.com/bao/uploaded/i2/661153176/TB23bWverBmpuFjSZFuXXaG_XXa_!!661153176.jpg",
"point_fee": 0,
"post_fee": "5.00",
"price": "5.00",
"real_point_fee": 0,
"received_payment": "0.00",
"receiver_address": "陆**街道**路***号****室",
"receiver_city": "上海市",
"receiver_district": "浦东新区",
"receiver_mobile": "*******2303",
"receiver_phone": "",
"receiver_name": "陈**",
"receiver_state": "上海",
"receiver_zip": "200120",
"seller_flag": 2,
"seller_memo": "效果还是很快的222222222",
"seller_nick": "百鞋馆",
"seller_rate": false,
"shipping_type": "post",
"status": "TRADE_CLOSED",
"tid": "1966873069415565830",
"tid_str": "1966873069415565830",
"title": "d[s64535320]",
"total_fee": "5.00",
"type": "fixed",
"you_xiang": false,
"trade_from": "WAP,WAP",
"app_name": "",
"oaid": "1h12M4LqkhUkt1ibEk6VyZv2gRsECYSQayzH33CwBP1s3CmlhJx18fN3CCL8zKx9v5icW2vib",
"consign_time": "",
"has_post_fee": false,
"timeout_action_time": "",
"snapshot_url": "t:1966873069415565830_1",
"end_time": "2021-09-03 09:35:33",
"platform_subsidy_fee": "0.00",
"buyer_open_uid":"AAEt90gYAAjcqSrFKsJnK_Ba"
},
"tid": "1966873069415565830",
"code": 0,
"message": "success"
}],
"trace_id": ""
}
返回订单中各字段含义参考淘宝订单详情接口,二者相同。
说明: 外层code为0表示成功,非0为失败,message会包含失败原因。 data字段为返回的订单集合,包含对应各个订单的信息。 注意:获取失败的订单也将加入返回集合,内层的code为0表示获取订单表示获取订单失败。
文档更新时间: 2023-09-28 16:39 作者:admin