PUT /2025-07/cloud/calculate/freight
Method: PUT
URL:
Sandbox URL:
Description: Calculate Freight.
Parameters required to be sent
| Parameter | Description | Type |
|---|---|---|
dest_country_code | Dest country code, eg.CN, US. The maximum length is 2. | String, Required |
dest_city | Dest city. The maximum length is 60. | String |
dest_zip_code | Dest zip code. The maximum length is 15. | String |
origin_country_code | Origin country code, eg.CN, US. The maximum length is 2. | String, Required |
origin_city | Origin city. The maximum length is 60. | String |
origin_zip_code | Origin zip code. The maximum length is 15. | String |
dimension | Dimension | Object |
length | Length. The maximum total digits 12, with 2 decimal places. | Number |
width | Width. The maximum total digits 12, with 2 decimal places. | Number |
height | Height. The maximum total digits 12, with 2 decimal places. | Number |
uom | UOM: m, cm, mm, in, ft. The maximum length is 8. | String |
weight | Weight. The maximum total digits 12, with 2 decimal places. | Number, Required |
weight_unit | Weight UOM: kg, lb. The maximum length is 8. | String, Required |
service_code | Service code. The maximum length is 32. | String, Required |
inco_term | Incoterm: DAP, DDP. The maximum length is 8. | String, Conditional required. |
Result object contains
| Parameter | Description | Type |
|---|---|---|
carrier_code | Carrier code. The maximum length is 32. | String |
inco_term | Incoterm: DAP, DDP. The maximum length is 8. | String |
amount | Amount. The maximum total digits 12, with 2 decimal places. | Number |
shipping | Shipping cost. The maximum total digits 12, with 2 decimal places. | Number |
fuel_surcharge | Fuel surcharge. The maximum total digits 12, with 2 decimal places. | Number |
remote_area_surcharge | Remote area surcharge. The maximum total digits 12, with 2 decimal places. | Number |
vat | VAT. The maximum total digits 12, with 2 decimal places. | Number |
duty | Duty. The maximum total digits 12, with 2 decimal places. | Number |
ddp_handling | DDP handling. The maximum total digits 12, with 2 decimal places. | Number |
currency | Currency. The maximum length is 3. | String |
message | Message. The maximum length is 255. | String |
Body
json
{
"dest_country_code": "HK",
"dest_city": "New Territories",
"dest_zip_code": "518000",
"origin_city": "",
"origin_country_code": "US",
"origin_zip_code": "85021",
"dimension": {
"length": 1,
"width": 20,
"height": 3,
"uom": "cm"
},
"service_code": "ZHSGCN",
"inco_term": "DDP",
"weight": 10,
"weight_uom": "kg"
}Response
Response payload
Payload return an error with the description and data = empty. If the request is successful, the data contains an object with the result.
json
{
"code": 200,
"message": "Successful!",
"data": {
"carrier_code": "hong-kong-post",
"message": "Service : service : hong-kong-post -> HK(518000) weight :30.00lb zone : Zone3",
"amount": 15.23,
"currency": "USD",
"shipping": 12.00,
"remote_area_surcharge": 0,
"fuel_surcharge": 0.00,
"vat": 0,
"duty": 0,
"ddp_handling": 3.23,
"inco_term": "DDP"
}
}