The Sales Order screen has an option to “Recalculate Prices”, which displays a dialog box containing several options including “Set Current Unit Prices”. I’d like to invoke this functionality using the REST API.
I’ve discovered the /SalesOrder/AutoRecalculateDiscounts API action, which seems to be the correct endpoint. However, I’m not sure how to pass a parameter indicating that ‘current unit prices’ should be set.
A payload like this does not cause the unit prices to be updated:
POST /entity/Default/22.200.001/SalesOrder/AutoRecalculateDiscounts HTTP/1.1
{
"entity" :
{
"OrderType" : {"value" : "SO"},
"OrderNbr" : {"value" : "002215"}
},
"parameters": { }
}
(EDIT: I’ll note that “DisableAutomaticDiscountCalculation” is set to false for the SO in question.)
What’s the correct parameter to supply this endpoint for unit prices to be updated? The swagger.json file doesn’t appear to contain any information about parameters for this action. Any assistance is appreciated, thank you!
