淘宝获取购买到的商品订单详情PHP展示

91 阅读2分钟

API 返回值说明

API接口名称:

buyer_order_detail-获取购买到的商品订单详情

请求参数: order_id=&onlystatus=0

参数说明: order_id:订单ID
token:SaaS授权

获取API测试接口

响应参数:

Version: Date:

名称类型必须示例值描述
take_babyString0
payment_alipayString0支付宝
seller_deliveryString0卖家收货地址
confirm_timeString0确认时间
evaluate_timeString0评价时间
delivery_countdownString0商品到达剩余时间
trade_statusString0订单状态: 交易成功交易状态
delivery_wayString0logistic送货方式
logistics_companyString0顺丰速运物流公司
waybillBigint076743627xxxx运单号码
logistics_followString0顺丰速运物流跟踪
delivery_addrBigint0peng,19900001111,江西省 新余市 渝水区 城北街道 人民北路313号 ,338000收货地址
buyer_messageString0-买家备注
seller_nameString0selected官方旗舰店卖家昵称
seller_real_nameString0绫致时装销售(天津)有限公司卖家实名
seller_cityString0天津卖家所在城市
seller_phoneString0400-8001234客服电话
order_numBigint0298482016040012345订单号
alipay_numBigint02018121622001168940583001234支付宝订单号
goodsMix0[{"auction_url": "//trade.taobao.com/trade/detail/tradeSnap.htm?tradeID=29848201604571xxxx", "goods_id": null, "goods_img": "//img.alicdn.com/imgextra/i1/849905958/O1CN011tsoDu6YZLBaF7F_!!849905958.jpg", "goods_name": "Selected/斯莱德马海毛羊毛混纺色块男士毛衫", "goods_info": [{"name": "颜色", "value": "碳花灰色CHARCOAL MELANGE"}], "goods_status": "交易成功", "unit_price": "349.50", "goods_count": "1", "discount": null }]商品信息
goods_moneyString0¥100.00商品金额
logistics_moneyString0¥0.00物流费用
total_moneyString0¥100.00总金额
real_moneyString0¥100.00实际支付金额
stepbarMix0{"current": 3, "options": [{"content": "拍下商品", "time": "2018-12-16 22:37:58"}, {"content": "付款到支付宝", "time": "2018-12-16 22:38:31"}, {"content": "卖家发货", "time": "2018-12-17 09:19:55"}, {"content": "确认收货", "time": "2019-01-01 09:20:07"}, {"content": "评价"} ]]步骤

请求示例:

<?php

// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://open.onebound.cn/help/demo/sdk/demo-sign.php
$method = "GET";
$url = "https://api-gw.onebound.cn/taobao/buyer_order_detail/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&order_id=&onlystatus=0";
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_ENCODING, "gzip");
var_dump(curl_exec($curl));
?>
```
```