Magento - update order status via API

I added a custom order status parameter. Does anyone know how I can set it to my custom value via API?

+6
source share
2 answers

Thanks to Diglin for pointing me to the right place. Just for the correct answer:

You can do this using the addComment method, which also allows you to specify the new order status as one of its parameters.

$sku='100000003'; $orderStatus = 'Downloaded'; $comment = 'The order was successfully downloaded'; $sendEmailToCustomer = false; $proxy->call($sessionId, 'sales_order.addComment', array($sku, $orderStatus, $comment, $sendEmailToCustomer)); 

Hope this helps someone.

+11
source

After you see the api doc and the source code, you can only get information about the order and add a comment to it. You cannot edit or delete an order. You must create your own API if you need it. See this link to find out what's possible with the API: Magento Core API - Mage Sales

+1
source

Source: https://habr.com/ru/post/899597/


All Articles