Update Product Price
Notice 提醒
Do not allow to update price of products containing multiple variations which have different price with the main products.
不允許更新價格不同於主商品的規格商品。*若要更新價格不同於主商品之規格商品,請使用Update Product Variation Price
Function
To update product's price with open API
透過open API 更新商品價格
URL
PUT <<api_domain>>/v1/products/:id/update_price
Request Parameters
Parameter | Type | Description | Example |
---|---|---|---|
id | String | Product's ID 商品ID | |
price | Float | Price 原價格 | ruby "price": 90 |
price_sale | Float | Price on sale 特價 can be empty value 可以為空值 | ruby "price_sale": 78 |
cost | Float | Cost 成本 can be empty value 可以為空值 | ruby "cost": 30 |
Request example
curl --location --request PUT '<<api_domain>>/v1/products/5fbb1f0cc74ff9003e02c68d/update_price' \
--header 'Authorization: Bearer 87d8e74272aadc43d600b72da14b1eb535b0d2da7541e4f508577eec644df046' \
--header 'Content-Type: application/json' \
--data-raw '{
"price": 300,
"price_sale": 250,
"cost": 150
}'
Response Field
Response Example
Updated almost 3 years ago