# 根据订单号同步
接口地址: http://www.damaijia168.com/vv/external/pinSynchronization
请求方式: POST
传参方式: JSON
返回格式: JSON
# 请求头参数
| 参数 | 类型 | 必选 | 值 | 示例 |
|---|---|---|---|---|
| Authorization | string | 是 | 授权 access_token | 1798c6aadec33d1bc2f5b707f1049aefexxxx |
# 请求参数
| 参数 | 类型 | 必选 | 描述 |
|---|---|---|---|
| orderSns | string | 是 | 订单号 |
| ownerId | string | 是 | 商家 id |
# 请求示例
{
"orderSns": "126446******188",
"ownerId":"2******64"
}
# 请求代码示例
cURL请求代码示例
curl --location --request POST 'http://www.damaijia168.com/vv/external/pinSynchronization' --header 'Authorization: 1798c6aadec33d1bc2f5b707f1049aefexxxx' --header 'Content-Type: application/json' --data-raw '{
"orderSns": "126446******188",
"ownerId":"2******64"
}'
PHP请求代码示例
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://www.damaijia168.com/vv/external/pinSynchronization',
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 =>'{
"orderSns": "126446******188",
"ownerId":"2******64"
}',
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\"orderSns\": \"126446******188\",\r\n\"ownerId\":\"2******64\"\r\n}");
Request request = new Request.Builder()
.url("http://www.damaijia168.com/vv/external/pinSynchronization")
.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/pinSynchronization"
payload = json.dumps({
"orderSns": "126446******188",
"ownerId":"2******64"
})
headers = {
'Authorization': '1798c6aadec33d1bc2f5b707f1049aefexxxx',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
# 响应参数
| 参数 | 类型 | 描述 |
|---|---|---|
| data | object | 返回数据 |
| ----success | bool | true 成功,false 为失败 |
| ----amount | int | 消耗点券 |
| status | int | 状态码,0为成功 |
# 返回数据
{
"data": {
"success":true
},
"status": 0
}
# 错误码
| 状态码(status)) | 错误说明 |
|---|---|
| 0 | 成功,旺旺号不存在也会扣费 |
| 1003 | 用户不存在 |
| 132 | 请求格式必须为JSON |
| 422 | 参数列表不合法,在err中会给出提示 |
| 200 | 认证失败 |
| 202 | 商品id不合法 |
| 203 | 仓库id不合法 |
| 228 | 订单来源不合法 |
| 217 | 创建订单失败 |
| 212 | 包裹id不合法 |
| 209 | 账户余额不足 |
← 4_获取面单[智能订单] 6_自动发货 →