header

Magento 1.x Software Support Notice

For Magento Commerce 1, Magento is providing software support through June 2020. Depending on your Magento Commerce 1 version, software support may include both quality fixes and security patches. Please review our Magento Software Lifecycle Policy to see how your version of Magento Commerce 1 is supported.

For Magento Open Source 1.5 to 1.9, Magento is providing software security patches through June 2020 to ensure those sites remain secure and compliant. Visit our information page for more details about our software maintenance policy and other considerations for your business.

Sales Order

Module: Mage_Sales

The Mage_Sales module allows you to manage sales orders, invoices, shipments, and credit memos.

Order

Allows you to manage orders.

Resource Name: sales_order

Aliases:

Methods:

Faults

Fault Code Fault Message
100 Requested order not exists.
101 Invalid filters given. Details in error message.
102 Invalid data given. Details in error message.
103 Order status not changed. Details in error message.

Examples

Example 1. Work with orders
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');

// Getting list of orders created by John Doe
var_dump($proxy->call($sessionId, 'sales_order.list', array(array('customer_firstname'=>array('eq'=>'John'), 'customer_lastname'=>array('eq'=>'Doe')))));


// Get order info 100000003
var_dump($proxy->call($sessionId, 'sales_order.info', '100000003'));


// Hold order 100000003
$proxy->call($sessionId, 'sales_order.hold', '100000003');

// Unhold order 100000003
$proxy->call($sessionId, 'sales_order.unhold', '100000003');

// Hold order and add comment 100000003
$proxy->call($sessionId, 'sales_order.addComment', array('100000003', 'holded',  'You order is holded',  true));

// Unhold order and add comment 100000003
$proxy->call($sessionId, 'sales_order.addComment', array('100000003', 'pending', 'You order is pending', true));

// Get order info 100000003
var_dump($proxy->call($sessionId, 'sales_order.info', '100000003'));