Get Rate V - 3.0.0
Retreive the rate charged for a shipment.
Staging URL
Production URL
Parameter
| Field | Type | Description |
|---|---|---|
| from_pincode | Integer | *Required From where your parcel will get shipped. |
| shipping_length_cms | Integer | Length shouldn't be more than 1000cm. |
| shipping_width_cms | Integer | Width shouldn't be more than 1000cm. |
| shipping_height_cms | Integer | Height shouldn't be more than 1000cm. |
| shipping_weight_kg | Integer | *Required Weight shouldn't be more than 10kg. |
| order_type | String | Order type is "Forward", "Reverse" Or Blank= (Default is forward). |
| payment_method | String | *Required Payment method is "Prepaid" & "COD". |
| service_type | String | Service Type is "Air" or "Surface". |
| product_mrp | float | *Required Product's actual MRP. |
| access_token | String | You will get this from IThink Logistics team. |
| secret_key | String | You will get this from IThink Logistics team. |
{
"data": {
"from_pincode" : "400092",
"shipping_length_cms" : "22",
"shipping_width_cms" : "12",
"shipping_height_cms" : "12",
"shipping_weight_kg" : "2",
"order_type" : "forward",
"payment_method" : "cod",
"service_type" : "surface",
"product_mrp" : "1200.00",
"access_token" : "8ujik47cea32ed386b1f65c85fd9aaaf",
"secret_key" : "65tghjmads9dbcd892ad4987jmn602a7"
}
}
{
"status": "success",
"status_code": 200,
"data": [
"Xpressbees": {
"A": "100",
"B": "115.10",
"C": "120",
"D": "135",
"E": "140"
"F": "140"
},
"Delhivery": {
"A": "100",
"B": "115.10",
"C": "120",
"D": "135",
"E": "140"
"F": "140"
]
}
Sample Beta Code
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://pre-alpha.ithinklogistics.com/api_v3/rate/check.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"data\":{\"from_pincode\":\"400092\",\"shipping_length_cms\":\"22\",\"shipping_width_cms\":\"12\",\"shipping_height_cms\":\"12\",\"shipping_weight_kg\":\"2\",\"order_type\":\"forward\",\"payment_method\":\"cod\",\"service_type\":\"surface\",\"product_mrp\":\"1200.00\",\"access_token\":\"8ujik47cea32ed386b1f65c85fd9aaaf\",\"secret_key\":\"65tghjmads9dbcd892ad4987jmn602a7\"}}\n",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: application/json"
)
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err)
{
echo "cURL Error #:" . $err;
}
else
{
echo $response;
}
import requests
url = "https://pre-alpha.ithinklogistics.com/api_v3/rate/check.json"
payload = "{\"data\":{\"from_pincode\":\"400092\",\"shipping_length_cms\":\"22\",\"shipping_width_cms\":\"12\",\"shipping_height_cms\":\"12\",\"shipping_weight_kg\":\"2\",\"order_type\":\"forward\",\"payment_method\":\"cod\",\"service_type\":\"surface\",\"product_mrp\":\"1200.00\",\"access_token\":\"8ujik47cea32ed386b1f65c85fd9aaaf\",\"secret_key\":\"65tghjmads9dbcd892ad4987jmn602a7\"}}\n"
headers =
{
'content-type': "application/json",
'cache-control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"data\":{\"from_pincode\":\"400092\",\"shipping_length_cms\":\"22\",\"shipping_width_cms\":\"12\",\"shipping_height_cms\":\"12\",\"shipping_weight_kg\":\"2\",\"order_type\":\"forward\",\"payment_method\":\"cod\",\"service_type\":\"surface\",\"product_mrp\":\"1200.00\",\"access_token\":\"8ujik47cea32ed386b1f65c85fd9aaaf\",\"secret_key\":\"65tghjmads9dbcd892ad4987jmn602a7\"}}\n");
Request request = new Request.Builder()
.url("https://pre-alpha.ithinklogistics.com/api_v3/rate/check.json")
.post(body)
.addHeader("content-type", "application/json")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
var client = new RestClient("https://pre-alpha.ithinklogistics.com/api_v3/rate/check.json");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"data\":{\"from_pincode\":\"400092\",\"shipping_length_cms\":\"22\",\"shipping_width_cms\":\"12\",\"shipping_height_cms\":\"12\",\"shipping_weight_kg\":\"2\",\"order_type\":\"forward\",\"payment_method\":\"cod\",\"service_type\":\"surface\",\"product_mrp\":\"1200.00\",\"access_token\":\"8ujik47cea32ed386b1f65c85fd9aaaf\",\"secret_key\":\"65tghjmads9dbcd892ad4987jmn602a7\"}}\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
url = URI("https://pre-alpha.ithinklogistics.com/api_v3/rate/check.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\"data\":{\"from_pincode\":\"400092\",\"shipping_length_cms\":\"22\",\"shipping_width_cms\":\"12\",\"shipping_height_cms\":\"12\",\"shipping_weight_kg\":\"2\",\"order_type\":\"forward\",\"payment_method\":\"cod\",\"service_type\":\"surface\",\"product_mrp\":\"1200.00\",\"access_token\":\"8ujik47cea32ed386b1f65c85fd9aaaf\",\"secret_key\":\"65tghjmads9dbcd892ad4987jmn602a7\"}}\n"
response = http.request(request)
puts response.read_body