Function

  

The Receiving API is used to receive items into inventory.


URL

{Root URL}/API/InventoryHandling/receive/{API Key}


Parameters



ParameterDescriptionRequiredComment
1Part_sourcSource of the PartYCan be "MAKE,"  "BUY," or "CONSG."
2Uniq_keyUse to identify the partYWhen uniq_key is used you do not need part_no.
3Part_noPart number you want to transferYThe part_no can be used if you do not have the uniq_key.
4RevisionPart revision levelNRequired when you use part_no if the part has a revision.
5CustpartnoCustomer part numberNUse instead of part_no, if the part_sourc is consigned.
6CustrevCustomer revision levelNRequired if custpartno is used and the part has a revision
7PartmfgrPart manufacturerNUsed to specify part manufacturer.
8Mfgr_pt_noManufacturer part numberNUsed with part manufacturer 
9UniqmfgrhdManufacturer identificationNCan be used in place of partmfgr and mfgr_pt_no.
10WarehouseWarehouse nameYChoose which warehouse the part will be received into.
11LocationLocation nameNUsed when the part is being received at a specific location in the warehouse.
12UniqwhWarehouse identifierYChoose which warehouse the part will be received into. Can be used in place of a warehouse, but needs a location.
13WhNoWarehouse numberYChoose which warehouse the part will be received into. Can be used in place of a warehouse and uniqwh, but needs a location.
14W_KeyInventory unique identifier keyYChoose which warehouse the part will be received into.
15LotcodeAndSerialNo
Lot code or serializedNRequired if the part is lot coded or serialized.
16ExpDateExpiration dateNRequired if the part is lot coded. 
Use the following date format: MM-DD-YYYY.
17internalLotReferenceInternal lot referenceNOnly needed if the part is lot coded.
18SerialNoSerial numberNRequired if the part is serialized.
19
QtyRecReceived quantityYThe amount of the part you are receiving.
20QtyPerPackageQuantity per package

21ReasonReason for transferYCan be: "BEGINNING RAW MATL. INV.," "CONSIGNED MATERIAL," "FREE SAMPLES," "MATERIAL ON TRIAL,"  "REPAIR RETURN FROM VENDOR," or "WARRANTY REPLACEMENT."
22Gl_nbrGeneral ledger numberYUsed to add a record of the transaction to the general ledger.
23TransactionReferenceTransaction referenceYThis is a user-defined field.

 

Example Strings

No Lot Code and No Serialization

  

URL

 

?part_sourc=BUY&part_no=PARTNUMBER&revision=REVISION&W_Key=WKEY&QtyRec=1&reason=CONSIGNED MATERIAL&TransactionReference=New Customer Inventory&Gl_Nbr=GENERALLEDGERNUMBER

  

JSON

{

part_sourc":"BUY",

"part_no":"REVISION",

"W_Key":"WKEY",

"QtyRec":"1",

"reason":"CONSIGNED MATERIAL",

"transactionReference":"New Customer Inventory",

"Gl_Nbr":"GENERALLEDGERNUMBER"

}


Lot Code and Serialization

 

URL

?part_sourc=BUY&UNIQ_KEY=UNIQKEY&LotCodeAndSerialNo=LOTCODE@SERIALNUMBER&EXPDATE=MM-DD-YYYY&W_Key=WKEY&QtyRec=1&reason=CONSIGNED MATERIAL&transactionReference=New Customer Inventory&Gl_Nbr=0000000-00-00


JSON:

{

"part_sourc":"BUY",

"UNIQ_KEY":"UNIQKEY",

"lotCodeAndSerialNo":"LOTCODE@SERIALNUMBER",

"EXPDATE":"MM-DD-YYYY",

"W_Key":"WKEY",

"QtyRec":"1",

"reason":"CONSIGNED MATERIALS",

"transactionReference":"New Customer Inventory",

"Gl_Nbr":"0000000-00-00"

}


   

Lot Code with Multiple Serial Numbers:

"LotcodeAndSerialNo":"LotCode1@1230120,234455,33333 


Lot Code with No Serialization

Example 1


The user provides uniq_key, uniqmfgrhd, no part-no, and no mpn:

{
 "Part_Sourc":"BUY",
    "uniq_key":"_01F15SZAH",
    "uniqmfgrhd":"_01F15T9BZ",
    "WareHouse" :"MAIN1",
    "Location":"",
    "QtyRec":"16",
    "expDate":"09/04/2017",
 "REFERENCE":"test21",
    "GL_NBR":"1430000-00-00", 
    "LotcodeAndSerialno":"Lot-10"

}
      

  

Example 2


The user provides uniq_key, uniqmfgrhd, and mpn:
{
 "Part_Sourc":"BUY",
    "uniq_key":"_01F15SZAH",
    "uniqmfgrhd":"_01F15T9BZ",
    "partmfgr":"AVX",
    "WareHouse" :"MAIN1",
    "Location":"",
    "QtyRec":"15",
    "mfgr_pt_no":"CR10-2610FT", 
 "expDate":"09/04/2017",
 "REFERENCE":"test21",
    "GL_NBR":"1430000-00-00", 
    "LotcodeAndSerialno":"Lot-09"
}
  
     
Example 3


The user provides Part_no, revision, MPN, and no uniq_key,uniqmfgrhd:    
{
 "Part_Sourc":"BUY",
    "Part_No":"101-0001707",
    "Revision":"",
    "partmfgr":"AVX",
    "WareHouse" :"MAIN1",
    "Location":"",
    "QtyRec":"1",
    "mfgr_pt_no":"CR10-2610FT", 
   "expDate":"09/04/2017",
   "REFERENCE":"test21",
    "GL_NBR":"1430000-00-00", 
    "LotcodeAndSerialno":"Lot-09"
}

 

No Lot Code, but Serialized

  

URL: 

?Part_sourc=BUY&part_no=PARTNUMBER&lotcodeAndSerialNo=000000000000000000000000000000&W_KEY=WKEY&QtyRec=1&reason=CONSIGNED MATERIAL&transactionReference=New Customer Inventory&Gl_Nbr=0000000-00-00 

     

JSON

{

"part_sourc":"BUY",

"part_no":"PARTNUMBER",

"lotCodeAndSerialNo":"000000000000000000000000000000",

"W_Key":"WKEY",

"QtyRec":"1",

"reason":"CONSIGNED MATERIAL",

"transactionReference":"New Customer Inventory",

"Gl_Nbr":"0000000-00-00"

}

   

Successful requests should return the following:

{

"$id":"1",

"Code":"200",

"Message":"Inventory added successfully.",

"SessionId":"null",

"IsValidUser":"true",

"ResponseObject":"null"

}

   

Common Errors

API Key Error

  

If there is an error with the entered API key, the system will return an error describing it:

{

"$id": "1",

"Code": "403",

"Message": "Invalid API Key.",

"SessionId": "null",

"IsValidUser": "false",

"ResponseObject": "null"

}

   

Incorrect Parameter

  

If an incorrect parameter value is used, the system will return an error describing the incorrect parameter:

{

"$id":"1",

"Code": "403",

"Message": "Failed:Please provide valid GL_NBR.",

"SessionId": "null",

"IsValidUser": "true",

"ResponseObject": "null"

}

     

The GL_nbr parameter for the Receive API must be on the list for the Inventory Handling GL Defaults for receiving:


URL Error

  

If there is an error within the URL, the system will return an HTTP error:

{

"$id": "1",

"Message": "No HTTP resource was found that matches the request URI 'http://localhost/api/InventoryHandling/Receiv/123456789'.",

"MessageDetail": "No action was found on the controller 'InventoryHandling' that matches the name 'Receiv'."

}

   

 

Note: if you are creating a new location when transferring, the following needs to be checked:

In the Inventory Control Management module, the MFGR that you are creating the new location under needs to have the "Allow Auto Creating Location at Receiving" box checked:

   

In SQL Settings, the warehouse you are receiving into needs to have the " Allow Auto Create Location at Receiving" box checked: