I am trying to create sipment with SOAP API in C# here is my code (I create API based on this documentation: magento.docs:


orderItemIdQty[] itemIdQties = {};

foreach (var itm in tmp.items)
    itemIdQties = new []
        new orderItemIdQty()
            order_item_id = itm.product_id,
            qty = itm.product_qty

string createShipment = Client.salesOrderShipmentCreate(session, tmp.increment_id, itemIdQties.ToArray(), tmp.customer_comment, 0, 0);

If I execute code above I get an error: "Cannot create an empty shipment!"

If I debug code in createShipment I get for specific order where shipment not exists (it exists order, invoce and status of order is complete):

  • session: 2903DEodcjh42 (session number connection)
  • tmp.increment_id: 100063597 (order number id - this order exists)
  • itemIdQties.ToArray(): order_item_id = 70569 (this product id also exists); qty = 1
  • tmp.customer_comment: "some comment"
  • 0 (set for email)
  • 0 (set for includeComment)

No Idea what is wrong, all parameters that are need for create shipment are include, why is it empty?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.