<?xml version="1.0"?>
<errors>
<error>
<status>400</status>
<message>
<![CDATA[The field 'products.0.product_id' is invalid.]]>
</message>
<details>
<invalid_reason>Product with id: 0 does not exist.</invalid_reason>
</details>
</error>
</errors>
If I remove product_id, I get what appears to be a successful update, but the product is never removed from the order. So, it appears that the documentation is missing something. Minimally, you can't simply put in whatever is returned from "List Order Products" because it returns a product_id of 0 and that isn't accepted by the API. How does one remove a product from an order? What else might I be missing?
For the "Update an Order" API: https://api.bigcommerce.com/stores/{store_hash}/v2/orders/{order_id}
The functionality to remove a product from an order is show in example like this:
The documentations says similar:
However, the following payload doesn't work:
When I call the "List Order Products" API: https://api.bigcommerce.com/stores/{{store_hash}}/v2/orders/{{order_id}}/products, I get the following payload:
So, as you can see, the items all match.
I get the following error:
If I remove
product_id
, I get what appears to be a successful update, but the product is never removed from the order. So, it appears that the documentation is missing something. Minimally, you can't simply put in whatever is returned from "List Order Products" because it returns aproduct_id
of 0 and that isn't accepted by the API. How does one remove a product from an order? What else might I be missing?