WMS Stock

Overview

Service Unique Name WmsStock
Request Method GET

Description

WMS Stock API provides list of products based on warehouse code and product category (optional). This is GET API which is used to fetch the details of product sku.

Request Body

These are form parameters:

  • WarehouseCode = ABCD
  • Category = PQRST

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.
WarehouseCode String Required Warehouse code as available in the WMS.
Category String Optional Inventory Category code.

Response Format

ON SUCCESS
{
"Stock":
[
{
"Warehouse":"GHAZIABAD",
"Quantity":200,
"ProductCode":"10002909",
"Description":"HCS TRADING ITEM - STABILIZER - 1 STEP (ALUMINIUM) SUITABLE FOR 1.5TR AIR CONDITIONER WITH LED DISPLAY",
"ProductName":"STABILIZER",
"PartNumber":"10002909",
"SerialNumber":"10002909",
"InventoryCategory":"CPSP",
"Supplier":"JCI",
"Length":1,
"Breadth":1,
"Height":1,
"Weight":1,
"Price":1,
"ReceivedDate":"Feb 8, 2018",
"AgeOfStock":481,
"StockStatus":"Received"
},
{
"Warehouse":"GHAZIABAD",
"Quantity":1,
"ProductCode":"10008567",
"Description":"SPARES - EVAP .COIL WITH HEADER (997 10400000 GRP - 997MM CHASSIS 4 PASS",
"ProductName":"SPARES",
"PartNumber":"10008567",
"SerialNumber":"10008567",
"InventoryCategory":"CPSP",
"Supplier":"JCI",
"Length":1,
"Breadth":1,
"Height":1,
"Weight":1,
"Price":1,
"ReceivedDate":"Feb 7, 2018",
"AgeOfStock":482,
"StockStatus":"Received"
}
],
"message":"WMS Stock Details",
"messageType":"Success"
}

ON ERROR
{
"message": "Invalid Organization Key",
"messageType" : "Error"
}
{
"message":"Warehouse code not found",
"messageType":"Error"
}

Error Message String

Error Messages Description
Invalid Organization Key Given secure key is invalid.
Warehouse code not found Given Warehouse code is either blank or invalid.
Inventory Category not found Given inventory category is invalid.

Sample Code

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

import java.net.URL;

public class WMS_Stock {

private static final String USER_AGENT = "Mozilla/5.0";
private static final String API_URL = "https://webservice.logixerp.com/Rachna/webservice/v2/WmsStock?secureKey=";
private static final int SECURE_KEY = SCCURE KEY;
private static final String WAREHOUSECODE = "DELHI";
private static final String CATEGORY = null;

private static final String ACCESS_URL = API_URL+SECURE_KEY+"&WarehouseCode="+WAREHOUSECODE+"&Category="+CATEGORY;

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://webservice.logixerp.com/Rachna/webservice/v2/WmsStock"
payload = {
'SecureKey':'secure_key',
'warehouseCode':'DELHI',
'category':None
}

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