Check Pincode
Lets you access the list of all serviceable pin codes of iThink Logistics.
Production URL
Parameter
| Field | Type | Description |
|---|---|---|
| access_token | String | You will get this from IThink Logistics team. |
| secret_key | String | You will get this from IThink Logistics team. |
| from_pincode | Integer | *Required Pickup Pincode. |
| to_pincode | Varchar | *Required Destination Pincode. |
| country_code | Varchar | *Required Destination Country Code. |
| shipping_length_cms | float | shipment length in cms |
| shipping_width_cms | float | shipment width in cms |
| shipping_height_cms | float | shipment height in cms |
| shipping_weight_kg | float | shipment weight in cms |
{
"data": {
"from_pincode" : "400067", #Pickup pincode whose data is needed.
"to_pincode" : "07505", #Destonation pincode whose data is needed.
"country_code" : "US", #Destination Country Code whose data is needed.
"shipping_length_cms" : "6",
"shipping_width_cms" : "5",
"shipping_height_cms" : "5",
"shipping_weight_kg" : "0.05",
"access_token" : "XXXXXXX",
"secret_key" : "XXXXXXX"
}
}
{
"data": {
"07505": [
{
"logistics_name": "Aramex INTL",
"logistics_service_type": "priority express",
"logistics_id": "9",
"is_serviceable": "Yes",
},
{
"logistics_name": "iThink Logistics",
"logistics_service_type": "",
"logistics_id": "15",
"is_serviceable": "Yes",
}
]
},
"state_name" : "New Jersey",
"city_name" : "Paterson"
}
Sample Beta Code
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "api_v2/pincode_intl/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\",\"to_pincode\":\"06811\",\"country_code\":\"US\",\"shipping_length_cms\":\"6\",\"shipping_width_cms\":\"5\",\"shipping_height_cms\":\"5\",\"shipping_weight_kg\":\"0.05\",\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\"}}\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 = "api_v2/pincode_intl/check.json"
payload = "{\"data\":{\"from_pincode\":\"400092\",\"to_pincode\":\"06811\",\"country_code\":\"US\",\"shipping_length_cms\":\"6\",\"shipping_width_cms\":\"5\",\"shipping_height_cms\":\"5\",\"shipping_weight_kg\":\"0.05\",\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\"}}\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\",\"to_pincode\":\"06811\",\"country_code\":\"US\",\"shipping_length_cms\":\"6\",\"shipping_width_cms\":\"5\",\"shipping_height_cms\":\"5\",\"shipping_weight_kg\":\"0.05\",\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\"}}\n");
Request request = new Request.Builder()
.url("api_v2/pincode_intl/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("api_v2/pincode_intl/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\",\"to_pincode\":\"06811\",\"country_code\":\"US\",\"shipping_length_cms\":\"6\",\"shipping_width_cms\":\"5\",\"shipping_height_cms\":\"5\",\"shipping_weight_kg\":\"0.05\",\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\"}}\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
url = URI("api_v2/pincode_intl/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\",\"to_pincode\":\"06811\",\"country_code\":\"US\",\"shipping_length_cms\":\"6\",\"shipping_width_cms\":\"5\",\"shipping_height_cms\":\"5\",\"shipping_weight_kg\":\"0.05\",\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\"}}\n"
response = http.request(request)
puts response.read_body