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

{
  "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"
    }
  ]
}

On this page