Function
The Purchase Order (PO) Schedule Add API is used to add scheduling information to existing POs.
URL
{Root URL}/API/PO/ScheduleAdd/{API Key} |
Parameters
| Parameter | Description | Required | Comment |
1 | poNum | Purchase order number | Y |
|
2 | uniqLnNo | PO unique item identifier | Y |
|
3 | schd_date | Schedule date | N | Will default to the current date, or enter the date in the following format: MM-DD-YYYY. |
4 | req_date | Required date | N | Will default to the current date, or enter the date in the following format: MM-DD-YYYY. |
5 | schd_qty | Scheduled quantity | Y | Must be equal to or less than the order quantity. |
6 | warehouse | Warehouse | N | The warehouse where the item will be received. |
7 | location | Warehouse location | N | Used with warehouse to designate a location. |
8 | origcommitdt | Commit date | N | Will default to the current date, or enter the date in the following format: MM-DD-YYYY. |
9 | schdNotes | Schedule notes | N | Can be used to attach a schedule note to the PO. |
10 | GL_NBR | General Ledger account number | N |
|
11 | REQUESTOR | Name of requestor | N |
|
12 | WOPRJNUMBER | WO or Project number scheduled qtys will be allocated to upon receipt | N |
|
Example Strings
PO Add Schedule Information
URL
?poNum=PONUMBER&uniqLnNo=UNIQLNNO&SCHD_DATE=MM-DD-YYYY&REQ_DATE=MM-DD-YYYY&SCHD_QTY=QTY&Warehouse=WAREHOUSE&LOCATION=LOCATION&ORIGCOMMITDT=MM-DD-YYYY&SCHDNOTES=NOTE |
JSON
{ "poNum":"PONUMBER", "uniqLnNo":"UNIQLNNO", "SCHD_DATE":"MMM-DD-YYYY", "REQ_DATE":"MMM-DD-YYYY", "SCHD_QTY":"QTY", "Warehouse":"WAREHOUSE", "LOCATION":"LOCATION", "ORIGCOMMITDT":"MMM-DD-YYYY", "SCHDNOTES":"NOTE" } |
A successful add should result in the following:
{ "$id": "1", "Code": "200", "Message": "PO Schedule added successfully.", "SessionId": "null", "IsValidUser": "true", "-ResponseObject": { "$id": "2", "UNIQDETNO": "O2YHUQB45I", "UNIQLNNO": "_47A0PHH67", "SCHD_DATE": "2014-11-07T00:00:00", "REQ_DATE": "2014-11-07T00:00:00", "SCHD_QTY": "5", "RECDQTY": "0", "BALANCE": "5", "GL_NBR": "", "REQUESTTP": "Invt Recv", "REQUESTOR": "", "UNIQWH": "", "LOCATION": "", "WOPRJNUMBER": "", "COMPLETEDT": "null", "PONUM": "1751", "ORIGCOMMITDT": "2014-11-04T00:00:00", "SCHDNOTES": "test", "UNIQMFGRHD": "_44Y0X2L9H", "UNIQ_KEY": "_44Y0WP6H4", "WAREHOUSE": "MAIN1", "ORD_QTY": "0", "RECV_QTY": "0", "POITTYPE": "Invt Part", "ITEMNO": "null", "PART_NO": "null", "REVISION": "null", "PARTMFGR": "null", "MFGR_PT_NO": "null" } } |
Common Errors
API Key Error
If there is an error with the API key, the system will return an error message describing it:
{ "$id": "1", "Code": "403", "Message": "Invalid API Key.", "SessionId": "null", "IsValidUser": "false", "ResponseObject": "null" } |
URL Error
If there is an error with the URL, the system will return an HTTP not found error:
{ "$id": "1", "Message": "No HTTP resource was found that matches the request URI 'http://localhost/api/POScheduleAdd/123456789'.", "MessageDetail": "No type was found that matches the controller named 'POScheduleAdd'." } |
Schedule Add Failed
If the parameter being used is invalid or the record being retrieved no longer exists, the system will return a "Schedule Details" failed message:
{ "$id": "1", "Code": "403", "Message": "PO Schedule add failed.An error occurred while executing the command definition. See the inner exception for details.", "SessionId": "null", "IsValidUser": "true", "ResponseObject": "null" } |