Function
The Receiving API is used to receive items into inventory.
URL
{Root URL}/API/InventoryHandling/receive/{API Key} |
Parameters
Parameter | Description | Required | Comment | |
1 | Part_sourc | Source of the Part | Y | Can be "MAKE," "BUY," or "CONSG." |
2 | Uniq_key | Use to identify the part | Y | When uniq_key is used you do not need part_no. |
3 | Part_no | Part number you want to transfer | Y | The part_no can be used if you do not have the uniq_key. |
4 | Revision | Part revision level | N | Required when you use part_no if the part has a revision. |
5 | Custpartno | Customer part number | N | Use instead of part_no, if the part_sourc is consigned. |
6 | Custrev | Customer revision level | N | Required if custpartno is used and the part has a revision |
7 | Partmfgr | Part manufacturer | N | Used to specify part manufacturer. |
8 | Mfgr_pt_no | Manufacturer part number | N | Used with part manufacturer |
9 | Uniqmfgrhd | Manufacturer identification | N | Can be used in place of partmfgr and mfgr_pt_no. |
10 | Warehouse | Warehouse name | Y | Choose which warehouse the part will be received into. |
11 | Location | Location name | N | Used when the part is being received at a specific location in the warehouse. |
12 | Uniqwh | Warehouse identifier | Y | Choose which warehouse the part will be received into. Can be used in place of a warehouse, but needs a location. |
13 | WhNo | Warehouse number | Y | Choose which warehouse the part will be received into. Can be used in place of a warehouse and uniqwh, but needs a location. |
14 | W_Key | Inventory unique identifier key | Y | Choose which warehouse the part will be received into. |
15 | LotcodeAndSerialNo | Lot code or serialized | N | Required if the part is lot coded or serialized. |
16 | ExpDate | Expiration date | N | Required if the part is lot coded. Use the following date format: MM-DD-YYYY. |
17 | internalLotReference | Internal lot reference | N | Only needed if the part is lot coded. |
18 | SerialNo | Serial number | N | Required if the part is serialized. |
19 | QtyRec | Received quantity | Y | The amount of the part you are receiving. |
20 | QtyPerPackage | Quantity per package | ||
21 | Reason | Reason for transfer | Y | Can be: "BEGINNING RAW MATL. INV.," "CONSIGNED MATERIAL," "FREE SAMPLES," "MATERIAL ON TRIAL," "REPAIR RETURN FROM VENDOR," or "WARRANTY REPLACEMENT." |
22 | Gl_nbr | General ledger number | Y | Used to add a record of the transaction to the general ledger. |
23 | TransactionReference | Transaction reference | Y | This 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"
}
{
"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"
}
{
"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: