Create a Product
POST
/v1/productsCreates a new product object.
请求参数
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: 6 个月前