How to delete the order Items from magento using Rest API
-
13-04-2021 - |
質問
I want to delete the order Item form the Successfully placed Order how to delete the order item.Can anyone help to solve this situation.
Thanks in Advance :)
解決
By default, Magento2 does not have any API point for the delete an order item.
But PHP function \Magento\Sales\Api\OrderItemRepositoryInterface::delete(\Magento\Sales\Api\Data\OrderItemInterface $entity)
exits which can delete the order item. You can create custom API point using webapi.xml and call this method on delete operation.
As per the Magento 2 system, order item delete does not a good idea. you can issue orders shipment, invoice etc.
所属していません magento.stackexchange