Create 3PL Trip Manifest

Overview

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

Description

API for creating Trip Manifest of the waybills which were created by third party logistics company using the CreateWaybill API. The API is used for sending international shipment data to the gateway OU. The Gateway OU will further be using the web-interface or MATRIX app for receiving the Trip Manifest.

Request Body

VALID JSON STRING
{
"customerCode": "ABC",
"carrierCode": "CARRIERCODE",
"flightNumber": "JHITURT6680",
"flightDeliveryDate": "yyyy-mm-dd",
"flightDepartureDate": "yyyy-mm-dd",
"flightUnloadingDate": "yyyy-mm-dd",
"countryCode": "IN",
"portUpload": "Kolkata",
"portType": "AIRPORT",
"fromOU": "OperatingUnitCode",
"toOU": "OperatingUnitCode",
"dispatchMode": "BYAIR",
"exim": "IMPORT",
"airline": "airline",
"rule": "TABADUL",
"waybillNumbers":
[
"WAYBILL01",
"WAYBILL02"
]
}

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.
customerCode String Optional Customer Code
carrierCode String Required Carrier Code.
flightNumber String Required Flight Number
flightDeliveryDate String Optional Flight delivery date (yyyy-mm-dd).
flightDepartureDate String Required Flight departure date (yyyy-mm-dd).
flightUnloadingDate String Required Flight unloading date (yyyy-mm-dd).
countryCode String Required Country code
portUpload String Required Port from where consignment is uploaded.
portType String Required It takes the following values:
(SEAPORT|DRYPORT|AIRPORT|
POSTOFFICE|CUSTOMOFFICE)
fromOU String Required It is the operating unit from where the trip manifest will be sent.
toOU String Required It is the operating unit where the trip manifest is meant to receive.
dispatchMode String Required Dispatch mode (BYRAIL / FREIGHTNXAIR / BYROAD / BYAIR).
exim String Required It takes the following values: (IMPORT / EXPORT).
airline String Required Valid name of Airline.
rule String Required The unique code of the Rule to followed for validating the data. The unique value of the property will be provided by the Customer Support.
Waybill Numbers String Required It takes an array of waybills which is meant to be in a trip manifest.
[ "WAYBILL01",
"WAYBILL02"
]
packages String Required Count of packages which comes under a particular waybill..
actualWeight String Required weight of the packages which comes under a particular waybill.
Note: All the following parameters must be in form data.
Note: customer state,city must be according to its country.

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
Failed: Waybill Not Found Waybill given in the request does not exist in the system.
Dispatch Mode Missing Dispatch mode is not given.
To OU Missing To OU is not given.
No Such Dispatch Mode Found Dispatch mode given in the request is invalid.
Flight Number Missing Flight number is blank or not given.
Carrier Code Missing Carrier code is blank or not given.
Country Code Missing Country code is blank or not given.
Port Upload Missing Uploading port value is blank or not given.
Airline Name Missing Airline is blank or not given.
From OU Missing From OU is blank or not given.

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

private static final String API_URL = "https://webservice.logixerp.com/Rachna/webservice/v2/Create3PLTripManifest?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 obj = new URL(ACCESS_URL);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Content-Type", "application/json; charset=utf-8");
con.setRequestProperty("Accept", "application/json");

con.setDoOutput(true);

String jsonInputString = "{\r\n" +
"\"customerCode\": \"HERO\",\r\n" +
"\"carrierCode\": \"GATIINDIA\",\r\n" +
"\"flightNumber\": \"VIS01\",\r\n" +
"\"flightDeliveryDate\": \"2020-04-20\",\r\n" +
"\"flightDepartureDate\": \"2020-04-20\",\r\n" +
"\"flightUnloadingDate\": \"2020-04-20\",\r\n" +
"\"countryCode\": \"IN\",\r\n" +
"\"dispatchMode\": \"\",\r\n" +
"\"packages\": \"\",\r\n" +
"\"actualWeight\": \"\",\r\n" +
"\"portUpload\": \"Kolkata\",\r\n" +
"\"portType\": \"AIRPORT\",\r\n" +
"\"fromOU\": \"DELHI\",\r\n" +
"\"toOU\": \"NAGPUR\",\r\n" +
"\"dispatchMode\": \"BYAIR\",\r\n" +
"\"exim\": \"IMPORT\",\r\n" +
"\"airline\": \"VISTARA\",\r\n" +
"\"rule\": \"TABADUL\",\r\n" +
"\"waybillNumbers\":\r\n" +
"[\r\n" +
"\"DELHI12630\",\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://webservice.logixerp.com/Rachna/webservice/v2/Create3PLTripManifest"

params = {'SecureKey' : 'secure_key'}
payload = {
"customerCode": "HERO",
"carrierCode": "GATIINDIA",
"flightNumber": "VIS01",
"flightDeliveryDate": "2020-04-20",
"flightDepartureDate": "2020-04-20",
"flightUnloadingDate": "2020-04-20",
"countryCode": "IN",
"portUpload": "Kolkata",
"portType": "AIRPORT",
"fromOU": "DELHI",
"toOU": "NAGPUR",
"dispatchMode": "BYAIR",
"exim": "IMPORT",
"airline": "VISTARA",
"rule": "TABADUL",
"waybillNumbers":["DELHI12630"]

}

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