将订单更新为发货而不跟踪库存

时间:2013-07-25 16:04:55

标签: bigcommerce

如何使用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 Bad Request响应。

<?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>

我意识到我可以更改要跟踪的产品,但客户不会以这种方式跟踪他们的库存(我想避免强迫他们更改他们的流程)。我已经尝试省略数量,但它声明它是必需的。

1 个答案:

答案 0 :(得分:3)

您可以将orderstatus更新为已发货。此端点上的GET请求会告诉您与订单的各个方面相关联的ID http://developer.bigcommerce.com/docs/api/v2/resources/order_statuses

订单上的PUT资源可让您更新状态 http://developer.bigcommerce.com/docs/api/v2/resources/orders