Update Product Variation Price
Function
To update product variation's price with open API
透過open API 更新規格價格
URL
PUT <<api_domain>>/v1/products/:product_id/variations/:id/update_price
Request Parameters
Parameter | Type | Description | Example |
---|---|---|---|
product_id | String | Product's ID 主商品ID | |
id | String | Product Variation's Key 商品規格ID | |
price | Float | Product Variation's Price 要更新商品規格之價格 | ruby "price": 123 |
price_sale | Float | Product Variation's Price Sale 要更新商品規格之特價 | |
cost | Float | Product Variation's Cost 要更新商品規格之成本 | |
member_price | Float | Product Variation's Member Price 要更新商品規格之會員價格 | |
retail_price | Float | Product Variation's Retail Price 要更新商品規格之實體店價格 | |
product_price_tiers | Float | Product Variation's Product Price Tiers 要更新商品規格之會員價格分級 (Object Key 為 Membership Tier ID) | "product_price_tiers": {"5b2b66599a76f0196a000a54": 30} |
Response Fields
Response Example
{
"id": "5df30b52f6186100245563d2",
"fields_translations": {
"en": [
"Yellow",
"Taiwan"
],
"zh-hant": [
"黃",
"台灣產"
]
},
"price": {
"cents": 123,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$123",
"dollars": 123.0
},
"price_sale": {
"cents": 123,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$123",
"dollars": 123.0
},
"member_price": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"quantity": 42,
"unlimited_quantity": null,
"media": {},
"sku": "yellow_TW",
"location_id": null,
"variant_option_ids": [
"5df30b5245986b001b61d404",
"5df30b5245986b001b61d402"
],
"barcode": null
}
Updated 12 months ago