Nhất Tín LogisticsDevelopers
API ReferenceShipments

Calculate fee

Estimate shipping fee before creating a shipment.

POST/v3/bill/calc-fee

Calculate shipping fees by weight, COD, cargo value, payment method, and sender/receiver locations.

Auth: Bearer access token

Request body

FieldTypeRequiredDescription
partner_idnumberNoPartner ID on the customer portal.
weightnumberYesShipment weight.
widthnumberNoPackage width in cm.
lengthnumberNoPackage length in cm.
heightnumberNoPackage height in cm.
service_idnumberNoShipping service code when calculating a specific service.
payment_method_idnumberYesShipping fee payment method.
cod_amountnumberNoCOD amount.
cargo_valuenumberNoCargo value.
s_province_idstringYesSender province/city ID in the new location system.
s_ward_idstringYesSender ward ID in the new location system.
r_province_idstringYesReceiver province/city ID in the new location system.
r_ward_idstringYesReceiver ward ID in the new location system.
s_provincestringLegacySender province/city name in the legacy location system.
s_districtstringLegacySender district name in the legacy location system.
r_provincestringLegacyReceiver province/city name in the legacy location system.
r_districtstringLegacyReceiver 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

FieldTypeDescription
successbooleantrue if the calculation succeeded; any other value is an error. See message for details.
messagestringResponse message.
dataobjectResponse data — one entry per available service.
{
   "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"
      },
      {
         "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"
      }
   ]
}

On this page