Create GRN


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


API is used to Create Goods Receipt Note. It creates the note of received goods or material of warehouse.

Request Header

AccessKey : logixerp

Request Body

These are form parameters:

  • productCode: QUBE0003,QUBE0002,QUBE0004,QUBE0005,QUBE0001
  • asnNumber: 111111
  • productQuantity: 5,2,3,2,8,8,1
  • vendorCode : INDRAPRASTHA
  • grnNumber : 222222
  • shipFrom : Delhi
  • supplierVendorcode : INDRAPRASTHA
  • customerCode : HERO
  • storageTypeCode : BASEMENT
  • inventoryCategoryCode : ABAX
  • serialType : true
  • barcodeGenerate : true
  • createGRN : true
  • createASN : true
  • Warehouse : Delhi
  • vehicleNumber : HR96547852
  • assignToUser : xxxx
  • Remarks : Ok
  • productMRP : 50
  • skuQuantity : 25
  • invoiceNumber : 87854
  • invoiceDate : 2019-11-18
  • invoiceValue : 5000
  • Batch : LAV50

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.
productCode String Required User can give single or multiple product codes comma separated.
asnNumber String Optional This is an optional parameter in case create ASN is false.
productQuantity String Required Product quantity is comma separated.
vendorCode String Required It should be as created in the master data.
grnNumber String Required It is a mandatory parameter.
shipFrom String Optional From where the shipment is shipped.
supplierVendorCode String Required it should be same as created in the master data.
customerCode String Required It should be same as available in the customer master data.
storageTypeCode String Required It shoulkd be same as created in the master data.
inventoryCategoryCode String Required it should be same as created in the master data.
serialType String Required Value - true or false
barcodeGenerate String Optional This is an optional parameter in case serial numbers are available in system..
createGRN String Required Value - true or false.
createASN String Optional This is an optional parameter in case SKU serial number is available. (Value - true or false).
warehouse String Required Name of the warehouse of which GRN will create.
vehicleNumber String Optional Number of vehicle through which goods move.
assignToUser String Optional Assign a user for the particular goods.
remarks String Optional if you wants to give any special instructions.
productMRP String Optional It is always in numeric.
skuQuantity String Optional SKU Quantity is always in Numeric.
invoiceNumber String Optional consignor's Invoice Number.
invoiceDate String Optional consignor's Invoice Date.
invoiceValue String Optional consignor's Invoice Value. It is used for the insurance purpose. It is always in numeric.
batch String Optional This is an optional parameter.
description String Optional In description user mention details which is related to goods..
receiptNumber String Optional Receipt number is that against which goods received.
skuNumber String Optional This is an optional parameter.
serialNumber String Optional Serial number is a barcode of SKU. Serial number is unique for each and every single quantity of the item. One serial barcode may not have multiple quantities but product barcodes may have multiple quantities. Product barcode will be fetched automatically from the product master if it is available.

Response Format

"message": "GRN created and added to the stock successfully",
"messageType": "Success",

"message": "Error_Message",
"messageType" : "Error"

Error Message String

Error Messages Description

Sample Code

import java.util.LinkedHashMap;

import java.util.Map;

public class CreateGRN {

private static final String ACCESS_KEY = "logixerp";
private static final String API_URL = "";
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("productCode", "PRODUCT0001");
params.put("asnNumber", "111111");
params.put("productQuantity", "1");
params.put("vendorCode", "MOSCHINO");
params.put("grnNumber", "222222");
params.put("shipFrom", "Delhi");
params.put("supplierVendorcode", "MOSCHINO");
params.put("customerCode", "2019");
params.put("storageTypeCode", "BASEMENT");
params.put("inventoryCategoryCode", "ABAX");
params.put("serialType", "true");
params.put("barcodeGenerate", "true");
params.put("createGRN", "true");
params.put("createASN", "true");
params.put("warehouse", "MICHELINKOLKATA");
params.put("vehicleNumber", "HR96547840");
params.put("assignToUser", "xxxx");
params.put("Remarks", "Ok");
params.put("productMRP", "50");
params.put("skuQuantity", "25");
params.put("invoiceNumber", "1234");
params.put("invoiceDate", "2019-12-12");
params.put("invoiceValue", "5000");
params.put("Batch", "6");
params.put("description", "");
params.put("receiptNumber", "");
params.put("skuNumber", "");

params.put("serialNumber", "");

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(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8"));


byte[] postDataBytes = postData.toString().getBytes("UTF-8");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestProperty("AccessKey", ACCESS_KEY);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestProperty("Content-Length", String.valueOf(postDataBytes.length));
Reader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
StringBuilder data = new StringBuilder();
for (int c; (c = >= 0;) {
String intentData = data.toString();


import requests

access_url = ""

params = {'SecureKey':'secure_key'}
payload = {
'productCode': 'PRODUCT0001',
'asnNumber': '111111',
'productQuantity': '5',
'vendorCode': 'INDRAPRASTHA',
'grnNumber' : '222222',
'shipFrom' : 'Delhi',
'supplierVendorcode' : 'INDRAPRASTHA',
'customerCode' : 'HERO',
'storageTypeCode' : 'BASEMENT',
'inventoryCategoryCode' : 'ABAX',
'serialType' : 'true',
'barcodeGenerate' : 'true',
'createGRN' : 'true',
'createASN' : 'true',
'Warehouse' : 'Delhi',
'vehicleNumber' : 'HR96547852',
'assignToUser' : 'xxxx',
'Remarks' : 'Ok',
'productMRP' : '50',
'skuQuantity' : '25',
'invoiceNumber' : '87854',
'invoiceDate' : '2019-11-18',
'invoiceValue' : '5000',
'Batch' : 'LAV50'


r =, params=params, headers=headers, data=payload)
print (r.text)
except requests.exceptions.RequestException as err:
print (err)
please wait...