API ReferenceShipments
Calculate fee
Estimate shipping fee before creating a shipment.
POST
/v3/bill/calc-feeCalculate shipping fees by weight, COD, cargo value, payment method, and sender/receiver locations.
Auth: Bearer access token
Request body
| Field | Type | Required | Description |
|---|---|---|---|
partner_id | number | No | Partner ID on the customer portal. |
weight | number | Yes | Shipment weight. |
width | number | No | Package width in cm. |
length | number | No | Package length in cm. |
height | number | No | Package height in cm. |
service_id | number | No | Shipping service code when calculating a specific service. |
payment_method_id | number | Yes | Shipping fee payment method. |
cod_amount | number | No | COD amount. |
cargo_value | number | No | Cargo value. |
s_province_id | string | Yes | Sender province/city ID in the new location system. |
s_ward_id | string | Yes | Sender ward ID in the new location system. |
r_province_id | string | Yes | Receiver province/city ID in the new location system. |
r_ward_id | string | Yes | Receiver ward ID in the new location system. |
s_province | string | Legacy | Sender province/city name in the legacy location system. |
s_district | string | Legacy | Sender district name in the legacy location system. |
r_province | string | Legacy | Receiver province/city name in the legacy location system. |
r_district | string | Legacy | Receiver district name in the legacy location system. |
{
"partner_id": 123736,
"weight": 1.3,
"payment_method_id": 10,
"cod_amount": 120000,
"cargo_value": 2000000,
"s_province_id": "79",
"s_ward_id": "27007",
"r_province_id": "01",
"r_ward_id": "00004"
}Response
{
"success": true,
"message": "",
"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"
}
]
}