This may be a long shot but Walmart's support has been completely unhelpful.
For orders containing 2 or more of the same item, Walmart breaks them out into lines of 1 quantity when working with the API. Ex:
<order
xmlns="http://walmart.com/mp/v3/orders">
<purchaseOrderId>xxx</purchaseOrderId>
<customerOrderId>xxx</customerOrderId>
<customerEmailId>xxx</customerEmailId>
<orderDate>xxx</orderDate>
<mart>Walmart.com</mart>
<shippingInfo>...</shippingInfo>
<orderLines>
<orderLine>
<lineNumber>1</lineNumber>
<item>
<productName>xxx</productName>
<sku>xxx</sku>
</item>
<charges>.....</charge>
</charges>
<orderLineQuantity>
<unitOfMeasurement>EACH</unitOfMeasurement>
<amount>1</amount>
</orderLineQuantity>
<statusDate>2021-03-31T22:30:46.890Z</statusDate>
<orderLineStatuses>
<orderLineStatus>
<status>Acknowledged</status>
<statusQuantity>
<unitOfMeasurement>EACH</unitOfMeasurement>
<amount>1</amount>
</statusQuantity>
</orderLineStatus>
</orderLineStatuses>
<originalCarrierMethod>267</originalCarrierMethod>
<fulfillment>....</fulfillment>
</orderLine>
<orderLine>
<lineNumber>1</lineNumber>
<item>
<productName>xxx</productName>
<sku>xxx</sku>
</item>
<charges>....</charge>
</charges>
<orderLineQuantity>
<unitOfMeasurement>EACH</unitOfMeasurement>
<amount>1</amount>
</orderLineQuantity>
<statusDate>2021-03-31T22:30:46.891Z</statusDate>
<orderLineStatuses>
<orderLineStatus>
<status>Acknowledged</status>
<statusQuantity>
<unitOfMeasurement>EACH</unitOfMeasurement>
<amount>1</amount>
</statusQuantity>
</orderLineStatus>
</orderLineStatuses>
<originalCarrierMethod>xxx</originalCarrierMethod>
<fulfillment>...</fulfillment>
</orderLine>
</orderLines>
In the above there are multiple line 1's.
I cannot seem to find a way to submit a shipment for the above order to close all lines at the same time.
My first idea was to submit it in the exact way that the Walmart API returns an order:
<orderShipment xmlns="http://walmart.com/mp/v3/orders">
<orderLines>
<orderLine>
<lineNumber>1</lineNumber>
<orderLineStatuses>
<orderLineStatus>
<status>Shipped</status>
<statusQuantity>
<unitOfMeasurement>Each</unitOfMeasurement>
<amount>1</amount>
</statusQuantity>
<trackingInfo>
<shipDateTime>2021-04-01T11:47:40</shipDateTime>
<carrierName>
<carrier>FedEx</carrier>
</carrierName>
<methodCode>Standard</methodCode>
<carrierMethodCode>67</carrierMethodCode>
<trackingNumber>xxxx</trackingNumber>
<trackingURL>https://www.fedex.com/</trackingURL>
</trackingInfo>
</orderLineStatus>
</orderLineStatuses>
</orderLine>
<orderLine>
<lineNumber>1</lineNumber>
<orderLineStatuses>
<orderLineStatus>
<status>Shipped</status>
<statusQuantity>
<unitOfMeasurement>Each</unitOfMeasurement>
<amount>1</amount>
</statusQuantity>
<trackingInfo>
<shipDateTime>2021-04-01T11:47:40</shipDateTime>
<carrierName>
<carrier>FedEx</carrier>
</carrierName>
<methodCode>Standard</methodCode>
<carrierMethodCode>67</carrierMethodCode>
<trackingNumber>xxxx</trackingNumber>
<trackingURL>https://www.fedex.com/</trackingURL>
</trackingInfo>
</orderLineStatus>
</orderLineStatuses>
</orderLine>
</orderLines>
</orderShipment>
However the API returns the error below:
OrderLine has more than one entry for the same lineNumber. Please check the lineNumber 1
The next thing I tried was to consolidate them into one request:
<orderShipment xmlns="http://walmart.com/mp/v3/orders">
<orderLines>
<orderLine>
<lineNumber>1</lineNumber>
<orderLineStatuses>
<orderLineStatus>
<status>Shipped</status>
<statusQuantity>
<unitOfMeasurement>Each</unitOfMeasurement>
<amount>2</amount>
</statusQuantity>
<trackingInfo>
<shipDateTime>2021-04-01T11:53:48</shipDateTime>
<carrierName>
<carrier>FedEx</carrier>
</carrierName>
<methodCode>Standard</methodCode>
<carrierMethodCode>67</carrierMethodCode>
<trackingNumber>xxxxx</trackingNumber>
<trackingURL>https://www.fedex.com/</trackingURL>
</trackingInfo>
</orderLineStatus>
</orderLineStatuses>
</orderLine>
</orderLines>
</orderShipment>
However this returns a new error:
Unable to process this request. The Line: 1 of PO: xxxx doesn't have enough quantity to ship requested quantity :: 2 qtyAvailableToShip :: 1
I can't think of another approach to ship this? If anyone could shed any light I would greatly appreciate it.