Update Product Variation Quantity
Notice 提醒Product unlimited_quantity should be false
商品 無限數量 需要設定為 false
Function
To update product variation's quantity with open API
透過open API 更新規格數量
URL
PUT <<api_domain>>/v1/products/:product_id/variations/:id/update_quantity
Request parameters
Parameter | Type | Description | Example |
|---|---|---|---|
product_id *Required |
| Product's ID | 58d33bed01cda31bfb000029 |
id |
| Product Variation's Key | 5a1c3fc369702d2ad2070000 |
quantity |
| Quantity
| |
replace |
| Whether replacing the original quantity
false: increase/decrease the quantity with the number you provided
| |
Response Fields
Field | Column Type | Description | Example |
|---|---|---|---|
id |
| Product Variation's Key | 5a1c3fc369702d2ad2070000 |
sku |
| Product Variation sku | sku_a01 |
quantity |
| Product Variation's Current Quantity | 12 |
updated_at |
| Last Updated Time | 2018-02-23T04:11:31.059+00:00 |
product_id |
| Product's ID | 58d33bed01cda31bfb000029 |
Response Example
{
"id": "5a1c3fc369702d2ad2070000",
"sku": "sku_a01",
"quantity": 12,
"updated_at": "2018-02-23T04:11:31.059+00:00",
"product_id": "58d33bed01cda31bfb000029"
}Updated 13 days ago