4.请求
4.1 请求参数
| 参数 |
类型 |
说明 |
必填 |
备注 |
| token |
string |
会员TOKEN |
Y |
|
| receiver_city |
string |
收件人所在城市名称 |
Y |
|
| receiver_state |
string |
收件人所在区域 |
Y |
|
| receiver_addr |
string |
收件人的详细收货地址,包含街道门牌号 |
Y |
|
| receiver_code |
string |
收件人邮编 |
Y |
|
| pkg[0][weight] |
string |
包裹重量数值,用于运费计算 |
Y |
单位:kg |
| pkg[0][long] |
string |
包裹长度尺寸,用于体积计算 |
Y |
单位:cm |
| pkg[0][width] |
string |
包裹宽度尺寸,用于体积计算 |
Y |
单位:cm |
| pkg[0][height] |
string |
包裹高度尺寸,用于体积计算 |
Y |
单位:cm |
| pkg[1][weight] |
string |
包裹重量数值,用于运费计算 |
Y |
单位:kg |
| pkg[1][long] |
string |
包裹长度尺寸,用于体积计算 |
Y |
单位:cm |
| pkg[1][width] |
string |
包裹宽度尺寸,用于体积计算 |
Y |
单位:cm |
| pkg[1][height] |
string |
包裹高度尺寸,用于体积计算 |
Y |
单位:cm |
4.2 请求示例
[
"token"=>'d9d1d2408b6d1f7a4ce89c1b1de636a5'
"receiver_city"=>'Auckland'
"receiver_state"=>'Henderson'
"receiver_addr"=>'20 Heremai Street'
"receiver_code"=>'0612'
"pkg":
[
[
"weight"=>"1.8",
"long"=>'30',
"width"=>'18'
"height"=>'12'
]
[
"weight"=>"2",
"long"=>'25',
"width"=>'15'
"height"=>'16'
]
]
]
6.返回
6.1 返回参数
| 参数 |
说明 |
备注 |
| sts |
成功代码 |
1:成功,0:失败 |
| data[carrierName] |
名称 |
NZPost Domestic |
| data[carrierMethodId] |
Id |
CPOLp |
| data[totalPrice] |
总价格 |
11.81, |
| data[totalGst] |
总GST |
1.77 |
| data[carrierLogo] |
Logo |
/content/images/Ncp format.png" |
6.1.1 成功返回示例
{
"sts": 1,
"msg": "success",
"code": "200",
"data": {
"carrierName": "NZPost Domestic",
"carrierMethodId": "CPOLp",
"totalPrice": "23.62",
"carrierLogo": "/content/images/Ncp format.png",
}
}
6.1.2 失败返回示例
{
"sts": 0,
"msg": "[400] The request is missing the mandatory field with the name state. Please resubmit the request including the required fields and values.",
"code": "200",
}