Update a product
POST
/v1/products/{id}Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
请求参数
Path Params
id
string
required
Header Params
Content-Type
string
required
Example:
application/json
Accept
string
required
Example:
application/json
Body Params application/json
name
string
required
The product’s name, meant to be displayable to the customer.
active
boolean
optional
Whether the product is currently available for purchase. Defaults to true.
description
string
optional
The product’s description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
metadata
object
optional
Set of key-value pairs that you can attach to an object.
url
string
optional
A URL of a publicly-accessible webpage for this product.
images
array[string]
optional
A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
Example
{
"id": null,
"name": "taiwan fengli",
"active": true,
"description": "very delicious",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"url": "www.baidu.com"
}
示例代码
Responses
OK(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
Data Schema
object {0}
Example
{}
Last modified: 19 天前