2
如何使用BigCommerce web API更新包含未跟踪产品的订单?更新订单以发货而不跟踪库存
我订购的产品是not being tracked as part of the inventory on BigCommerce。
我需要作出适当的Web API调用来更新状态发货。我曾尝试使用PUT /orders/id/shipments/id.json
呼叫像下面
<?xml version="1.0" encoding="utf-8" ?>
<shipment>
<tracking_number/>
<order_address_id>533</order_address_id>
<items>
<item>
<order_product_id>628</order_product_id>
<quantity>1</quantity>
</item>
</items>
</shipment>
拨打电话,但我得到了下面的400错误的请求响应。
<?xml version="1.0"?>
<errors>
<error>
<status>400</status>
<message>The field 'quantity' is invalid.</message>
<details>
<invalid_reason>The quantity specified is greater than the quantity of the product that is available to ship.</invalid_reason>
<available_quantity>0</available_quantity>
<order_product_id>628</order_product_id>
</details>
</error>
</errors>
我意识到,我可以改变的产品进行跟踪,但客户不跟踪其库存这种方式(我想避免迫使他们改变的过程)。我试图忽略的数量,但它说,它是必需的。
你的答案是正确的,但我真正的问题是,我在发布一个已经存在的货物。这是一种误导,我添加了以下问题http://stackoverflow.com/q/17886266/299327 –