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 PathanCommented Jul 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/…– SebCommented Mar 12, 2021 at 9:43
2 Answers
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.
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"