Update Product Quantity
Notice 提醒Do not allow to update quantity of the product which contains one or multiple variations or has unlimited quantity
不允許更新有規格或無限數量的商品*若要更新規格數量,請使用Update Product Variation Quantity
*若要更新不同倉庫(warehouse) 的商品庫存,請參考 Get Stock/Quantity for Warehouse (Product/Gift/Add-on)
Function
To update product's quantity with open API
透過open API 更新主商品數量
URL
PUT <<api_domain>>/v1/products/:id/update_quantity
Request parameters
Parameter | Type | Description | Example |
|---|---|---|---|
id *Required |
| Product's ID | |
quantity |
| Quantity
| |
replace |
| Whether replacing the original quantity
| |
Response fields
Field | Type | Description | Example |
|---|---|---|---|
id |
| Product's ID | 5a8165efe38809548f0000f8 |
sku |
| Product's sku | SKU_001 |
quantity |
| Product's Current quantity | 21 |
updated_at |
| Last Updated Time | 2018-02-23T04:17:15.544+00:00 |
Response Example
{
"id": "5a8165efe38809548f0000f8",
"sku": "SKU_001",
"quantity": 21,
"updated_at": "2018-02-23T04:17:15.544+00:00"
}Updated 13 days ago