Update Waybill Tracking

Overview

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

Description

Update Waybill Tracking API is used to update tracking of waybill status. It could only be updated if the status of the waybill would not be Delivered.

Request Header

AccessKey : logixerp

Request Body

These are form parameters:

  • waybillNumber : DELHI12856
  • actionLabel: Delivered
  • eventDate: 25-02-2020
  • eventTime: 15:05:02
  • vendorCode: 13662
  • operatingUnitCode: Delhi
  • deliveredOn: 25-02-2020
  • eventRemarks: Out for delivery now
  • deliveredTo: Rohit
  • PODLink: Link
  • deliveryLocation: Delhi

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.
waybillNumber String Required Waybill number which needs to be update.
actionLabel String Optional Status of Event label which you want to update (Carrier Status,Delivered,Docket Create,Handover to carrier,In-Scan,In-Transit,On-Hold,Out for delivery,Out-Scan,Partial Delivered,Pickup Data,Pickup Request Received,Picked,Re-schedule,RTO,RTO-Delivered,Received from carrier,Update,Un-Delivered,Shipment picked,Cancelled,Stock In,Delivery Status,Manifest Created,Manifest Sent,Manifest Received, Fake Delivery Attempt)
Waybill Statuses String Optional Status of waybill which you want to update (In Transit,Out For Delivery,Delivered,Un-Delivered,At Origin,Out For Port,At Warehouse,Delivered to Carrier,Cancelled,RTO,Partial-Delivered,RTO-Delivered,Re-Schedule,Data Received,Shipment Received,Refund Made,Refund,Schedule For Dispatch,Delivery Schedule,Destroyed,Lost)
eventDate String Required Event date is the date of waybill updation. (dd-MM-yyyy)
eventTime String Required Event time is the time of waybill updation.(HH:MM:SS), If some numeric value is taken than minutes and seconds place will appear as zero.
vendorCode String Required Vendor Code which is available in ERP.
operatingUnitCode String Required Operating Unit Code which is available in ERP.
eventRemarks String Optional Remarks if any which you want to update.
deliveredOn String Optional Delivery date (For future use)
deliveredTo String Optional Person who received the shipment.
PODLink String Optional POD Link (For future use)
deliveryLocation String Optional Delivery Area where the shipment got delivered (For future use)

Response Format

ON SUCCESS
{
"message":"Waybill updated successfully",
"messageType" : "Success"
“waybillNumber”: “999999”
}

ON ERROR
{
"message":"Invalid waybill status",
"messageType" : "Error"
}

Error Message String

Error Messages Description
Waybill not found Waybill details are not available in the system.
Cancelled waybill can not be updated Waybill status is already cancelled and it can not be further updated.
Waybill can not update of status Waybill status is other than Data Received and can’t be updated.

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 UpdateWaybillTracking {

private static final String ACCESS_KEY = "logixerp";
private static final String API_URL = "https://api.logixplatform.com/Rachna/webservice/v2/UpdateWaybillTracking?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("waybillNumber", "DELHI12518");
params.put("actionLabel", "Delivered");
params.put("eventDate", "25-02-2020");
params.put("eventTime", "15:02:20");
params.put("vendorCode", "13662");
params.put("operatingUnitCode", "Delhi");
params.put("eventRemarks", "Out for delivery now");
params.put("deliveredOn", "");
params.put("deliveredTo", "Rohit");
params.put("PODLink", "Link");

params.put("deliveryLocation", "Delhi");

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("AccessKey", ACCESS_KEY);
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

import json

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

params = {'SecureKey':'secure_key'}
payload = {
"waybillNumber" : "DELHI12856",
"actionLabel": "Delivered",
"eventDate": "25-02-2020",
"eventTime": "15:05:02",
"vendorCode": "13662",
"operatingUnitCode": "Delhi",
"deliveredOn": "25/02/2020",
"eventRemarks": "Out for delivery now",
"deliveredTo": "Rohit",
"PODLink": "",
"deliveryLocation": ""

}

headers = {'Content-Type': 'application/x-www-form-urlencoded','AccessKey':'logixerp'}

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...