1. PO Main API

Purchase Order API allows you to easily interact with purchase orders outside of the ManEx Applications. There are three different levels of the PO API, this allows you to specifically interact with the different aspects of the PO without having to rework all parts. The three different levels are PO main, PO item, and PO item schedule. 

 

 

1.1. PO Main Add

The PO add function is used to add a new PO. An item must be added to the PO tables as well. Scheduling does not need to be added at this point.

URL-{Root URL}/api/PO/Add/{API KEY}

Parameters

Parameter Description Required Comment
supName Supplier Name Y  
confirmName Confirm Name N User Input, No validation
poDate Purchase order date. N If not entered manually will default to today’s date
FreightIncluded Freight Included N Can be 1 or 0, default is 0.
buyerName Name of the Buyer N Has to be entered in the following format [LastName, FirstName]. Must be a buyer in the system.
remitToLink The link to the Remit to address N If entered it must be a valid link.
confirmToLink The link to the Confirm to Address N
receiveToLink The link to the receiving address N If entered it must be a valid link
deliveryTime The delivery time for the receiving address N Must be in a 24 hour format, e.g. ‘13:00’
Terms Payment terms for the supplier. N Can be NET 10, NET 15, NET 30, NET 30/2% 10, NET 45, COD, NONE
FOB   N  
shipVia The method of shipping N  
shipCharge
N  
shippingAmount   N Default 0, Entered manually
isShippingTaxable Choose whether or not the shipping is taxable N Can be 0 or 1, default 0
shippingTaxPct The amount of the shipping tax N Default 0.00. If a value is entered here isShippingTaxable must be set as 1
billToLink This links the record to the supplier's billing address. N If entered, it has to be a valid link.
POItemsList N 
POITTYPEPurchase Order Item Type
YCan be INVT PART, MRO, or Services
part_no
Part Number
Y
Used to choose a part
UNIQ_KEY
Part Identifier Key
N
Can be used instead of part number and revision
RevPart Revision
NRequired if Part_no is used
UniqMfgrhdManufacturer Key
NCan be used in place of partmfgr and mfgr_pt_no
PARTMFGRPart Manufacturer
NCan be used to specify a manufacturer for a part. Must be an existing manufacturer for the part
MFGR_PT_NOManufacturer Part Number
NCan be used instead of part_no to choose an item
ORD_QTYOrder Qty
YThe amount ordered
PoitschdList N 
SCHD_QTYScheduled Qty
NMust be equal to or less than order quantity
SCHD_DATESchedule DateNWill default to current date or enter in MM-DD-YYYY format

Example PO Add String-

URL-{Root URL}/api/PO/Add/{API Key}

JSON

{

"supName":supName",

"PoItemsList":

[{

"POITTYPE":"POITTYPE",

"UNIQ_KEY":"UNIQ_KEY",

"part_no":"part_no",

"Rev":"Rev",

"UniqMfgrhd":"UniqMfgrhd",

"PARTMFGR":"PARTMFGR",

"MFGR_PT_NO":"MFGR_PT_NO",

"ORD_QTY":"ORD_QTY",

"PoitschdList":

[{

"SCHD_QTY":"SCHD_QTY",

"SCHD_DATE":"SCHD_DATE"

}]

}]

}

1.2. PO Main Edit

The PO add function is used to add a new PO. An Item must be added to the PO tables as well. Scheduling does not need to be added at this point.

URL-{Root URL}/api/PO/Edit/{API KEY}

Parameters

Parameter Description Required Comment
supName Supplier Name Y  
confirmName Confirm Name N User Input, No validation
poDate Purchase order date. N If not entered manually will default to today’s date
FreightIncluded Freight Included N Can be 1 or 0, default is 0.
buyerName Name of the Buyer N Has to be entered in the following format [LastName, FirstName]. Must be a buyer in the system.
remitToLink The link to the Remit to address N If entered it must be a valid link.
confirmToLink The link to the Confirm to Address N
receiveToLink The link to the receiving address N If entered it must be a valid link
deliveryTime The delivery time for the receiving address N Must be in a 24 hour format, e.g. ‘13:00’
Terms Payment terms for the supplier. N Can be NET 10, NET 15, NET 30, NET 30/2% 10, NET 45, COD, NONE
FOB   N  
shipVia The method of shipping N  
shipCharge N  
shippingAmount   N Default 0, Entered manually
isShippingTaxable Choose whether or not the shipping is taxable N Can be 0 or 1, default 0
shippingTaxPct The amount of the shipping tax N Default 0.00. If a value is entered here isShippingTaxable must be set as 1
billToLink This links the record to the supplier's billing address. N If entered it has to be a valid link.

Example Strings

PO Add String

URL-?poNUM=PONUMBER&supName=SUPPLIERNAME&POUNIQUE=POUNIQUE

JSON

{

'PoNUM':'PONUMBER',

'supName':'SUPPLIERNAME',

'POUNIQUE':'POUNIQUE',

}

A successful request should result in

{

$id: "1",

Code: 200,

Message: "Purchase Order edited successfully.",

SessionId: null,

IsValidUser: true,

ResponseObject: null

}

Common Errors

Incorrect Parameters

If there is an error with an entered parameter the system should return a message detailing which parameter there is a problem with.

{

"$id": "1",

"Code": 403,

"Message": "Purchase Order edit failed.UniqSupNo does not exists in SUPINFO Table.",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}

JSON Error

If there is an error in the JSON string the system will return the following error message.

{

"$id": "1",

"Code": 403,

"Message": "'Purchase Order' Object is not initialized properly.",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}

1.3. PO Main Get

Function

The get function of the PO Main can be used to search the databases for POs based on a variety of parameters.

URL: {Root URL}/api/PO/Get/{API Key}

Parameters

Parameter  Description Required Comment
poNum Purchase Order Number N
supName Supplier Name N Name of the supplier the PO is going to.
uniqSupNo Unique Supplier Identifier Number N Can be used in place of supplier name
partNo  Part Number N Find Purchase Orders containing the part number
revision Part Revision N Used alongside part number
uniqKey Part Unique Identifier  N Used in place of part number and revision
uniqlnno Unique N  
poStatus  Purchase Order Status N Can be Open, Cancelled, Closed
mfgrPtNo Manufacturer Part Number N  
partmfgr Part Manufacturer  N  
withBalance   N  
received  PO Received or Not  N Can be true or false
scheduledPriorTo POs Scheduled Before Date  N Use MM-DD-YYYY format

Example Strings

Purchase Order Get

URL-?PoNum=PONUM

JSON

{

'PoNum':'PONUM'

}

A successful request should result in the following

{

$id: "1",

Code: 200,

Message: "Purchase Order details:",

SessionId: null,

IsValidUser: true,

-ResponseObject: [

{

$id: "2",

PONUM: "000000000001745",

PODATE: "2014-09-18T10:40:00",

POSTATUS: "OPEN",

CONUM: 0,

VERDATE: "2014-10-28T16:38:00",

BUYER: "",

APPVNAME: "T1000",

FINALNAME: "T1000",

POTAX: 0,

POTOTAL: 25,

TERMS: "NET 30/2% 10",

PONOTE: "",

POFOOTER: "",

CLOSDDATE: null,

IS_PRINTED: true,

C_LINK: "_1D50WHB6G",

R_LINK: "_1D50WGLC4",

I_LINK: "_0TG0WZ7T2",

B_LINK: "_3I30XB5DF",

SHIPCHG: 1,

IS_SCTAX: true,

SCTAXPCT: 8.25,

CONFNAME: "",

CONFIRMBY: "",

SHIPCHARGE: "",

FOB: "ORIGIN-CUST P/U",

SHIPVIA: "CUST PICK UP",

DELTIME: "12:00",

ISINBATCH: false,

RECONTODT: 0,

ARCSTAT: "",

POPRIORITY: "Standard",

POACKNDOC: "",

VERINIT: "T1000",

UNIQSUPNO: "_1D50WFSWT",

POCHANGES: "New PO created by User: T1000, on 09/18/2014 10:39:34, PO Total: $25.00",

LFREIGHTINCLUDE: false,

POUNIQUE: "_45Z0MUI59",

CurrChange: "",

Acknowledged: false,

RecVer: "AAAAAAAuqVI=",

Supname: "Anixter",

Status: "APPROVED",

SUP_TYPE: "DISTRIBUTOR",

Supid: "0000000003"

}

]

}

Common Errors

Incorrect Parameters

If incorrect parameters are used the system will return the following

{

"$id": "1",

"Code": 403,

"Message": "Purchase Order details failed:",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}

Not Enough Information

If the information provided is not enough to pull purchase order details the system will return

{

"$id": "1",

"Code": 403,

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

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}