Add Warehouse
Enables you to enter the pickup location which will be approved by the logistics partner within 24 hours so that you can easily carry out the operation.
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. |
company_name | String | *Required Name of the compnay. |
address1 | String | *Required Company's address apt/wing/building. |
address2 | String | #Optional Company's address landmark. |
mobile | Integer | Company's Mobile. |
pincode | Integer | *Required Company's pincode. |
city_id | Integer | Company's city id. Refer This Link |
state_id | Integer | Company's state id. Refer This Link |
country_id | Integer | Company's country id. #for india country_id is 101. |
api_source | Integer | You will get this from IThink Logistics team. |
{ "data": { "company_name" : "ITL", "address1" : "XXX,Shreeji Sharan Kandivali West", "address2" : "Near Icici Bank", "mobile" : "9XXXXXXXXX", "pincode" : "400067", "city_id" : "2707", "state_id" : "22", "country_id" : "101", "api_source" : "1", "access_token" : "XXXXXXX", "secret_key" : "XXXXXXX" } }
{ "status": "SUCCESS", "warehouse_id": 94 }
Sample Beta Code
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "api/warehouse_intl/add.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\":{\"company_name\":\"ITL\",\"address1\":\"XXX, Shreeji Sharan Kandivali West\",\"address2\":\"Near ICICI Bank\",\"mobile\":\"9XXXXXXXXX\",\"pincode\":\"400067\",\"city_id\":\"2707\",\"state_id\":\"22\",\"country_id\":\"101\",\"api_source\":\"1\",\"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/warehouse_intl/add.json" payload = "{\"data\":{\"company_name\":\"ITL\",\"address1\":\"XXX, Shreeji Sharan Kandivali West\",\"address2\":\"Near ICICI Bank\",\"mobile\":\"9XXXXXXXXX\",\"pincode\":\"400067\",\"city_id\":\"2707\",\"state_id\":\"22\",\"country_id\":\"101\",\"api_source\":\"1\",\"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\":{\"company_name\":\"ITL\",\"address1\":\"XXX, Shreeji Sharan Kandivali West\",\"address2\":\"Near ICICI Bank\",\"mobile\":\"9XXXXXXXXX\",\"pincode\":\"400067\",\"city_id\":\"2707\",\"state_id\":\"22\",\"country_id\":\"101\",\"api_source\":\"1\",\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\"}}\n"); Request request = new Request.Builder() .url("api/warehouse_intl/add.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/warehouse_intl/add.json"); var request = new RestRequest(Method.POST); request.AddHeader("cache-control", "no-cache"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"data\":{\"company_name\":\"ITL\",\"address1\":\"XXX, Shreeji Sharan Kandivali West\",\"address2\":\"Near ICICI Bank\",\"mobile\":\"9XXXXXXXXX\",\"pincode\":\"400067\",\"city_id\":\"2707\",\"state_id\":\"22\",\"country_id\":\"101\",\"api_source\":\"1\",\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\"}}\n", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
require 'uri' require 'net/http' url = URI("api/warehouse_intl/add.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\":{\"company_name\":\"ITL\",\"address1\":\"XXX, Shreeji Sharan Kandivali West\",\"address2\":\"Near ICICI Bank\",\"mobile\":\"9XXXXXXXXX\",\"pincode\":\"400067\",\"city_id\":\"2707\",\"state_id\":\"22\",\"country_id\":\"101\",\"api_source\":\"1\",\"access_token\":\"XXXXXXX\",\"secret_key\":\"XXXXXXX\"}}\n" response = http.request(request) puts response.read_body