1. PO Items API
1.1. PO Item Add

Functions

Item Add API is used to add items to existing Purchase Orders.

URL-{Root URL}/API/PO/ItemAdd/{API Key}

Parameters

 Parameter Description Required Comment
POITTYPE  Purchase Order Item Type  Y Can be INVT PART, MRO, or Services 
part_no Part Number Y Used to choose a part
revision Part Revision  N Required if Part_no is used 
uniq_key  Part Identifier Key N Can be used in place of part number and revision
partmfgr Part Manufacturer N Can be used to specify a manufacturer for a part. Must be an existing manufacturer for the part
mfgr_pt_no Manufacturer Part Number  N Can be used instead of part_no to choose an item
uniqmfgrhd Manufacturer Key  Y Can be used in place of partmfgr and mfgr_pt_no
uniqmfsp   N  
overage overage N Percentage of parts that can be received over the ordered qty.  
package Package  The item's package size. Can be AMMO BELT, BULK, CARTON, EACH, REAM, REEL, TRAY, TUBE
updatePLT Update Purchase Lead Time  N  
pur_ltime  Purchase Lead Time  N Must be numerical, followed by DY, WK, Mo
updateMinOrdMult Update Minimum/Multi order values.  N  
minorder Minimum Order N Minimum amount required per order. 
ordmult Multiple Order  N Amount that must be ordered over the min order.  
COSTEACH Cost Each  Cost of each ordered 
ORD_QTY Order Quantity  Y The amount ordered
updateMaterialCost Update Material Cost  N  
updateTargetPrice  Update Target Price N  
IS_TAX It the PO taxable  N  
ISFIRM Is Firm Planned  N Selects if the order is firm planned, preventing the MRP from overwriting it.  
FIRSTARTICLE First Article Inspection  N Does the PO require first article inspaction
supplierPartNumber  Supplier Part Number N  
INSPEXCNOTE Inspection Exception Note  N  
INSPEXCDOC Inspection Exception Code N  
PUR_UOFM Purchase Unit of Measurement  N  
U_OF_MEAS Unit of Measurement  N  Can be EACH, IN, DOZ, REEL, LOT, BULK, SQIN, SQFT, SQYD, SQMM, SQCM, SQME, GRAM, KGRM, MLTR, LITR, CC, OUNC, PINT, QUAR, GAL, M, FT, CM, LB, YARD

Example Strings

Add Item

Url-?poNum=PONUMBER&POITTYPE=INVT PART&part_no=PARTNUMBER&revision=REVISION&uniqmfgrhd=UNIQMFGRHD

JSON

{

'poNum':'PONUMBER',

'POITTYPE':'INVT PART',

'part_no':'PARTNUMBER',

'revision':'REVISION',

'uniqmfgrhd':'UNIQMFGRHD'

}

A successful request should result in

{

$id: "1",

Code: 200,

Message: "PO Items added successfully.",

SessionId: null,

IsValidUser: true,

-ResponseObject: {

$id: "2",

UNIQLNNO: "65ENDLS6VN",

PONUM: "1748",

UNIQ_KEY: "_45Z0YNRSR",

ITEMNO: "002",

COSTEACH: 0,

ORD_QTY: 0,

RECV_QTY: 0,

REJ_QTY: 0,

ACPT_QTY: 0,

NOTE1: "",

IS_TAX: false,

TAX_PCT: 0,

IS_CONTR: false,

OVERAGE: 5,

POITTYPE: "INVT PART",

L_PRINT: false,

NO_PKG: 0,

PART_NO: "416-242424",

REVISION: "",

DESCRIPT: "",

PARTMFGR: "GENR",

MFGR_PT_NO: "416-242424",

PACKAGE: "EACH",

PART_CLASS: "",

PART_TYPE: "",

U_OF_MEAS: "EACH"

,

PUR_UOFM: "EACH",

S_ORD_QTY: 0,

ISFIRM: false,

UNIQMFGRHD: "_45Z0YOITA",

FIRSTARTICLE: false,

INSPEXCEPT: false,

INSPEXCEPTION: "",

INSPEXCINIT: "",

INSPEXCDT: null,

INSPEXCNOTE: "",

INSPEXCDOC: "",

LCANCEL: false,

UNIQMFSP: "",

INSPECTIONOTE: "",

lRemvRcv: false,

UNIQSUPNO: "_1D50WFSWT",

pur_ltime: 0,

pur_lunit: "",

updatePLT: false,

minorder: 0,

ordmult: 0,

updateMinOrdMult: false,

updateMaterialCost: false,

Targetprice: 0,

updateTargetPrice: false,

supplierPartNumber: "",

PoitschdList: [ ]

}

}

Common Error Messages

JSON Error

If there is an error with the setup of the JSON string (such as a misplaced comma or other punctuation) the system will return the following error.

{

"$id": "1",

"Code": 403,

"Message": "'PO Items' Object is not initialized properly.",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}

Parameter Error

If there is an error with an individual parameter the system will return an error message describing the error

{

"$id": "1",

"Code": 403,

"Message": "PO Items add failed.UniqMfgrhd is Invalid.",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}

1.2. PO Item Edit

Functions

URL-{Root URL}/API/PO/ItemEdit/{API Key}

Parameters

 Parameter Description Required Comment
poNum  Purchase Order Number Y
uniqueLnNo  Unique PO Item Identifier Y  
POITTYPE  Purchase Order Item Type  Y Can be INVT PART, MRO, or Services 
part_no Part Number Y Used to choose a part
revision Part Revision  N Required if Part_no is used 
uniq_key  Part Identifier Key N Can be used in place of part number and revision
partmfgr Part Manufacturer N Can be used to specify a manufacturer for a part. Must be an existing manufacturer for the part
mfgr_pt_no Manufacturer Part Number  N Can be used instead of part_no to choose an item
uniqmfgrhd Manufacturer Key  Y Can be used in place of partmfgr and mfgr_pt_no
uniqmfsp   N  
overage overage N Percentage of parts that can be received over the ordered qty.  
package Package  The item's package size. Can be AMMO BELT, BULK, CARTON, EACH, REAM, REEL, TRAY, TUBE
updatePLT Update Purchase Lead Time  N  
pur_ltime  Purchase Lead Time  N Must be numerical, followed by DY, WK, Mo
updateMinOrdMult Update Minimum/Multi order values.  N  
minorder Minimum Order N Minimum amount required per order. 
ordmult Multiple Order  N Amount that must be ordered over the min order.  
COSTEACH Cost Each  Cost of each ordered 
ORD_QTY Order Quantity  Y The amount ordered
updateMaterialCost Update Material Cost  N  
updateTargetPrice  Update Target Price N  
IS_TAX It the PO taxable  N  
ISFIRM Is Firm Planned  N Selects if the order is firm planned, preventing the MRP from overwriting it.  
FIRSTARTICLE First Article Inspection  N Does the PO require first article inspaction
supplierPartNumber  Supplier Part Number N  
INSPEXCNOTE Inspection Exception Note  N  
INSPEXCDOC Inspection Exception Code N  
PUR_UOFM Purchase Unit of Measurement  N  
U_OF_MEAS Unit of Measurement  N  Can be EACH, IN, DOZ, REEL, LOT, BULK, SQIN, SQFT, SQYD, SQMM, SQCM, SQME, GRAM, KGRM, MLTR, LITR, CC, OUNC, PINT, QUAR, GAL, M, FT, CM, LB, YARD

Example Strings

Add Item

Url-?poNum=PONUMBER&UNIQLNNO=UNIQLNNO&costeach=10&ord_qty=1'

JSON

{

'poNum':'PONUMber',

'UNIQLNNO':'UNIQLNNO',

'costeach':'10',

'ord_qty':'1'

}

A successful request should result in

{

$id: "1",

Code: 200,

Message: "PO Items edited successfully.",

SessionId: null,

IsValidUser: true,

ResponseObject: null

}

Common Error Messages

JSON Error

If there is an error with the setup of the JSON string (such as a misplaced comma or other punctuation) the system will return the following error.

{

"$id": "1",

"Code": 403,

"Message": "'PO Items' Object is not initialized properly.",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}

Parameter Error

If there is an error with an individual parameter the system will return an error message describing the error

{

"$id": "1",

"Code": 403,

"Message": "PO Items add failed.UniqMfgrhd is Invalid.",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}

1.3. PO Item Delete

Functions

PO Delete Item API is used to remove existing items from Purchase Orders.

URL-{Root URL}/API/PO/ItemDelete/{API Key}

Parameters

Parameter  Description Required Comment
PoNum  Purchase Order Number        
itemNumber Item Number  N Used to choose which item to delete from the PO 
part_no  Part Number N Used to choose which item to delete from the PO
revision Part Revision Used with Part_no to choose an item. 
uniq_key Part Unique Identifier  N Can be used instead of part_no and revision
partMfgr Part Manufacturer N Can be used to choose item to delete from PO by part manufacturer
mfgr_pt_no Manufacturer Part Number  N Used with partMfgr.
uniqmfgrhd Unique manufacturer part identifier N Can be used in place of mfgr_pt_no and uniqmfgrhd
uniqlnno  Unique PO item Identifier N Can be used in place of part_no or partMfgr

 

Example Strings

Delete Item

URL-?PoNum=PONUMBER&UNIQLNNO=UNIQLNNO

JSON

{

'poNum':'PONUMBER'

'UNIQLNNO':'UNIQLNNO'

}

A successful request should return

{

$id: "1",

Code: 200,

Message: "PO Items deleted successfully.",

SessionId: null,

IsValidUser: true,

ResponseObject: null

}

Common Errors

Incorrect Parameter

If a parameter is incorrect the system will return an error message describing the error

{

"$id": "1",

"Code": 403,

"Message": "PO Items delete failed.Po Item does not exists.",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}

URL Error

If there is an error with the URL the system will return the following error message

{

"$id": "1",

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

"MessageDetail": "No action was found on the controller 'Po' that matches the name 'ItemDelet'."

}

1.4. PO Item Get API

Functions

PO Item Get API is used to get information about the items on existing Purchase Orders

URL-{Root URL}/PO/ItemGet/{API Key}

Parameters

Parameter  Description Required Comment
poNum Purchase Order Number N  
supplierName Supplier Name N Can be used to sort POs by supplier
uniqsupno Supplier Identification Number N Can be used in place of supplier name
partNo Part Number N Can be used to sort POs by part
revision Part Revision N Used alongside partNo
uniqKey Part Unique Identifier N Can be used in place of art number and revision
uniqlnno    
poStatus Purchase Order Status  N Can be Open, Cancelled, Closed 
mfgrPtNo Manufacturer Part Number  Can be used to sort POs by manufacturer part number
partmfgr Part Manufacturer N Can be used to sort POs by Manufacturer
withBalance POs with Balace N Can be true or false
received PO Received N Can be true or false
scheduledPriorTo    

Example Strings

Get Item

URL-?PoNum=PONUMBER

JSON

{

'PoNum':'PONUMBER'

}

A successful request should return

{

$id: "1",

Code: 200,

Message: "PO Items details:",

SessionId: null,

IsValidUser: true,

-ResponseObject: [

-{

$id: "2",

UNIQLNNO: "_1ZM0LAXRD",

PONUM: "000000000001749",

UNIQ_KEY: "_4750SWEOD",

ITEMNO: "001",

COSTEACH: 0.88,

ORD_QTY: 100,

RECV_QTY: 0,

REJ_QTY: 0,

ACPT_QTY: 0,

NOTE1: "",

IS_TAX: false,

TAX_PCT: 0,

IS_CONTR: false,

OVERAGE: 5,

POITTYPE: "Invt Part",

L_PRINT: false,

NO_PKG: 0,

DESCRIPT: "",

PARTMFGR: "GENR",

MFGR_PT_NO: "",

PACKAGE: "BULK",

PART_CLASS: "",

PART_TYPE: "",

U_OF_MEAS: "EACH",

PUR_UOFM: "EACH",

S_ORD_QTY: 100,

ISFIRM: false,

UNIQMFGRHD: "_4750SXAYM",

FIRSTARTICLE: false,

INSPEXCEPT: false,

INSPEXCEPTION: "",

INSPEXCINIT: "",

INSPEXCDT: null,

INSPEXCNOTE: "",

INSPEXCDOC: "",

LCANCEL: false,

UNIQMFSP: "",

INSPECTIONOTE: "",

lRemvRcv: false,

POSTATUS: "OPEN",

PODATE: "2014-10-31T13:49:00",

Part_No: "416-110989",

Revision: "b",

Part_Sourc: "BUY",

Supname: "Romp",

Status: "APPROVED",

SUP_TYPE: "INDEPENDENT REP",

Supid: "0000000005"

}

]

}

Common Errors

Not Enough Information

If there is not enough data provided or the parameters provided are invalid to retrieve the PO information the system will return the following error message.

{

"$id": "1",

"Code": 403,

"Message": "PO Items details failed:Not enough information to return the data, please provide valid parameters.",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}