Sync Order V - 3.0.0

Sync Order API will let you sync your orders in ITL. System will not let you sync more than 25 orders in single request.

POST
Staging URL
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.
data Json data is the package data which further categorize by keys pick location details & shipments. Refer to the request example for more clarity on usage.
       {
       "data":    {
                          "shipments"   : [
                                                                  {
                                                                  "order" : "test-api-order-108",
                                                                  "sub_order" : "",
                                                                  "order_date" : "29-09-2021 00:01:00",
                                                                  "total_amount" : "10",
                                                                  "name" : "Bharat",
                                                                  "company_name" : "ABC Company",
                                                                  "add" : "104, Shreeji Sharan",
                                                                  "add2" : "",
                                                                  "add3" : "",
                                                                  "pin" : "400094",
                                                                  "city" : "Mumbai",
                                                                  "state" : "Maharashtra",
                                                                  "country" : "India",
                                                                  "phone" : "9876543210",
                                                                  "alt_phone" : "9876543210",
                                                                  "email" : "abc@gmail.com",
                                                                  "is_billing_same_as_shipping" : "no",
                                                                  "billing_name" : "Bharat",
                                                                  "billing_company_name" : "ABC Company",
                                                                  "billing_add" : "104, Shreeji Sharan",
                                                                  "billing_add2" : "",
                                                                  "billing_add3" : "",
                                                                  "billing_pin" : "400067",
                                                                  "billing_city" : "Mumbai",
                                                                  "billing_state" : "Maharashtra",
                                                                  "billing_country" : "India",
                                                                  "billing_phone" : "9876543210", 
                                                                  "billing_alt_phone" : "9876543210",
                                                                  "billing_email" : "abc@gmail.com",
                                                                  "products"   : [
                                                                                                      {
                                                                                                      "product_name" : "Green color tshirt",
                                                                                                      "product_sku" : "GC001-1",
                                                                                                      "product_quantity" : "1",
                                                                                                      "product_price" : "100",
                                                                                                      "product_tax_rate" : "5",
                                                                                                      "product_hsn_code" : "91308",
                                                                                                      "product_discount" : "0"
                                                                                                      },
                                                                                                      {
                                                                                                      "product_name" : "Red color tshirt",
                                                                                                      "product_sku" : "GC002-2",
                                                                                                      "product_quantity" : "1",
                                                                                                      "product_price" : "200",
                                                                                                      "product_tax_rate" : "5",
                                                                                                      "product_hsn_code" : "91308",
                                                                                                      "product_discount" : "0"
                                                                                                      }
                                                                                                 ],
                                                                  "shipment_length" : "10",    in cm
                                                                  "shipment_width" : "10",    in cm
                                                                  "shipment_height" : "5",    in cm
                                                                  "weight" : "0.5",    in Kg
                                                                  "shipping_charges" : "0",
                                                                  "giftwrap_charges" : "0",
                                                                  "transaction_charges" : "0",
                                                                  "total_discount" : "0",
                                                                  "first_attemp_discount" : "0",
                                                                  "cod_charges" : "0",
                                                                  "advance_amount" : "0",
                                                                  "cod_amount" : "300",
                                                                  "payment_mode" : "COD",     For reverse Shipments: Prepaid Only
                                                                  "reseller_name" : "",
                                                                  "eway_bill_number" : "",
                                                                  "gst_number" : ""
                                                                  }
                                                           ],
                          "access_token" : "8ujik47cea32ed386b1f65c85fd9aaaf",  #You will get this from iThink Logistics Team
                          "secret_key" : "65tghjmads9dbcd892ad4987jmn602a7"   #You will get this from iThink Logistics Team
                        
                          } 
}
       {
       "status_code": 200,
       "html_message": ' ', If any error message for sync order
       "data":
                      {
                      "1" :
                                  {
                                  "status" : "Success",
                                  "remark" : "Oder Processed Successfully",
                                  "refnum" : "test-api-order-110",
                                  }
                      }
       }
Sample Code
  $curl = curl_init();
  curl_setopt_array($curl, array(
      CURLOPT_URL             => "https://pre-alpha.ithinklogistics.com/api_v3/order/sync.json",
      CURLOPT_RETURNTRANSFER  => true,
      CURLOPT_ENCODING        => "",
      CURLOPT_MAXREDIRS       => 10,
      CURLOPT_TIMEOUT         => 30,
      CURLOPT_HTTP_VERSION    => CURL_HTTP_VERSION_1_11,
      CURLOPT_CUSTOMREQUEST   => "POST",
      CURLOPT_POSTFIELDS      => "{\n\"data\":{\n\"shipments\":[\n{\n\"order\":\"test-api-order-108\",\n\"sub_order\":\"\",\n\"order_date\":\"29-09-2021 00:01:00\",\n            \"total_amount\":\"10\",\n\"name\":\"Bharat\",\n\"company_name\":\"ABC Company\",\n\"add\":\"104 Shreeji\",\n\"add2\":\"\",\n\"add3\":\"\",\n            \"pin\":\"400094\",\n\"city\":\"Mumbai\",\n\"state\":\"Maharashtra\",\n\"country\":\"India\",\n\"phone\":\"9967801682\",\n\"alt_phone\":\"1111111111\",\n\"email\":\"abc@gmail.com\",\n\"is_billing_same_as_shipping\":\"no\",\n\"billing_name\":\"Bharat\",\n\"billing_company_name\":\"ABC Company\",\n\"billing_add\":\"104, Shreeji Sharan\",\n\"billing_add2\":\"\",\n\"billing_add3\":\"\",\n\"billing_pin\":\"400067\",\n            \"billing_city\":\"Mumbai\",\n\"billing_state\":\"Maharashtra\",\n\"billing_country\":\"India\",\n\"billing_phone\":\"9967801682\",\n            \"billing_alt_phone\":\"9967801682\",\n\"billing_email\":\"abc@gmail.com\",\n\"products\":[\n{\n\"product_name\":\"Green color tshirt\",\n\"product_sku\":\"GC001-1\",\n\"product_quantity\":\"1\",\n\"product_price\":\"5\",\n\"product_tax_rate\":\"\",\n\"product_hsn_code\":\"91308\",\n                  \"product_discount\":\"0\"\n},\n{\n\"product_name\":\"Red color tshirt\",\n\"product_sku\":\"GC002-2\",\n\"product_quantity\":\"1\",\n                  \"product_price\":\"5\",\n\"product_tax_rate\":\"\",\n\"product_hsn_code\":\"91308\",\n\"product_discount\":\"0\"\n}\n],\n\"shipment_length\":\"5\",\n\"shipment_width\":\"5\",\n\"shipment_height\":\"5\",\n\"weight\":\"0.5\",\n\"shipping_charges\":\"0\",\n\"giftwrap_charges\":\"0\",\n\"transaction_charges\":\"0\",\n\"total_discount\":\"0\",\n\"first_attemp_discount\":\"0\",\n\"cod_amount\":0,\n            \"cod_charges\":\"0\",\n\"advance_amount\":\"0\",\n\"payment_mode\":\"COD\",\n\"reseller_name\":\"\",\n\"eway_bill_number\":\"\",\n\"gst_number\":\"\"\n}\n],\n\"access_token\":\"3e99c7df33c2c3b858711a5c07164230\",\n\"secret_key\":\"c8d6362b28fb7898b847fb5d163bb6a0\"\n   }\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/order/sync.json"

  payload = "{\n\"data\":{\n\"shipments\":[\n{\n\"order\":\"test-api-order-108\",\n\"sub_order\":\"\",\n\"order_date\":\"29-09-2021 00:01:00\",\n            \"total_amount\":\"10\",\n\"name\":\"Bharat\",\n\"company_name\":\"ABC Company\",\n\"add\":\"104 Shreeji\",\n\"add2\":\"\",\n\"add3\":\"\",\n            \"pin\":\"400094\",\n\"city\":\"Mumbai\",\n\"state\":\"Maharashtra\",\n\"country\":\"India\",\n\"phone\":\"9967801682\",\n\"alt_phone\":\"1111111111\",\n\"email\":\"abc@gmail.com\",\n\"is_billing_same_as_shipping\":\"no\",\n\"billing_name\":\"Bharat\",\n\"billing_company_name\":\"ABC Company\",\n\"billing_add\":\"104, Shreeji Sharan\",\n\"billing_add2\":\"\",\n\"billing_add3\":\"\",\n\"billing_pin\":\"400067\",\n            \"billing_city\":\"Mumbai\",\n\"billing_state\":\"Maharashtra\",\n\"billing_country\":\"India\",\n\"billing_phone\":\"9967801682\",\n            \"billing_alt_phone\":\"9967801682\",\n\"billing_email\":\"abc@gmail.com\",\n\"products\":[\n{\n\"product_name\":\"Green color tshirt\",\n\"product_sku\":\"GC001-1\",\n\"product_quantity\":\"1\",\n\"product_price\":\"5\",\n\"product_tax_rate\":\"\",\n\"product_hsn_code\":\"91308\",\n                  \"product_discount\":\"0\"\n},\n{\n\"product_name\":\"Red color tshirt\",\n\"product_sku\":\"GC002-2\",\n\"product_quantity\":\"1\",\n                  \"product_price\":\"5\",\n\"product_tax_rate\":\"\",\n\"product_hsn_code\":\"91308\",\n\"product_discount\":\"0\"\n}\n],\n\"shipment_length\":\"5\",\n\"shipment_width\":\"5\",\n\"shipment_height\":\"5\",\n\"weight\":\"0.5\",\n\"shipping_charges\":\"0\",\n\"giftwrap_charges\":\"0\",\n\"transaction_charges\":\"0\",\n\"total_discount\":\"0\",\n\"first_attemp_discount\":\"0\",\n\"cod_amount\":0,\n            \"cod_charges\":\"0\",\n\"advance_amount\":\"0\",\n\"payment_mode\":\"COD\",\n\"reseller_name\":\"\",\n\"eway_bill_number\":\"\",\n\"gst_number\":\"\"\n}\n],\n\"access_token\":\"3e99c7df33c2c3b858711a5c07164230\",\n\"secret_key\":\"c8d6362b28fb7898b847fb5d163bb6a0\"\n   }\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\" : \"8ujik47cea32ed386b1f65c85fd9aaaf\",\"secret_key\" : \"65tghjmads9dbcd892ad4987jmn602a7\",\"awb_numbers\" : \"86210010463,86210010464\"}}");
  Request request = new Request.Builder()
    .url("https://pre-alpha.ithinklogistics.com/api_v3/order/sync.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/order/sync.json");
  var request = new RestRequest(Method.POST);
  request.AddHeader("cache-control", "no-cache");
  request.AddHeader("content-type", "application/json");
  request.AddParameter("application/json", "{\n\"data\":{\n\"shipments\":[\n{\n\"order\":\"test-api-order-108\",\n\"sub_order\":\"\",\n\"order_date\":\"29-09-2021 00:01:00\",\n            \"total_amount\":\"10\",\n\"name\":\"Bharat\",\n\"company_name\":\"ABC Company\",\n\"add\":\"104 Shreeji\",\n\"add2\":\"\",\n\"add3\":\"\",\n            \"pin\":\"400094\",\n\"city\":\"Mumbai\",\n\"state\":\"Maharashtra\",\n\"country\":\"India\",\n\"phone\":\"9967801682\",\n\"alt_phone\":\"1111111111\",\n\"email\":\"abc@gmail.com\",\n\"is_billing_same_as_shipping\":\"no\",\n\"billing_name\":\"Bharat\",\n\"billing_company_name\":\"ABC Company\",\n\"billing_add\":\"104, Shreeji Sharan\",\n\"billing_add2\":\"\",\n\"billing_add3\":\"\",\n\"billing_pin\":\"400067\",\n            \"billing_city\":\"Mumbai\",\n\"billing_state\":\"Maharashtra\",\n\"billing_country\":\"India\",\n\"billing_phone\":\"9967801682\",\n            \"billing_alt_phone\":\"9967801682\",\n\"billing_email\":\"abc@gmail.com\",\n\"products\":[\n{\n\"product_name\":\"Green color tshirt\",\n\"product_sku\":\"GC001-1\",\n\"product_quantity\":\"1\",\n\"product_price\":\"5\",\n\"product_tax_rate\":\"\",\n\"product_hsn_code\":\"91308\",\n                  \"product_discount\":\"0\"\n},\n{\n\"product_name\":\"Red color tshirt\",\n\"product_sku\":\"GC002-2\",\n\"product_quantity\":\"1\",\n                  \"product_price\":\"5\",\n\"product_tax_rate\":\"\",\n\"product_hsn_code\":\"91308\",\n\"product_discount\":\"0\"\n}\n],\n\"shipment_length\":\"5\",\n\"shipment_width\":\"5\",\n\"shipment_height\":\"5\",\n\"weight\":\"0.5\",\n\"shipping_charges\":\"0\",\n\"giftwrap_charges\":\"0\",\n\"transaction_charges\":\"0\",\n\"total_discount\":\"0\",\n\"first_attemp_discount\":\"0\",\n\"cod_amount\":0,\n            \"cod_charges\":\"0\",\n\"advance_amount\":\"0\",\n\"payment_mode\":\"COD\",\n\"reseller_name\":\"\",\n\"eway_bill_number\":\"\",\n\"gst_number\":\"\"\n}\n],\n\"access_token\":\"3e99c7df33c2c3b858711a5c07164230\",\n\"secret_key\":\"c8d6362b28fb7898b847fb5d163bb6a0\"\n   }\n}", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
  require 'uri'
  require 'net/http'

  url = URI("https://pre-alpha.ithinklogistics.com/api_v3/order/sync.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 = "{\n\"data\":{\n\"shipments\":[\n{\n\"order\":\"test-api-order-108\",\n\"sub_order\":\"\",\n\"order_date\":\"29-09-2021 00:01:00\",\n            \"total_amount\":\"10\",\n\"name\":\"Bharat\",\n\"company_name\":\"ABC Company\",\n\"add\":\"104 Shreeji\",\n\"add2\":\"\",\n\"add3\":\"\",\n            \"pin\":\"400094\",\n\"city\":\"Mumbai\",\n\"state\":\"Maharashtra\",\n\"country\":\"India\",\n\"phone\":\"9967801682\",\n\"alt_phone\":\"1111111111\",\n\"email\":\"abc@gmail.com\",\n\"is_billing_same_as_shipping\":\"no\",\n\"billing_name\":\"Bharat\",\n\"billing_company_name\":\"ABC Company\",\n\"billing_add\":\"104, Shreeji Sharan\",\n\"billing_add2\":\"\",\n\"billing_add3\":\"\",\n\"billing_pin\":\"400067\",\n            \"billing_city\":\"Mumbai\",\n\"billing_state\":\"Maharashtra\",\n\"billing_country\":\"India\",\n\"billing_phone\":\"9967801682\",\n            \"billing_alt_phone\":\"9967801682\",\n\"billing_email\":\"abc@gmail.com\",\n\"products\":[\n{\n\"product_name\":\"Green color tshirt\",\n\"product_sku\":\"GC001-1\",\n\"product_quantity\":\"1\",\n\"product_price\":\"5\",\n\"product_tax_rate\":\"\",\n\"product_hsn_code\":\"91308\",\n                  \"product_discount\":\"0\"\n},\n{\n\"product_name\":\"Red color tshirt\",\n\"product_sku\":\"GC002-2\",\n\"product_quantity\":\"1\",\n                  \"product_price\":\"5\",\n\"product_tax_rate\":\"\",\n\"product_hsn_code\":\"91308\",\n\"product_discount\":\"0\"\n}\n],\n\"shipment_length\":\"5\",\n\"shipment_width\":\"5\",\n\"shipment_height\":\"5\",\n\"weight\":\"0.5\",\n\"shipping_charges\":\"0\",\n\"giftwrap_charges\":\"0\",\n\"transaction_charges\":\"0\",\n\"total_discount\":\"0\",\n\"first_attemp_discount\":\"0\",\n\"cod_amount\":0,\n            \"cod_charges\":\"0\",\n\"advance_amount\":\"0\",\n\"payment_mode\":\"COD\",\n\"reseller_name\":\"\",\n\"eway_bill_number\":\"\",\n\"gst_number\":\"\"\n}\n],\n\"access_token\":\"3e99c7df33c2c3b858711a5c07164230\",\n\"secret_key\":\"c8d6362b28fb7898b847fb5d163bb6a0\"\n   }\n}"

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