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.

Shipment List

Edit this page on GitHub

Module: Mage_Sales

Resource: sales_order_shipment

Aliases:

Method:

Allows you to retrieve the list of order shipments. Additional filters can be applied.

Aliases:

Arguments:

Type Name Description
string sessionId
Session ID
array filters
Array of filters for the list of shipments

Returns:

Type Name Description
array result Array of salesOrderShipmentEntity

The salesOrderShipmentEntity content is as follows:

Type Name Description
string increment_id
Increment ID
string
created_at
Date of shipment creation
string
total_qty
Total quantity of items to ship
string
shipment_id
Shipment ID

Examples

Request Example SOAP V1
$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires API authentication,
// then get a session token
$session = $client->login('apiUser', 'apiKey');

$result = $client->call($session, 'sales_order_shipment.list');
var_dump($result);

// If you don't need the session anymore
//$client->endSession($session);
Request Example SOAP V2 (List of All Shipments)
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy->login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy->salesOrderShipmentList($sessionId);
var_dump($result);
Request Example SOAP V2 (Complex Filter)
$client = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

// If some stuff requires API authentication,
// then get a session token
$session = $client->login('apiUser', 'apiKey');
$complexFilter = array(
    'complex_filter' => array(
        array(
            'key' => 'created_at',
            'value' => array('key' => 'in', 'value' => '2012-03-30 12:54:46')
        )
    )
);
$result = $client->salesOrderShipmentList($session, $complexFilter);

var_dump ($result);
Request Example SOAP V2 (WS-I Compliance Mode)
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); 

$sessionId = $proxy->login((object)array('username' => 'apiUser', 'apiKey' => 'apiKey')); 
 
$result = $proxy->salesOrderShipmentList((object)array('sessionId' => $sessionId->result));   
var_dump($result->result);
Response Example SOAP V1
array
  0 =>
    array
      'increment_id' => string '200000001' (length=9)
      'created_at' => string '2012-03-30 12:35:29' (length=19)
      'total_qty' => string '2.0000' (length=6)
      'shipment_id' => null
  1 =>
    array
      'increment_id' => string '200000002' (length=9)
      'created_at' => string '2012-03-30 12:54:46' (length=19)
      'total_qty' => string '1.0000' (length=6)
      'shipment_id' => null