Any option to update order status processing to complete in Magento 2 using Rest API.
-
You should create shipment throught API. The status will automatically change to complete.– Abdul PathanJul 5, 2019 at 17:07
-
Depending on whether you actually want to actually create a shipment or not, through Magento's API, this SO post shows another way and after trying it out, it works fine. magento.stackexchange.com/questions/315169/…– SebMar 12, 2021 at 9:43
2 Answers
Use SalesShipOrder
POST https://{host}/index.php/rest/V1/orders/{orderId}/ship
with the payload described at the link above for each item (product) within the order and when all have been "shipped", the order will be automatically changed to "complete"
For changing order status processing to complete You need to call following API.
Endpoint
POST <host>/rest/<store_code>/V1/order/3/ship
where 3 is the order id.
Headers
Content-Type application/json
Authorization Bearer <administrator token>
You will get Shipment ID in resonse and status of order will changed to completed.