请求参数:&contact_name=姓名&province=浙江省&city=杭州市&country=西湖区&town=北山街道&addr=华星路xx号 &zip_code=000000&phoneAreaCode=0790&phone=6711050&mobile_phone=13688889999&is_def=1&auto_clear=0 &token=d42b62b7db6056172687a69c5cb25653
参数说明:token是由小饼干工具返回的token
响应参数
Version: Date:
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
success | String | 0 | true | 成功状态bool值 |
message | String | 0 | 操作成功 | 返回文字 |
code | String | 0 | 0 | 返回代码 |
returnValue | String | 0 | {"deliverId":13619520870} | 返回数据 |
API测试工具
点击申请试用
请求示例
<?php
// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://open.onebound.cn/help/demo/sdk/demo-sign.php
$method = "GET";
$url = "https://api-gw.onebound.cn/taobao/buyer_address_add/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&&contact_name=姓名&province=浙江省&city=杭州市&country=西湖区&town=北山街道&addr=华星路xx号&zip_code=000000&phone=&mobile_phone=13688889999&is_def=1&auto_clear=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));
?>
响应示例
{
data: {
code: "0",
message: "操作成功",
returnValue: "{"deliverId":13633678015}",
success: "true"
},
from: "taobao",
error: "",
reason: "",
error_code: "0000",
cache: 0,
api_info: "today:41 max:10000",
execution_time: 0.89,
server_time: "Beijing/2021-03-17 10:01:18",
client_ip: "127.0.0.1",
call_args: {
contact_name: "姓名",
province: "浙江省",
city: "杭州市",
country: "渝水区",
town: "北山街道",
addr: "华星路xx号",
zip_code: "000000",
phone: "6711049",
mobile_phone: "13688889999",
is_def: "1",
auto_clear: "0"
},
api_type: "taobao",
translate_language: "zh-CN",
translate_engine: "google_cn",
server_memory: "5.52MB",
request_id: "0.605162ed8df15"
}
```
```