** NOTE: Any StackOverflow question that is critical of Acumatica will get down-voted.
I am trying to get a REST Web-Service-Endpoint Action working.
Extending the Default endpoint, I added an Action CreateShipmentAction.
URL: .../17.200.001/SalesOrder/CreateShipmentAction
SEND: {'entity':{'OrderNbr':{'value':'ME050225'},'OrderType':{'value':'SO'}},'parameters':{'value':null}}
METHOD: post
and this works fine.
Following the same procedure, I added CancelPurchaseOrderAction to Purchase Order.
URL: .../17.200.001/PurchaseOrder/CancelPurchaseOrderAction
SEND: {'entity':{'OrderNbr':{'value':'ME006802'},'OrderType':{'value':'DP'}},'parameters':{'value':null}}
METHOD: post
fails with "The Cancel Order button is disabled". Manually checking the PurchaseOrder, the Cancel-Order button is active via the website.
If I change the 'entity' OrderNbr to
SEND: {'entity':{'OrderNbr':{'value':'xxxME006802'},'OrderType':{'value':'DP'}},'parameters':{'value':null}}
which shouldn't match anything, I get the same error. It's like my 'entity' for the PurchaseOrder is not formatted correctly.
I would look up the necessary formatting for the 'entity' of PurchaseOrder in the Acumatica documentation, but I can't find any documentation. The VIEW_ENDPOINT_SERVICE documents do not spell this out either, which I think they should (else why have an API if the parameters are not defined...)

