Function
The Inventory handling Issue API is used to issue parts from a warehouse.
URL
{Root URL}/API/InventoryHandling/Issue/{API Key |
Parameters
Parameter | Description | Required | Comment | |
1 | IPKEY | The IPKEY is used to select a part | N | The IPKEY can be used as the main identifier for the part. If used, other parameters will be used to validate the IPKEY. |
2 | serialNo | Serial number | N | Required if the part being issued is serialized. |
3 | serialUniq | Serial information | N | Alternative to a serial number (serialNo). |
4 | part_sourc | Part source | Y | Can be "BUY," "MAKE," or "CONSG." |
5 | UNIQ_KEY | Part identification key | N | Can be used to choose the product. |
6 | part_no | Part number | Y | |
7 | Revision | Part's revision level | N | Required if the selected part has a revision level. |
8 | custPartNo | Customer part number | N | Used if the part source is "CONSG." |
9 | custRev | Customer part revision level | N | Used with a customer part number (custPartNo) if the part has a revision level. |
10 | partMfgr | Part manufacturer | N | Used to specify which manufacturer the part will come from. |
11 | mfgr_pt_no | Manufacturer's part number | N | Used to specify which manufacturer the part comes from. |
12 | uniqmfgrhd | Manufacturer part unique identifier | N | Used to specify which manufacturer the part comes from. |
13 | warehouse | Warehouse name | Y | Select which warehouse the part will be issued from. |
14 | location | Warehouse location | N | Choose the warehouse location the part will be issued from if there is one assigned. |
15 | uniqWh | Warehouse ID number | N | Can be used instead of a warehouse. |
16 | W_Key | Inventory unique identifier | N | Can be used to specify both a warehouse and a location. |
17 | lotCode | Lot code | N | Required if the selected part is lot coded. |
18 | expDate | N | Required if the part is lot coded. Use the following date format: MM-DD-YYYY. | |
19 | reference | Lot reference | N | Can only be used if the part is lot coded. |
20 | poNum | Purchase order number | N | Used only when there is lot code information. But is not needed if the part was received through inventory handling. |
21 | issuedQuantity | Issued quantity | Y | The amount to be issued. |
22 | issueTo | Where the part will be issued | Y | This is a user-defined field. |
23 | gl_nbr | General ledger number for the transaction | Y | Not required if the part source is "CONSG." |
24 | WoNo | Work order number | <n<> </n<> | Should remain empty unless created by KIT API |
25 | reason | Reason for issue | Y | Can be "INVENTORY ADJUSTMENTS," "SCRAP," "INSTORE ISSUES," "RETURNS TO VENDORS FROM STOCK." |
26 | transactionReference | Transaction reference | N | This is a user-defined field. |
27 | inStorReturn | |||
28 | deptKey | Shop floor department key | N | Used when issuing a part back to WIP from FGI. |
29 | actvKey | Shop floor activity key | N | Used when issuing a part back to WIP from FGI. |
30 | fk_userid | User ID | N |
Example Strings
No Lot Code and No Serialization
URL
?part_sourc=buy&uniqmfgrhd=UNIQMFGRHD&uniq_key=UNIQKEY&warehouse=WAREHOUSE&location=LOCATION&IssuedQuantity=1&issueTo=ISSUETO&gl_nbr=0000000-00-00 |
JSON
{ "part_source":"BUY", "uniqmfgrhd":"UNIQMFGRHD", "uniq_key":"UNIQKEY", "warehouse":"WAREHOUSE", "location":"LOCATION", "issuedQuantity":"1", "issueTo":"ISSUETO", "gl_nbr":"0000000-00-00" } |
Issue Serialized
URL
?part_sourc=buy&uniqmfgrhd=UNIQMFGRHD&uniq_key=UNIQKEY&serialNo=000000000000000000000000000000&warehouse=WAREHOUSE&location=LOCATION&IssuedQuantity=1&issueTo=ISSUETO&gl_nbr=0000000-00-00 |
JSON
{ "part_sourc":"BUY", "uniqmfgrhd":"UNIQMFGRHD", "uniq_key":"UNIQKEY" "serialNo":"000000000000000000000000000000", "warehouse":"WAREHOUSE", "location":"LOCATION", "issuedQuantity":"1", "issueTo":"ISSUETO", "gl_nbr":"0000000-00-00" } |
A successful request should return the following:
{ "$id":"1", "Code": "200", "Message": "Inventory added successfully.", "SessionId": "null", "IsValidUser":"true", "ResponseObject":"null" } |
Lot Code and No Serialization
Note: If a record is lot coded, the purchase order number (PONUM) is an integral part of the lot code. Since we will allow the user to enter the same lot code when receiving a different PO, you need to provide the PONUM in the string, or it will likely fail because the PONUM has not been provided as part of the lot code information.
{
"Gl_nbr":"1490000-00-00",
"transactionReference":"PI Adjustment",
"issuedQuantity":"5000",
"issueTo":"PI Adjustment",
"part_sourc":"Buy",
"uniq_key":"_3WE0OVX9A",
"uniqmfgrhd":"_3WE0OVX9F",
"location":"53J-05",
"warehouse":"STKRM1",
"lotcode":"6733527",
"Reference":"",
"expdate":"01-22-2022",
"ponum":"000000000129005",
"reason":"Inventory Adjustment"
}
Common Errors
API Key Error
If there is an error with the API key, the system will return an error message describing a failed API key:
{ "$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 Issue API has to be on the list for the Inventory Handling GL Defaults for "Issue."
URL Error
If there is an error within the URL, the system will return an HTTP error:
{ "$id":"1", "Code": 403, "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'." } |