Function


The Sales Order (SO) Item Edit API is used to modify details about items (standard line items and miscellaneous line items) on an existing SO. 


 

URL


{Root URL}/API/SO/ItemEdit/{API Key}


  

Parameters (for a standard line item)



 ParameterDescriptionRequiredComment
1SoNoSales order numberY 
2line_noLine numberYMust provide either the Line_no or UNIQUELN.
3part_noPart numberYThe part that is being added to the SO or is changing details of the SO, such as order quantity, status, etc. for the part number you provide.
4revisionPart revision levelYIf providing a part number, you must also provide a revision.
5uniq_keyItem identifierNCan be used instead of a part number and a revision.
6U_of_MeasUnit of measurementNThe Item"s unit of measurement.
7eachQtyEach delivery quantityNIf this parameter is used, then it has to be greater than "0" and less than the amount ordered.
8ord_qtyQuantity orderedNOnly required if changing the order quantity.
9soDet_DescItem descriptionN
10trans_daysTransfer daysNWill be automatically entered by the system, and can be changed. 
11fstduedtFirst due dateNWill be automatically entered by the system, and can be changed.
12deliFreqDelivery frequencyNCan be "DY", "WK", or "MO."
13noteSO item noteNCan be used to add a note to the item.
14statusSO item statusNOnly needed if changing line item status. and can be "Standard," "Priority-1," "Priority-2," "Cancel," or "Closed."
15w_keyWarehouse unique record identifierNUsed if the item is a "BUY" or "MAKE" part. 
16UNIQUELNUnique key for line itemYYou must provide either a Line_no or a UNIQUELN. If there is more than one record with the same line_no and with the same SoNO, then you must use a Uniqueln.


 

Parameters (for a miscellaneous line item)


 ParameterDescriptionRequiredComment
SoNoSales order numberY 
line_noLine numberYMust provide either the Line_no or UNIQUELN.
part_noPart numberYThe part that is being added to the SO or is changing details of the SO, such as order quantity, status, etc. for the part number you provide.
revisionPart revision levelYIf providing a part number, you must also provide a revision.
uniq_keyItem identifierNCan be used instead of a part number and a revision.
uOfMeasUnit of measurementNThe Item"s unit of measurement.
eachQtyEach delivery quantityNIf this parameter is used, then it has to be greater than "0" and less than the amount ordered.
ord_qtyQuantity orderedNOnly required if changing the order quantity.
soDet_DescItem descriptionN
trans_daysTransfer daysNWill be automatically entered by the system, and can be changed. 
fstduedtFirst due dateNWill be automatically entered by the system, and can be changed.
deliFreqDelivery frequencyNCan be "DY", "WK", or "MO."
noteSO item noteNCan be used to add a note to the item.
statusSO item statusNOnly needed if changing line item status. and can be "Standard," "Priority-1," "Priority-2," "Cancel," or "Closed."
w_keyWarehouse unique record identifierNUsed if the item is a "BUY" or "MAKE" part. 
UNIQUELNUnique key for line itemYYou must provide either a Line_no or a UNIQUELN. If there is more than one record with the same line_no and with the same SONO, then you must use a Uniqueln.
U_of_Meas
Unit of measurementNThe item's unit of measurement is not required when using the edit API. 

 

 

Example Strings


Edit an Existing SO Item and Changing the Order Qty 


URL


?SoNo=SONO&UNIQUELN=UNIQUELN&PART_NUM=PARTNUMBERrevision=REVISION&UOFMEAS=EACH&TRANSFER_DAYS=5 &ORD_QTY=20&EACHQTY=2&STATUS=STANDARD&DELIFREQ=MO



JSON


"sono":"sales order number", 

"Line_no": "line item number", 

"Part_Num":"part number",

"revision":"revision",

"Ord_Qty":"40"

}



Edit an Existing SO Item and Changing The Status to "Admin Hold"

 

"sono":"Sales Order number", 

"Uniqueln": "UniqueLN", 

"Part_Num":"Partnumber",

"revision":"revision",

"status":"Admin Hold"

}


 

A successful request returns the following.


The example below adds more order quantity:


 



Common Errors


URL Error


If there is a problem with 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/SOItemEdit/123456789".",

"MessageDetail": "No type was found that matches the controller named "SOItemEdit"."

}



API Key Error


{

"$id": "1",

"Code": "403",

"Message": "Invalid API Key.",

"SessionId": "null",

"IsValidUser": "false",

"ResponseObject": "null"

}



Parameter Error


If there is an error with one of the entered parameters, the system will return an error message describing it:


{

"$id": "1",

"Code": "403",

"Message": "Sales Order does not exists.",

"SessionId": "null",

"IsValidUser": "true",

"ResponseObject": "null"

}


Note: If the Line item balance is "0," then you cannot edit the "Line Item Status" without increasing the quantity.