批量获取订单详情
查询单个订单详情(只能获取到成交时间三个月以内的交易信息) 注:虚拟订单充值手机号信息无法通过此接口获取,请联系虚拟类目运营人员。 根据多个订单号获取订单详细信息。
1.请求参数:
参数名 | 类型 | 说明 | 示例 |
---|---|---|---|
appid | String | 合作伙伴AppId | uwkahf@jfs92 |
timestamp | String | 当前时间戳 | |
seller_nick | String | 拼多多卖家账号,非店铺名称 | kingdo |
tids | String | 必填 多个订单号用英文逗号隔开,一次最多100个订单。 | 210317-001532562392221,210304-155155172182221,210324-137383117442221 |
sign | String | 接口签名 | 如何计算生成见示例代码 |
2. 请求示例代码(Java)
@Test
public void PddOrderBatchGet() throws Exception {
String result ="";
String seller_nick = Config.PddSellerNick ; // 拼多多卖家账号
//业务参数
Map<String, String> data = new HashMap<String, String>();
data.put("appid", Config.AppId);
data.put("seller_nick", seller_nick);
data.put("tids", "210317-001532562392221,210304-155155172182221,210324-137383117442221");
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
// 参数签名
data.put("sign", Utils.Sign(data,Config.AppSecret));
doHttpRequest(Config.PddOrderDetailBatchGetUrl,data);
}
3. 返回结果如下:
{
"code": 0,
"message": "ok",
"data": [{
"trade": {
"address": "~AgAAAACsR/YHv69wiQFhT/29eP2rfqPXa++pL1qiYBqbp+zYsnQAMBvBkBga22vn1n+ydwtv1u0ar3h02Y2LuxQRWUTtXkoESTMTTgleI8cgOJZx0jaFypaZPUgc+GBp~qcK29hqe28qdqcK29hqeiuryim3R/hBE/6qd+OmHnAcOCnvZBKe6+Os8CPzrXB4Q57wwFRst~0~~",
"address_mask": "上海市上海市浦东新区东方路*号*",
"after_sales_status": 0,
"buyer_memo": "",
"capital_free_discount": 0,
"card_info_list": [],
"cat_id_1": 16901,
"cat_id_2": 18055,
"cat_id_3": 18056,
"cat_id_4": 0,
"city": "上海市",
"city_id": 321,
"confirm_status": 1,
"confirm_time": "2021-03-04 09:34:57",
"country": "中国",
"country_id": 0,
"created_time": "2021-03-04 09:34:50",
"delivery_one_day": 0,
"discount_amount": 3,
"duoduo_wholesale": 0,
"free_sf": 0,
"goods_amount": 15,
"group_status": 1,
"home_delivery_type": 0,
"id_card_name": "",
"id_card_num": "",
"inner_transaction_id": "",
"invoice_status": 0,
"is_lucky_flag": 1,
"is_pre_sale": 0,
"is_stock_out": 0,
"item_list": [{
"goods_count": 1,
"goods_id": 160210883299,
"goods_img": "https://t16img.yangkeduo.com/garner-api/70ec7360c13688309252f88a9ce49965.jpeg",
"goods_name": "A4白纸一张十圆不支持退货,不要乱拍!",
"goods_price": 15,
"goods_spec": "50cm",
"outer_goods_id": "g100",
"outer_id": "s50cm",
"sku_id": 648106686604
}],
"gift_list": [],
"last_ship_time": "2021-03-06 09:34:57",
"logistics_id": 0,
"mkt_biz_type": 0,
"only_support_replace": 0,
"order_change_amount": 0,
"order_sn": "210304-155155172182221",
"order_status": 1,
"order_tag_list": [{
"name": "delivery_one_day",
"value": 0
}, {
"name": "no_trace_delivery",
"value": 0
}, {
"name": "self_contained",
"value": 0
}, {
"name": "return_freight_payer",
"value": 0
}, {
"name": "free_sf",
"value": 0
}, {
"name": "duoduo_wholesale",
"value": 0
}, {
"name": "support_nationwide_warranty",
"value": 0
}, {
"name": "only_support_replace",
"value": 0
}, {
"name": "oversea_tracing",
"value": 0
}],
"pay_amount": 12,
"pay_no": "",
"pay_time": "2021-03-04 09:34:57",
"pay_type": "",
"platform_discount": 3,
"postage": 0,
"pre_sale_time": "",
"province": "上海市",
"province_id": 25,
"receive_time": "",
"receiver_address": "~AgAAAACsR/YIv69wiQFruwX3Qb0pFnR23/UGhe0EcYo0r48RQAvXagBkBYPiI/OHrjgKl+5s3XGmYUMqnzZWEw==~nAcOCnvZBKe6+Os8CPzrXB4Q57wwFRst~0~~",
"receiver_address_mask": "东方路*号*",
"receiver_name": "~AgAAAACsR/YFv69wiQDFpVhTfTuStqrrC3cklbypc8M=~7rDNKhB7n0mq~0~~",
"receiver_name_mask": "M*r",
"receiver_phone": "$j6CIhOBvrLmR$AgAAAACsR/YGv69wiQB4b1b81+XLs88LutYZp3hD63A=$0$$",
"receiver_phone_mask": "17*******75",
"refund_status": 1,
"remark": "aaf ",
"remark_tag": 1,
"return_freight_payer": 0,
"risk_control_status": 0,
"self_contained": 0,
"seller_discount": 0,
"shipping_time": "",
"shipping_type": 0,
"stock_out_handle_status": -1,
"street": "",
"support_nationwide_warranty": 0,
"town": "浦东新区",
"town_id": 2707,
"tracking_number": "",
"trade_type": 0,
"updated_at": "2021-05-26 17:41:41",
"urge_shipping_time": "",
"yyps_date": "",
"yyps_time": "",
"open_address_id":"mEBYxjcYbLtEMsZrgG9phKxYom+BNtkY0hovKsJgDvmbRiscUT9aqfvmieRS/Edu"
},
"code": 0,
"message": "",
"order_sn": "210304-155155172182221"
}, {
"trade": {
"address": "~AgAAAACsR/YHKKS3PwEGZ2Y5rPrTemGsV6ueLlQp9IwBMSddPv+PXsFY7Wr5qlWL69P3K5j/Mdz4W1XyjbYIPFyuF8jQ38gOs9yPTAp948cW/pwbqy6PPzDFstgduiIq~qcK29hqe28qdqcK29hqeiuryim3R/hBE/6qd+OmHnAcOCnvZBKe6+Os8CPzrXB4Q57wwFRst~0~~",
"address_mask": "上海市上海市浦东新区东方路*号*",
"after_sales_status": 0,
"buyer_memo": "",
"capital_free_discount": 0,
"card_info_list": [],
"cat_id_1": 16901,
"cat_id_2": 18055,
"cat_id_3": 18056,
"cat_id_4": 0,
"city": "上海市",
"city_id": 321,
"confirm_status": 1,
"confirm_time": "2021-03-24 17:13:08",
"country": "中国",
"country_id": 0,
"created_time": "2021-03-24 17:13:01",
"delivery_one_day": 0,
"discount_amount": 0,
"duoduo_wholesale": 0,
"free_sf": 0,
"goods_amount": 15,
"group_status": 1,
"home_delivery_type": 0,
"id_card_name": "",
"id_card_num": "",
"inner_transaction_id": "",
"invoice_status": 0,
"is_lucky_flag": 1,
"is_pre_sale": 0,
"is_stock_out": 0,
"item_list": [{
"goods_count": 1,
"goods_id": 160210883299,
"goods_img": "https://t16img.yangkeduo.com/garner-api/70ec7360c13688309252f88a9ce49965.jpeg",
"goods_name": "A4白纸一张十圆不支持退货,不要乱拍!",
"goods_price": 15,
"goods_spec": "50cm",
"outer_goods_id": "g100",
"outer_id": "s50cm",
"sku_id": 648106686604
}],
"gift_list": [],
"last_ship_time": "2021-03-26 17:13:08",
"logistics_id": 0,
"mkt_biz_type": 0,
"only_support_replace": 0,
"order_change_amount": 0,
"order_sn": "210324-137383117442221",
"order_status": 1,
"order_tag_list": [{
"name": "delivery_one_day",
"value": 0
}, {
"name": "no_trace_delivery",
"value": 0
}, {
"name": "self_contained",
"value": 0
}, {
"name": "return_freight_payer",
"value": 0
}, {
"name": "free_sf",
"value": 0
}, {
"name": "duoduo_wholesale",
"value": 0
}, {
"name": "support_nationwide_warranty",
"value": 0
}, {
"name": "only_support_replace",
"value": 0
}, {
"name": "oversea_tracing",
"value": 0
}],
"pay_amount": 15,
"pay_no": "",
"pay_time": "2021-03-24 17:13:08",
"pay_type": "",
"platform_discount": 0,
"postage": 0,
"pre_sale_time": "",
"province": "上海市",
"province_id": 25,
"receive_time": "",
"receiver_address": "~AgAAAACsR/YIKKS3PwE+XmqOFn4SqIQDnTqSisYEOMzqL1XBFWV9uOMogjt/4nyYP1NjB2OMB6eyGqMZKiF2YA==~nAcOCnvZBKe6+Os8CPzrXB4Q57wwFRst~0~~",
"receiver_address_mask": "东方路*号*",
"receiver_name": "~AgAAAACsR/YFKKS3PwAjCujj9zG8FLc3Gd0/PVDis6M=~7rDNKhB7n0mq~0~~",
"receiver_name_mask": "M*r",
"receiver_phone": "$j6CIhOBvrLmR$AgAAAACsR/YGKKS3PwCm7f3BWpmklrDmXec6rsj52WE=$0$$",
"receiver_phone_mask": "17*******75",
"refund_status": 1,
"remark": "我是通过API接口进来的说明哈22222xx",
"remark_tag": 2,
"return_freight_payer": 0,
"risk_control_status": 0,
"self_contained": 0,
"seller_discount": 0,
"shipping_time": "",
"shipping_type": 0,
"stock_out_handle_status": -1,
"street": "",
"support_nationwide_warranty": 0,
"town": "浦东新区",
"town_id": 2707,
"tracking_number": "",
"trade_type": 0,
"updated_at": "2021-05-26 17:41:34",
"urge_shipping_time": "",
"yyps_date": "",
"yyps_time": "",
"open_address_id":"mEBYxjcYbLtEMsZrgG9phKxYom+BNtkY0hovKsJgDvmbRiscUT9aqfvmieRS/Edu"
},
"code": 0,
"message": "",
"order_sn": "210324-137383117442221"
}, {
"trade": {
"address": "~AgAAAADKncgHZ1vG5ACJOsQ6/+cNns40RoQAm5rajV3aRq6S2N+pYlCe6w73p5RBOQ1x5WuHb021ThChoFmyrJd2VmmQBofDjeNck0hw9E8=~qcK29hqe28qdqcK29hqeiuryim3R/hBE/6qd+OmHnAcOCnvZBKe6+Os8CPzrXB4Q57wwFRst~1~~",
"address_mask": "",
"after_sales_status": 0,
"buyer_memo": "",
"capital_free_discount": 0,
"card_info_list": [],
"cat_id_1": 16901,
"cat_id_2": 18055,
"cat_id_3": 18056,
"cat_id_4": 0,
"city": "上海市",
"city_id": 321,
"confirm_status": 1,
"confirm_time": "2021-03-17 19:16:30",
"country": "中国",
"country_id": 0,
"created_time": "2021-03-17 19:16:21",
"delivery_one_day": 0,
"discount_amount": 0,
"duoduo_wholesale": 0,
"free_sf": 0,
"goods_amount": 15,
"group_status": 1,
"home_delivery_type": 0,
"id_card_name": "",
"id_card_num": "",
"inner_transaction_id": "",
"invoice_status": 0,
"is_lucky_flag": 1,
"is_pre_sale": 0,
"is_stock_out": 0,
"item_list": [{
"goods_count": 1,
"goods_id": 160210883299,
"goods_img": "https://t16img.yangkeduo.com/garner-api/70ec7360c13688309252f88a9ce49965.jpeg",
"goods_name": "A4白纸一张十圆不支持退货,不要乱拍!",
"goods_price": 15,
"goods_spec": "50cm",
"outer_goods_id": "g100",
"outer_id": "s50cm",
"sku_id": 648106686604
}],
"gift_list": [],
"last_ship_time": "2021-03-19 19:16:30",
"logistics_id": 0,
"mkt_biz_type": 0,
"only_support_replace": 0,
"order_change_amount": 0,
"order_sn": "210317-001532562392221",
"order_status": 1,
"order_tag_list": [{
"name": "delivery_one_day",
"value": 0
}, {
"name": "no_trace_delivery",
"value": 0
}, {
"name": "self_contained",
"value": 0
}, {
"name": "return_freight_payer",
"value": 0
}, {
"name": "free_sf",
"value": 0
}, {
"name": "duoduo_wholesale",
"value": 0
}, {
"name": "support_nationwide_warranty",
"value": 0
}, {
"name": "only_support_replace",
"value": 0
}, {
"name": "oversea_tracing",
"value": 0
}],
"pay_amount": 15,
"pay_no": "",
"pay_time": "2021-03-17 19:16:30",
"pay_type": "",
"platform_discount": 0,
"postage": 0,
"pre_sale_time": "",
"province": "上海市",
"province_id": 25,
"receive_time": "",
"receiver_address": "~AgAAAADKncgIZ1vG5AD4ja34hFtnFYFtrLLpE5u6OxPVbmZgSGV7hYKD++1IVX5n~nAcOCnvZBKe6+Os8CPzrXB4Q57wwFRst~1~~",
"receiver_address_mask": "",
"receiver_name": "~AgAAAADKncgFZ1vG5ADCE0BZ7U7R0uFErKDzjRRz1ps=~7rDNKhB7n0mq~1~~",
"receiver_name_mask": "",
"receiver_phone": "$j6CIhOBvrLmR$AgAAAADKncgGZ1vG5ACmHv8bdWk7iR1W6BXbNM5bdsE=$1$$",
"receiver_phone_mask": "",
"refund_status": 1,
"remark": "最近运流没有了,要晚点发222, 用新应用2222",
"remark_tag": 1,
"return_freight_payer": 0,
"risk_control_status": 0,
"self_contained": 0,
"seller_discount": 0,
"shipping_time": "",
"shipping_type": 0,
"stock_out_handle_status": -1,
"street": "",
"support_nationwide_warranty": 0,
"town": "浦东新区",
"town_id": 2707,
"tracking_number": "",
"trade_type": 0,
"updated_at": "2021-03-24 17:05:24",
"urge_shipping_time": "",
"yyps_date": "",
"yyps_time": "",
"open_address_id":"mEBYxjcYbLtEMsZrgG9phKxYom+BNtkY0hovKsJgDvmbRiscUT9aqfvmieRS/Edu"
},
"code": 0,
"message": "",
"order_sn": "210317-001532562392221"
}]
}
说明: code为0表示成功,非0为失败,message会包含失败原因。失败时一定要注意,可能商户授权过期,或是参数有误。 成功时,data包含订单列表的相关信息, 每个订单对象的结构如下。
成功的示例
{
"trade": {
"address": "~AgAAAADKncgHZ1vG5ACJOsQ6/+cNns40RoQAm5rajV3aRq6S2N+pYlCe6w73p5RBOQ1x5WuHb021ThChoFmyrJd2VmmQBofDjeNck0hw9E8=~qcK29hqe28qdqcK29hqeiuryim3R/hBE/6qd+OmHnAcOCnvZBKe6+Os8CPzrXB4Q57wwFRst~1~~",
"address_mask": "",
"after_sales_status": 0,
"buyer_memo": "",
"capital_free_discount": 0 ,
// 订单里其他字段,略
} ,
"code": 0,
"message": "",
"order_sn": "210317-001532562392221"
}
失败的示例
{
"trade": {
"address": "",
"address_mask": "",
"after_sales_status": 0,
"buyer_memo": "",
"capital_free_discount": 0
// 订单里其他字段,略
} ,
"code": 1,
"message": "获取API订单失败:订单不属于当前店铺或订单不存在,订单不属于当前店铺或订单不存在",
"order_sn": "310317-001532562392221"
}
子级的code为每个订单级的说明获取成功,0为成功,失败的话message包含失败的原因,order_sn为传入的订单号。
接口返回字段说明请移步: 拼多多订单详情字段说明
4. 常见问题
4.1 返回的收件人信息为空
拼多多平台为了消费者隐私的安全,如果订单有存在下列情形之一的,订单的收件人信息将不会返回。
a. 订单状态order_status的状态为(2:已发货待签收,3:已签收)。
b. 订单退款状态refund_status 为(3:退款中,4: 退款成功)。
c. 订单风控审核中(risk_control_status=1)。
文档更新时间: 2024-12-01 12:03 作者:admin