Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento - update order status via API

Tags:

magento

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

like image 321
elMarquis Avatar asked Oct 19 '11 10:10

elMarquis


1 Answers

Thanks to Diglin for pointing me in the right place. Just to present the answer properly:

You can do this by using the addComment method, which also lets you specify the new order status as one of it's 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.

like image 190
elMarquis Avatar answered Sep 28 '22 02:09

elMarquis