I am updating Orders using the Epicor REST API (Erp.BO.SalesOrderSvc/SalesOrders('000',{OrderNum}))
Above is the endpoint I am using to update the order.
And below is the Payload I am sending
{
"PONum": "xxxx",
"email": "xx.buxxxss@xx.org",
"Company": "000",
"CustNum": 4,
"OrderNum": 0,
"OrderDate": "2023-03-22T07:40:18",
"OTSPhoneNum": "",
"OrderStatus": "pending",
"ShipViaCode": "",
"CurrencyCode": "USD",
"CustomerName": "Cole xxx",
"OrderComment": "",
"EnableCreditCard": true,
"BTContactPhoneNum": "",
"ShipToAddressList": "US",
"ShipToContactName": " ,",
"SoldToAddressList": "US",
"ShipToContactPhoneNum": "",
"SoldToContactPhoneNum": "",
"OrderDtls": [
{
"Company": "xxx",
"PartNum": "xxxxx",
"OrderNum": 0,
"OrderLine": 1,
"UnitPrice": 1,
"DiscountPercent": 0,
"SellingQuantity": 1
}
]
}
Every time I update an order, even though it appears to be updating, it actually generates a new orderDtls instead of updating the existing one.
What should I do to change the orderDtls? ( like completely replace the current orderDtls with the new one coming)