# 自动发货
接口地址: http://www.damaijia168.com/vv/external/pinAutomaticDelivery
请求方式: POST
传参方式: JSON
返回格式: JSON
# 请求头参数
| 参数 | 类型 | 必选 | 值 | 示例 |
|---|---|---|---|---|
| Authorization | string | 是 | 授权 access_token | 1798c6aadec33d1bc2f5b707f1049aefexxxx |
# 请求参数
| 参数 | 类型 | 必选 | 描述 |
|---|---|---|---|
| orderNo | string | 是 | 订单编号 |
| sellerId | string | 是 | 商家 id |
| wpCode | string | 是 | 快递编号 |
| waybillNo | string | 是 | 面单号 |
# 请求示例
{
"orderNo": "12********188",
"sellerId": "26*******2",
"wpCode": "32*****9995xxx",
"waybillNo": "5854****549XXX"
}
# 请求代码示例
cURL请求代码示例
curl --location --request POST 'http://www.damaijia168.com/vv/external/pinAutomaticDelivery' --header 'Authorization: 1798c6aadec33d1bc2f5b707f1049aefexxxx' --header 'Content-Type: application/json' --data-raw '{
"orderNo": "12********188",
"sellerId": "26*******2",
"wpCode": "32*****9995xxx",
"waybillNo": "5854****549XXX"
}'
PHP请求代码示例
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://www.damaijia168.com/vv/external/pinAutomaticDelivery',
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 =>'{
"orderNo": "12********188",
"sellerId": "26*******2",
"wpCode": "32*****9995xxx",
"waybillNo": "5854****549XXX"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: 1798c6aadec33d1bc2f5b707f1049aefexxxx',
'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\"orderNo\": \"12********188\",\r\n\"sellerId\": \"26*******2\",\r\n\"wpCode\": \"32*****9995xxx\",\r\n\"waybillNo\": \"5854****549XXX\"\r\n}");
Request request = new Request.Builder()
.url("http://www.damaijia168.com/vv/external/pinAutomaticDelivery")
.method("POST", body)
.addHeader("Authorization", "1798c6aadec33d1bc2f5b707f1049aefexxxx")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Python请求代码示例
import requests
import json
url = "http://www.damaijia168.com/vv/external/pinAutomaticDelivery"
payload = json.dumps({
"orderNo": "12********188",
"sellerId": "26*******2",
"wpCode": "32*****9995xxx",
"waybillNo": "5854****549XXX"
})
headers = {
'Authorization': '1798c6aadec33d1bc2f5b707f1049aefexxxx',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
# 响应参数
| 参数 | 类型 | 描述 |
|---|---|---|
| data | object | 返回数据 |
| ----orderNo | string | 订单号 |
| ----success | string | true 为成功,false 为失败 |
| ----message | string | 异常信息 |
| ----fahuoTime | string | 发货时间 |
| ----amount | int | 消耗点券 |
| status | int | 状态码,0为成功 |
# 返回数据
{
"data": {
"orderNo": "12644*******8",
"success": true,
"message": "",
"fahuoTime": "2021-03-24"
},
"status": 0
}
# 错误码
| 状态码(status)) | 错误说明 |
|---|---|
| 1003 | 用户不存在 |
| 132 | 请求格式必须为JSON |
| 422 | 参数列表不合法,在err中会给出提示 |
| 200 | 认证失败 |
| 202 | 商品id不合法 |
| 203 | 仓库id不合法 |
| 228 | 订单来源不合法 |
| 217 | 创建订单失败 |
| 212 | 包裹id不合法 |
| 209 | 账户余额不足 |