Calculate Price
API Configuration
HTTP Request
POST /v1/bill/calc-fee
No. | Parameter | Type | Require | Description |
---|---|---|---|---|
1 | partner_id | int | ID of partner. That registration on https://khachhang.ntlogistics.vn/ (opens in a new tab) | |
2 | weight | Double | Estimated Weight of packages measured by client | |
3 | width | Double | Width of Package in Total (Measured in cm,Default 0) | |
4 | length | Double | Length of Package in Total (Measured in cm,Default 0) | |
5 | height | Double | Height of Package in Total (Measured in cm,Default 0) | |
6 | service_id | Number | If yes, return the correct service, if not, return all services | |
7 | payment_method_id | Number | Payment Method Id | |
8 | cod_amount | Double | Amount of COD to collect when package delivered to receiver | |
9 | cargo_value | Double | Breif value of Package Product Items | |
10 | s_province | String | Province of sender | |
11 | s_district | String | District of sender | |
12 | r_province | String | Province of receiver | |
13 | r_district | String | District of receiver |
JSON body respone
Name | Type | Description |
---|---|---|
success | boolean | Return true if calculate success, all other false means error. See message for further description. |
message | string | Return Message of API Respond. |
data | object | Data of API response. |
Request
{
"partner_id": 123736,
"weight": 1.3,
"payment_method_id": 10,
"cod_amount": 120000,
"cargo_value": 2000000,
"s_province": "Hồ Chí Minh",
"s_district": "Tân Bình",
"r_province": "Hà Nội",
"r_district": "Thanh Xuân",
}
Response
{
"success": true,
"messsage": "",
"data": [
{
"weight": 3,
"total_fee": 109910,
"main_fee": 109910,
"insur_fee": 0,
"remote_fee": 0,
"cod_fee": 0,
"service_id": 21,
"service_name": "MES",
"lead_time": "31/08/2021 23:10"
},
{
"weight": 3,
"total_fee": 66152,
"main_fee": 66152,
"insur_fee": 0,
"remote_fee": 0,
"cod_fee": 0,
"service_id": 20,
"service_name": "Đường bộ",
"lead_time": "02/09/2021 11:10"
},
{
"weight": 3,
"total_fee": 301158,
"main_fee": 301158,
"insur_fee": 0,
"remote_fee": 0,
"cod_fee": 0,
"service_id": 11,
"service_name": "Hỏa tốc",
"lead_time": "29/08/2021 09:10"
},
{
"weight": 3,
"total_fee": 146589,
"main_fee": 146589,
"insur_fee": 0,
"remote_fee": 0,
"cod_fee": 0,
"service_id": 10,
"service_name": "CPN",
"lead_time": "29/08/2021 11:10"
}
]
}