Cancel Order V - 3.0.0
Order cancellation API will let you cancel the order using a single request. System will not let you cancel more than one order in single request.
Production URL
Parameter
Field | Type | Description |
---|---|---|
access_token | String | *Required You will get this from IThink Logistics team. |
secret_key | String | *Required You will get this from IThink Logistics team. |
awb_number | String | *Required AWB Number of the order which you want to cancel (One AWB no at once). |
{ "data": { "access_token" : "XXXXXXX", #You will get this from iThink Logistics Team "secret_key" : "XXXXXXX", #You will get this from iThink Logistics Team "awb_number" : "8XXXXXXXXX" } }
{ "data": [ { "status" : "SUCCESS", "remark" : "Order Cancel Successfully.", "refnum" : "GK0034" } ] }
Sample Code
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://pre-alpha.ithinklogistics.com/api_v3/order_intl/cancel.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_number\" : \"8XXXXXXXXX\"}}", 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_intl/cancel.json" payload = "{\"data\":{\"access_token\" : \"XXXXXXX\",\"secret_key\" : \"XXXXXXX\",\"awb_number\" : \"8XXXXXXXXX\"}}" 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_number\" : \"8XXXXXXXXX\"}}"); Request request = new Request.Builder() .url("https://pre-alpha.ithinklogistics.com/api_v3/order_intl/cancel.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_intl/cancel.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_number\" : \"8XXXXXXXXX\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
require 'uri' require 'net/http' url = URI("https://pre-alpha.ithinklogistics.com/api_v3/order_intl/cancel.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_number\" : \"8XXXXXXXXX\"}}" response = http.request(request) puts response.read_body