Create Trip Manifest

Overview

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

Description

Create Trip Manifest API is used to create and send the trip manifest for the waybills or shipments from one operating unit to another operating unit.Multiple shipments can be sent in the trip manifest at one time.

Request Header

AccessKey : logixerp

Request Body

VALID JSON STRING
{
"create TripManifest Data":
{
"from OU" : "NAGPUR",
"to OU" : "DELHI",
"dispatch Mode" : "BYROAD",
"waybill Numbers" : ["101314","102018"]
}
}

Request Details

Parameter Data Type Required/Optional Description
SecureKey Required It is a Unique key for accessing the API. For secure key email to support team.
fromOU Required Code of operating unit from where trip manifest is meant to be created.
toOU Required Code of operating unit the trip manifest is meant to receive.
dispatchMode Required Dispatch mode (By Rail / FreightNX Air / By Road / By Air).
It only takes the above mentioned values.
waybillNumbers Required It takes waybill numbers in the form of array, ex: ["101314”,”102018”]. It can take single as well as multiple values.

Response Format

ON SUCCESS
{
"message" : "Trip Manifest created successfully: 123XXXXX877",
"messageType" : "Success"
}

ON ERROR
{
"message" : "From OU not found",
"messageType" : "Error"
}

Error Message String

Error Messages Description
From OU missing When from OU is given blank or wrong
To OU missing When to OU is given blank or wrong
Dispatch Mode is missing When dispatch mode is blank in the request
Duplicate Waybill is not Allowed: [10XXXX] When duplicate waybill exists in the array of waybill Numbers
No such dispatch mode found Wrong dispatch mode text is given in the request

Sample Code

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;

import java.net.URL;

public class CreateTripManifest {

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

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

URL obj = new URL(ACCESS_URL);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("AccessKey", ACCESS_KEY);
con.setRequestProperty("Content-Type", "application/json; charset=utf-8");
con.setRequestProperty("Accept", "application/json");

con.setDoOutput(true);

String jsonInputString = "{\r\n" +
"\"createTripManifestData\": [{\r\n" +
"\"fromOU\": \"Delhi\",\r\n" +
"\"toOU\": \"DELHI\",\r\n" +
"\"dispatchMode\": \"BYROAD\",\r\n" +
"\"waybillNumbers\": [\"DELHI12248\"]\r\n" +
"}]\r\n" +

"}";

try(OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes("utf-8");
os.write(input, 0, input.length);
}

try(BufferedReader br = new BufferedReader(
new InputStreamReader(con.getInputStream(), "utf-8"))) {
StringBuilder response = new StringBuilder();
String responseLine = null;
while ((responseLine = br.readLine()) != null) {
response.append(responseLine.trim());
}
System.out.println(response.toString());
}

}
}
import requests
import json

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

params = {'SecureKey' : 'secure_key'}
data = {
"createTripManifestData": [{
"fromOU": "Delhi",
"toOU": "DELHI",
"dispatchMode": "BYROAD",
"waybillNumbers": ["DELHI12248"]
}]
}

headers = {'Content-Type': 'application/json', 'AccessKey' : 'logixerp'}

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