Reputation: 3981
Here is the API Documentation for a Sales Order: http://www.magentocommerce.com/api/soap/sales/salesOrder/sales_order.info.html
Here is the API documentation for a Shipment: http://www.magentocommerce.com/api/soap/sales/salesOrderShipment/salesOrderShipment.html
I cannot for the life of me figure out how to establish a relationship between them. The order/info endpoint doesn't seem to return a shipment_id of any kind and the order/shipment endpoint doesn't seem to be filterable by order_id.
Upvotes: 1
Views: 1851
Reputation: 51
Here is the PHP code to complete @Kevin Sadler answer:
/** @var array $filters */
$filters = array(
array('order_id' => array('eq' => $orderId)) // Entity ID, not Increment ID
);
/** @var array $orderShipments */
$orderShipments = $client->call($session, 'sales_order_shipment.list', $filters);
Upvotes: 2
Reputation: 2456
This is possible by using a filter on the order's order_id
value.
Note that order_id
is different to the order's increment_id
which is the usual customer facing reference number. Therefore an extra step is required to convert the order's reference into the order_id
.
I can't give you working PHP code, I'm working in Java, but I can describe the method:
increment_id
) using sales_order.info
API callorder_id
from the order dataorder_id
as a filter in sales_order_shipment.list
increment_id
. This id is the shipment's reference. increment_id
in sales_order_shipment.info
to get more details.Upvotes: 2