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 | String | Product's ID ไธปๅๅID | 58d33bed01cda31bfb000029 |
id *Required | String | Product Variation's Key ๅๅ่ฆๆ ผID | 5a1c3fc369702d2ad2070000 |
quantity *Required | Number | Quantity (ๆฐๅข/ๆธๅฐ)ๅๅๆธ้ - This value should be between -9999999 and 9999999. ๆธๅผๅฟ ้ ๅจ -9999999 ๅ 9999999 ไน้ใ | ruby "quantity":120 |
replace | Boolean | Whether replacing the original quantity ๆฏๅฆๅไปฃๅๆฌๆธ้ - true: replace the product's quantity with the number you provided ๅไปฃๅๆฌๆธ้ false: increase/decrease the quantity with the number you provided ๅขๅ /ๆธๅฐๆธ้ *Default: true | ruby "replace":false |
Response Fields
Field | Column Type | Description | Example |
---|---|---|---|
id | String | Product Variation's Key ๅๅ่ฆๆ ผID | 5a1c3fc369702d2ad2070000 |
sku | String | Product Variation sku ๅๅ่ฒจ่ | sku_a01 |
quantity | Number | Product Variation's Current Quantity ๅๅ่ฆๆ ผ็พๆๆธ้ | 12 |
updated_at | DateTime | Last Updated Time ๆๅพๆดๆฐๆ้ | 2018-02-23T04:11:31.059+00:00 |
product_id | String | Product's ID ไธปๅๅ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 12 months ago