Calculate tariff API is used to calculate the tariff of a waybill on the basis of rate contract which is saved in customer contract rate master.
VALID JSON STRING
{
"calculateTariffRequestData":
{
"customerCode":"1007",
"sourceCity":"Smouha",
"sourceState":"",
"sourcePincode":"",
"sourceCountry":"EG",
"destinationCity":"Smouha",
"destinationState":"",
"destinationPincode":"",
"destinationCountry":"EG",
"service":"PUD",
"packages":"1",
"actualWeight":"3",
"length":"",
"width":"",
"height":"",
"codAmount":"",
"invoiceValue":""
}
}
Parameter | Data Type | Required/Optional | Description |
---|---|---|---|
SecureKey | int | Required | It is a Unique key for accessing the API. For secure key email to support team. |
customerCode | String | Required | Customer code should be same as available in the ERP. |
sourceCity | String | Required | Consignor City should be match with the code as available in the ERP. Refer to the annexure City List for the correct values. |
sourceState | String | Optional | Consignor state is that under which consignor city comes in. |
sourcePincode | String | Optional | Consignor city Zipcode is that under which pickup location comes in. |
sourceCountry | String | Optional | Consignor country is that from where the shipment will get pickup. |
destinationCity | String | Required | Consignee city name should be matched with the city name in the ERP. |
destinationState | String | Optional | Consignee state is that where the shipment will deliver. |
destinationPincode | String | Optional | Consignee zipcode is that under which delivery location comes in. |
destinationCountry | String | Optional | Consignee Country is that where the shipment will deliver. |
service | String | Required | There are so many services in system and charges apply for shipment on the basis of services. Service Code should be same as available in the ERP |
packages | String | Required | Count of packages which are sending under a particular waybill. |
actualWeight | String | Required | Actual weight is the weight of the package which is going to be booked. |
length | String | Optional | Length of package. |
width | String | Optional | Width of package. |
height | String | Optional | Height of package |
codAmount | Double Type | Optional | COD Amount is that you are charging any amount for pickup. |
invoiceValue | Double Type | Optional | Invoice Value is the value of package. It is used for the insurance purpose. |
ON SUCCESS
{
"message":"Tariff calculated successfully",
"messageType" : "Success"
"taxAmount":0,
"totalAmount":214,
"waybillChargesMappingList":
[
{
"amount":214,
"chargeType":
{
"name":"SHIPPING FEE"
}
}
]
}
ON ERROR
{
"message":"ERROR_MESSAGE",
"messageType":"Error"
}
Error Messages | Description |
---|---|
Invalid Organization Key | Secure Key is wrong or missing. |
Service not found | Service code is not given in the request. |
Source city not found | City name is not given. |
Actual Weight missing | Actual weight is not given. |
Either Number of package missing or zero | Package count is not given or it is given zero. |
Destination country code not valid | Consignee country code is given wrong or invalid. |
Source country code not valid | Consignor country code is given wrong or invalid. |
Destination city not found | Consignee city code is given wrong or missing or invalid. |
import java.net.URL;
public class CalculateTariff {
con.setDoOutput(true);
"}";
access_url = "https://api.logixplatform.com/Rachna/webservice/v2/CalculateTariff"
}
headers = {'Content-Type': 'application/json', 'AccessKey':'logixerp'}