这可能是一个长镜头,但沃尔玛的支持完全没有帮助。
对于包含 2 个或更多相同商品的订单,Walmart 在使用 API 时将它们分成 1 个数量的行。前任:
<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>
在上面有多个第 1 行。
我似乎找不到为上述订单提交装运以同时关闭所有生产线的方法。
我的第一个想法是以沃尔玛 API 返回订单的确切方式提交它:
<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>
但是 API 返回以下错误:
OrderLine has more than one entry for the same lineNumber. Please check the lineNumber 1
我尝试的下一件事是将它们合并到一个请求中:
<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>
但是,这会返回一个新错误:
Unable to process this request. The Line: 1 of PO: xxxx doesn't have enough quantity to ship requested quantity :: 2 qtyAvailableToShip :: 1
我想不出另一种方法来运送这个?如果有人能阐明任何观点,我将不胜感激。