# 通过订单号获取订单信息
接口地址: http://www.damaijia168.com/vv/external/mpagingOrders
请求方式: POST
传参方式: JSON
返回格式: JSON
# 请求头参数
| 参数 | 类型 | 必选 | 值 | 示例 |
|---|---|---|---|---|
| Authorization | string | 是 | 授权 access_token | 1798c6aadec33d1bc2f5b707f1049aefexxxx |
# 请求参数
| 参数 | 类型 | 必选 | 描述 |
|---|---|---|---|
| owner_id | string | 是 | 店铺 owner_id |
| order_sns | list | 是 | 订单号 索引数组 ["201117-68", "201117-48"] |
| edition | string | 否 | 版本 默认:1(不传默认为1) 1:1.0,2:2.0 |
# 请求示例
{
"owner_id": "pdd****10",
"order_sns":["201117-6********8", "201117-4********8"],
}
# 请求代码示例
cURL请求代码示例
curl --location --request POST 'http://www.damaijia168.com/vv/external/mpagingOrders' \
--header 'Authorization: f38e89384ea1e8ee1bcxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"owner_id": "pdd****10",
"order_sns": [
"121314414114"
]
}'
PHP请求代码示例
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://www.damaijia168.com/vv/external/mpagingOrders',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"owner_id": "pdd****10",
"order_sns": [
"121314414114"
]
}',
CURLOPT_HTTPHEADER => array(
'Authorization: f38e89384ea1e8ee1bcxxxxxxx',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
JAVA请求代码示例
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"owner_id\": \"pdd****10\",\r\n \"order_sns\": [\r\n \"121314414114\"\r\n ]\r\n}");
Request request = new Request.Builder()
.url("http://www.damaijia168.com/vv/external/mpagingOrders")
.method("POST", body)
.addHeader("Authorization", "f38e89384ea1e8ee1bcxxxxxxx")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Python请求代码示例
import requests
url = "http://www.damaijia168.com/vv/external/mpagingOrders"
payload="{\r\n \"owner_id\": \"pdd****10\",\r\n \"order_sns\": [\r\n \"121314414114\"\r\n ]\r\n}"
headers = {
'Authorization': 'f38e89384ea1e8ee1bcxxxxxxx',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
# 响应参数
| 参数 | 类型 | 描述 |
|---|---|---|
| data | object | 返回数据 |
| --receiver_name | string | 收货人姓名 |
| --receiver_phone | string | 收货人手机号 |
| --province | string | 省 |
| --city | string | 市 |
| --town | string | 区 |
| --receiver_address | string | 详细收货地址 |
| --order_sn | string | 订单号 |
| --goods_name | string | 商品名 |
| --goods_img | string | 商品图片 |
| --is_pre_sale | string | 是否为预售商品 true 是,false 否 |
| --last_ship_time | string | 截止发货时间 |
| --pay_time | string | 订单确认时间 |
| --remark | string | 备注 |
| --goods_count | string | 商品数量 |
| --pay_amount | string | 金额(元) |
| --order_status | string | 订单状态 |
| --remark_tag | string | 评论 |
| --remark_tag_name | string | 评论名字 |
| --deduct_money | int | 消耗点券 |
| status | int | 状态码,0为成功 |
# 返回数据
{
"data": {
"receiverName": "lSDn",
"receiverPhone": "15574757515",
"province": "发的是我*省",
"city": "蜂窝市",
"town": "费伍德区",
"receiverAddress": "详细收货地址",
"order_sn": "订单号",
"goods_name": "商品名",
"goods_img": "商品图片",
"goodsSpec": "商品描述",
"is_pre_sale": false,
"last_ship_time": 1605768641000,
"pay_time": 1605595841000,
"remark": "",
"goods_count": 1,
"pay_amount": 9.9,
"order_status": 1,
"remark_tag": null,
"remark_tag_name": null,
"deduct_money":4
},
"status": 0
}
# 错误码
| 状态码(status) | 错误信息 | 解决方案 |
|---|---|---|
| 132 | 请求格式必须为JSON | 修改请求参数格式为json |
| 422 | 参数列表不合法,在err中会给出提示 | 根据提示做相应修改 |
| 200 | 认证失败 | 请确保请求头里的Authorization存在或者未过期 |