We want to update orders with shipment details from an external system. We have successfully done the basics, but need to be able to partially ship orders.
The API description appears to allow for this, http://www.magentocommerce.com/api/soap/sales/salesOrderShipment/sales_order_shipment.create.html and specfically:
Notes: The array of orderItemQty is used for partial shipment. To create shipment for all order items, you do not need to specify these attributes.
However the API appears to ignore this. It doesn't seem to matter if we populate it with all the items and 0 out the ones we don't want shipped or just exclude them entirely.
Has anyone else encountered this problem or had to create partial shipments via the API before?
Thanks
Best Answer
Looking at the
Mage_Sales_Model_Order_Shipment_Api_V2
class you should use the following format for the itemsQty array (as in the WS-I compliance mode example):If the array is missing the keys
order_item_id
orqty
it will ignore the specified rows in the function_prepareItemQtyData
and when all rows are skipped the API will ship all items.