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)
Parameter | Description | Required | Comment | |
1 | SoNo | Sales order number | Y | |
2 | line_no | Line number | Y | Must provide either the Line_no or UNIQUELN. |
3 | part_no | Part number | Y | The 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. |
4 | revision | Part revision level | Y | If providing a part number, you must also provide a revision. |
5 | uniq_key | Item identifier | N | Can be used instead of a part number and a revision. |
6 | U_of_Meas | Unit of measurement | N | The Item"s unit of measurement. |
7 | eachQty | Each delivery quantity | N | If this parameter is used, then it has to be greater than "0" and less than the amount ordered. |
8 | ord_qty | Quantity ordered | N | Only required if changing the order quantity. |
9 | soDet_Desc | Item description | N | |
10 | trans_days | Transfer days | N | Will be automatically entered by the system, and can be changed. |
11 | fstduedt | First due date | N | Will be automatically entered by the system, and can be changed. |
12 | deliFreq | Delivery frequency | N | Can be "DY", "WK", or "MO." |
13 | note | SO item note | N | Can be used to add a note to the item. |
14 | status | SO item status | N | Only needed if changing line item status. and can be "Standard," "Priority-1," "Priority-2," "Cancel," or "Closed." |
15 | w_key | Warehouse unique record identifier | N | Used if the item is a "BUY" or "MAKE" part. |
16 | UNIQUELN | Unique key for line item | Y | You 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)
Parameter | Description | Required | Comment |
SoNo | Sales order number | Y | |
line_no | Line number | Y | Must provide either the Line_no or UNIQUELN. |
part_no | Part number | Y | The 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. |
revision | Part revision level | Y | If providing a part number, you must also provide a revision. |
uniq_key | Item identifier | N | Can be used instead of a part number and a revision. |
uOfMeas | Unit of measurement | N | The Item"s unit of measurement. |
eachQty | Each delivery quantity | N | If this parameter is used, then it has to be greater than "0" and less than the amount ordered. |
ord_qty | Quantity ordered | N | Only required if changing the order quantity. |
soDet_Desc | Item description | N | |
trans_days | Transfer days | N | Will be automatically entered by the system, and can be changed. |
fstduedt | First due date | N | Will be automatically entered by the system, and can be changed. |
deliFreq | Delivery frequency | N | Can be "DY", "WK", or "MO." |
note | SO item note | N | Can be used to add a note to the item. |
status | SO item status | N | Only needed if changing line item status. and can be "Standard," "Priority-1," "Priority-2," "Cancel," or "Closed." |
w_key | Warehouse unique record identifier | N | Used if the item is a "BUY" or "MAKE" part. |
UNIQUELN | Unique key for line item | Y | You 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 measurement | N | The 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.