Create Pickup Request

Overview

Service Unique Name CreatePickupRequest
Request Method POST
Content Type application/x-www-form-urlencoded; charset=utf-8

Description

Create Pickup Request API is used to create Pickup Request when waybill status is Data Received / Shipment Received.

Request Body

These are form parameters:

  • 5666565readyTime: 09:00:00
  • latestTimeAvailable: 05:00:00
  • pickupCity: delhi
  • pickupAddress: Patel Nagar,New Delhi
  • pickupCountry: India
  • pickupState: Delhi
  • pickupPincode: 120391
  • pickupDate: 2019-12-30
  • clientCode: HONDA
  • wayBillNumbers: LTPL2018000042
  • pickupType: Reverse Logistics or Standard Logistics
  • specialInstruction: Special Instruction
  • consignorCode: SNAP

Request Details

Parameter Data Type Required/Optional Description
SecureKey int Required It is a Unique key for accessing the API. For secure key email to support team.
waybillNumbers String Required List of Waybill Numbers. Waybill numbers should be comma separated / space / Enter).
readyTime String Required Ready time is the time of creation. It should be in the format of HH:mm:ss
latestTimeAvailable String Required Latest Time Available is the available time for pickup. should be in the format of HH:mm:ss
pickupCity String Required Consignor's city
pickupAddress String Required Consignor's address
pickupState String Optional Consignor's state. Pickup State should match with the code as available in the ERP.
pickupCountry String Optional Consignor's country. Pickup Country should match with the code as available in the ERP.
pickupPincode String Optional Consignor's Pincode.
pickupDate String Required Pickup Date should be in the format of yyyy-MM-dd
clientCode String Required Client code should be same as available in LogixERP.
pickupType String Optional Reverse Logistics or Standard Logistics (If field keeps blank by default it takes Standard Logistics)
specialInstruction String Optional If user wants to give any special instruction for a particular waybill, user can update it here.
consignorCode String Optional If a user adds a consignor code then, the pickup request will be allocated to the particular OU with whom consignor is associated.

Response Format

ON SUCCESS
{
"message":"Pickup request saved successfully. PRS1519",
"messageType":"Success",

}

ON ERROR
{
"message": "Error_Message",
"messageType" : "Error"
}

Error Message String

Error Messages Description

Sample Code

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.LinkedHashMap;

import java.util.Map;

public class CreatePickupRequest {

private static final String ACCESS_KEY = "logixerp";
private static final String API_URL = "https://api.logixplatform.com/Rachna/webservice/v2/CreatePickupRequest?secureKey=";
private static final int SECURE_KEY = SECURE KEY;
private static final String ACCESS_URL = API_URL+SECURE_KEY;

public static void main(String[] args) throws IOException {

URL url = new URL(ACCESS_URL);
Map params = new LinkedHashMap<>();
params.put("wayBillNumbers", "DELHI13521");
params.put("readyTime", "14:00:00");
params.put("latestTimeAvailable", "09:00:00");
params.put("pickupCity", "AN");
params.put("pickupAddress", "Patel Nagar,New Delhi");
params.put("pickupState", "India");
params.put("pickupCountry", "Delhi");
params.put("pickupPincode", "120391");
params.put("pickupDate", "2020-03-26");
params.put("clientCode", "HERO");
params.put("pickupType", "");
params.put("specialInstruction", "");

params.put("consignorCode", "");

StringBuilder postData = new StringBuilder();
for (Map.Entry param : params.entrySet()) {
if (postData.length() != 0) postData.append('&');
postData.append(URLEncoder.encode(param.getKey(), "UTF-8"));
postData.append('=');
postData.append(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8"));

}

byte[] postDataBytes = postData.toString().getBytes("UTF-8");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestProperty("Content-Length", String.valueOf(postDataBytes.length));
conn.setDoOutput(true);
conn.getOutputStream().write(postDataBytes);
Reader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
StringBuilder data = new StringBuilder();
for (int c; (c = in.read()) >= 0;) {
data.append((char)c);
}
String intentData = data.toString();
System.out.println(intentData);
}

}

import requests

access_url = "https://api.logixplatform.com/Rachna/webservice/v2/CreatePickupRequest"

params = {'SecureKey':'secure_key'}
headers={'AccessKey':'logixerp'}
payload = {
'readyTime': '09:00:00',
'latestTimeAvailable': '05:00:00',
'pickupCity': 'delhi',
'pickupAddress': 'Patel Nagar,New Delhi',
'pickupCountry': 'India',
'pickupState': 'Delhi',
'pickupPincode': '120391',
'pickupDate': '2019-12-30',
'clientCode': 'HONDA',
'wayBillNumbers': 'LTPL2018000042',
'pickupType': 'Reverse Logistics or Standard Logistics',
'specialInstruction': '',
'consignorCode': '',

}

try:
r = requests.post(access_url, params=params, headers=headers, data=payload)
print (r.text)
except requests.exceptions.RequestException as err:
print (err)
please wait...