Print Shipment Label

Lets you print the Shipment Label of package with iThink Logistics.

POST
Production URL
Parameter
Field Type Description Mandatory
access_token String You will get this from IThink Logistics team. Yes
secret_key String You will get this from IThink Logistics team. Yes
awb_numbers Integer AWB Number which you want to print (Comma Separated & Max 50 AWB Number at a time). Yes
       {
       "data":    {
                            "awb_numbers"   : "3XXXXXXXXX", 
                            "access_token"  : "XXXXXXX",
                            "secret_key"    : "XXXXXXX"
                          }
        }

       {
            "status": "SUCCESS",
            "file_name": "https://my.ithinklogistics.com//uploads/order/shipping-label/international/7bdacd366d7bbe0f4bd7f2e62219b590.pdf"                                                                                    
        }

Sample Beta Code
 
$curl = curl_init();
  curl_setopt_array($curl, array(
      CURLOPT_URL             => "https://my.ithinklogistics.com/api_v3/shipping_intl/label.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\":{\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\",\"awb_numbers\":\"3XXXXXXXXX\"}}\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://my.ithinklogistics.com/api_v3/shipping_intl/label.json"

    payload = "{\"data\":{\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\",\"awb_numbers\":\"3XXXXXXXXX\"}}\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\":{\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\",\"awb_numbers\":\"3XXXXXXXXX\"}}\n");  
  Request request = new Request.Builder()
    .url("https://my.ithinklogistics.com/api_v3/shipping_intl/label.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://my.ithinklogistics.com/api_v3/shipping_intl/label.json");
  var request = new RestRequest(Method.POST);
  request.AddHeader("cache-control", "no-cache");
  request.AddHeader("content-type", "application/json");
  request.AddParameter("application/json", "{\"data\":{\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\",\"awb_numbers\":\"3XXXXXXXXX\"}}\n", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);

  require 'uri'
  require 'net/http'

  url = URI("https://my.ithinklogistics.com/api_v3/shipping_intl/label.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\":{\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\",\"awb_numbers\":\"3XXXXXXXXX\"}}\n"

  response = http.request(request)
  puts response.read_body