Active Services

Overview

Service Unique Name ActiveServices
Request Method GET

Description

Active Services API is used to get Active Services.

Request Body

These are form parameters:

  • customerCode : HERO

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 Required Customer Code should be same as available in logixerp.

Response Format

In successful response, all the active service lists (for which Contract exists) will be returned. The list has Service Code, Service Name, Service Category.

ON SUCCESS
{
"message": "Services available",
"messageType": "Success",
"services":
[
{
"category": "FTL",
"code": "FULLTRUCKLOAD",
"name": "Full Truck Load2"
},
{
"category": "EXPRESS",
"code": "SDD",
"name": "SAME DAY DELIVERY"
}
{
"category": "EXPRESS",
"code": "EXPRESS",
"name": "Express"
}
{
"category": "PL",
"code": "PARTLOAD",
"name": "PARTLOAD"
}
]
}

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.net.HttpURLConnection;

import java.net.URL;

public class ActiveServices {

private static final String USER_AGENT = "Mozilla/5.0";
private static final String API_URL = "https://api.logixplatform.com/Rachna/webservice/v2/ActiveServices?SecureKey=";
private static final int SECURE_KEY = SECURE KEY;
private static final String CUSTOMERCODE = "HERO";

private static final String ACCESS_URL = API_URL+SECURE_KEY+"&customerCode="+CUSTOMERCODE;

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

URL obj = new URL(ACCESS_URL);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("User-Agent", USER_AGENT);
int responseCode = con.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) { // success
BufferedReader in = new BufferedReader(new InputStreamReader(
con.getInputStream()));
String inputLine;

StringBuffer response = new StringBuffer();

while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}

in.close();

// print result
System.out.println(response.toString());
} else {
System.out.println("GET request not worked");
}
}
}

import requests

access_url = "https://api.logixplatform.com/Rachna/webservice/v2/ActiveServices"
payload = {
'SecureKey':'secure_key',
'customerCode':'HERO',
}

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