Reattempt/RTO V - 3.0.0
To perform the Reattempt or RTO action on a particular order.
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. |
awb_numbers | String | The AWB number which you want to mark for Reattempt/RTO. |
ndr_action | Integer | Specify the type of action you want to perform.(1 => reattempt, 2 => rto) |
reattempt_date | String | Reattempt date Format => 'Y-m-d'. |
reattempt_time | String | Reattempt time Format => 'H:i:s'. |
reattempt_mobile_number | Integer | Reattempt mobile number. |
reattempt_address | String | Reattempt address. |
reattempt_address_type | Integer | Specify the type of address it is. (1 => Home, 2 => Office). |
rto_remark | String | Specify the reason for rto. |
{ "data": { "shipments": [ { "awb_numbers" : "SDD1001008", #AWB number which you want to mark for Reattempt/RTO. "ndr_action" : "1", #this is a mandatory field. "reattempt_date" : "2023-04-06", #this is a mandatory field for reattempt. "reattempt_time" : "15:00:00", "reattempt_mobile_number" : "8888888888", "reattempt_address" : "ABC Compnay, ABC Road", "reattempt_address_type" : "1", "rto_remark" : "" #this is a mandatory field for rto. } ], "access_token" : "8ujik47cea32ed386b1f65c85fd9aaaf", #You will get this from IThink Logistics team.. "secret_key" : "65tghjmads9dbcd892ad4987jmn602a7" #You will get this from IThink Logistics team.. } }
{ "status": "success", "status_code": 200, "html_message": "", "data": { "SDD1001008": { "status": "success", "remark": "reattempt/rto done successfully." } } }
Sample Beta Code
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://pre-alpha.ithinklogistics.com/api_v3/ndr/add-reattempt-rto.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\"data\":{\"shipments\":[{\"awb_numbers\":\"SDD1001008\",\"ndr_action\":\"1\",\"reattempt_date\":\"2023-04-06\",\"reattempt_time\":\"15:00:00\",\"reattempt_mobile_number\":\"8888888888\",\"reattempt_address\":\"ABC Compnay, ABC Road\",\"reattempt_address_type\":\"1\",\"rto_remark\":\"\"}],\"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/ndr/add-reattempt-rto.json" payload = "{\"data\":{\"shipments\":[{\"awb_numbers\":\"SDD1001008\",\"ndr_action\":\"1\",\"reattempt_date\":\"2023-04-06\",\"reattempt_time\":\"15:00:00\",\"reattempt_mobile_number\":\"8888888888\",\"reattempt_address\":\"ABC Compnay, ABC Road\",\"reattempt_address_type\":\"1\",\"rto_remark\":\"\"}],\"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\":[{\"shipments\":{\"awb_numbers\":\"SDD1001008\",\"ndr_action\":\"1\",\"reattempt_date\":\"2023-04-06\",\"reattempt_time\":\"15:00:00\",\"reattempt_mobile_number\":\"8888888888\",\"reattempt_address\":\"ABC Compnay, ABC Road\",\"reattempt_address_type\":\"1\",\"rto_remark\":\"\"}],\"access_token\":\"8ujik47cea32ed386b1f65c85fd9aaaf\",\"secret_key\":\"65tghjmads9dbcd892ad4987jmn602a7\"}}\n"); Request request = new Request.Builder() .url("https://pre-alpha.ithinklogistics.com/api_v3/ndr/add-reattempt-rto.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/ndr/add-reattempt-rto.json"); var request = new RestRequest(Method.POST); request.AddHeader("cache-control", "no-cache"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"data\":[{\"shipments\":{\"awb_numbers\":\"SDD1001008\",\"ndr_action\":\"1\",\"reattempt_date\":\"2023-04-06\",\"reattempt_time\":\"15:00:00\",\"reattempt_mobile_number\":\"8888888888\",\"reattempt_address\":\"ABC Compnay, ABC Road\",\"reattempt_address_type\":\"1\",\"rto_remark\":\"\"}],\"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/ndr/add-reattempt-rto.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\":{\"shipments\":[{\"awb_numbers\":\"SDD1001008\",\"ndr_action\":\"1\",\"reattempt_date\":\"2023-04-06\",\"reattempt_time\":\"15:00:00\",\"reattempt_mobile_number\":\"8888888888\",\"reattempt_address\":\"ABC Compnay, ABC Road\",\"reattempt_address_type\":\"1\",\"rto_remark\":\"\"}],\"access_token\":\"8ujik47cea32ed386b1f65c85fd9aaaf\",\"secret_key\":\"65tghjmads9dbcd892ad4987jmn602a7\"}}\n" response = http.request(request) puts response.read_body