创建商品
POST/openapi/2026-07/products
根据提供的信息创建一个新商品。
请求
- application/json
- 请求体
- 示例
请求体必填
- Array [
- ]
- Array [
- ]
- Array [
- Array [
- ]
- ]
product object必填
待创建的商品数据
商品名称
商品简要描述
商品描述
商品是否已上架
商品是否需要物流
商品是否需要计税
商品标签列表
供应商名称
供应商 URL
自定义备注,例如:"This is a customizable product"
SEO 标题
SEO 描述
SEO 关键词列表
商品 handle(用于 URL 的友好别名)
是否仅有默认款式(即无多款式),默认为 true
是否启用库存追踪
库存策略,可选值:continue(缺货时继续销售)、deny(缺货时停止销售)、auto_unpublished(缺货时自动下架);当 inventory_tracking 为 true 时必填
是否需要为款式设置图片;当 has_only_default_variant 为 false 时必填
商品 SPU(标准产品单元)
商品虚拟销量
是否在前台展示虚拟销量
options object[]
商品款式属性列表(如颜色、尺寸等)
款式属性名称,例如:"color"、"size"
款式属性的可选值列表,例如:["red", "black"]、["small", "large"]
images object[]必填
商品图片列表
图片 URL
图片宽度(单位:像素)
图片高度(单位:像素)
图片替代文本(alt)
图片存储路径
variants object[]必填
商品子款式列表
商品款式属性 1 的取值(例如"颜色"取值"红色")
商品款式属性 2 的取值
商品款式属性 3 的取值
image object
子款式图片,例如:{"src":"//cn.cdn.shoplazza.com/c8bf5695d347092d7a010f00182581f7.jpeg"}
图片 URL
图片宽度(单位:像素)
图片高度(单位:像素)
图片替代文本(alt)
图片存储路径
划线价
子款式售价;如需留空请设置为 "0.00"
SKU
条形码
款式备注/说明
库存数量
重量
重量单位,可选值:kg、g、lb、oz
成本价
whole_prices object[]
批发价列表
批发价
起购量(达到该数量才适用此批发价)
零售价
子款式在列表中的排序位置
extend object
子款式扩展信息(包裹尺寸、原产地国别、HS 代码等)
包裹长度
包裹宽度
包裹高度
尺寸单位,可选值:cm、in、mm
原产地国别(国家代码,例如 CN、US)
HS(协调制度)代码
是否支持混批
商品所属专辑的 ID 列表
商品类型
品牌
用于幂等性校验的唯一令牌
商品是否启用独立的 SEO 设置
商品库存数量
商品分类 ID
商品定时上架时间。设置 auto_publish_at 后,商品将在该时间按计划上架;时间格式遵循 RFC 3339,例如:2026-01-26T10:00:00.000+00:00
{
"product": {
"title": "string",
"brief": "string",
"description": "string",
"published": true,
"requires_shipping": true,
"taxable": true,
"tags": [
"string"
],
"vendor": "string",
"vendor_url": "string",
"note": "string",
"seo_title": "string",
"seo_description": "string",
"seo_keywords": [
"string"
],
"handle": "string",
"has_only_default_variant": true,
"inventory_tracking": true,
"inventory_policy": "string",
"need_variant_image": true,
"spu": "string",
"fake_sales": 0,
"display_fake_sales": true,
"options": [
{
"name": "string",
"values": [
"string"
]
}
],
"images": [
{
"src": "string",
"width": 0,
"height": 0,
"alt": "string",
"path": "string"
}
],
"variants": [
{
"option1": "string",
"option2": "string",
"option3": "string",
"image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string",
"path": "string"
},
"compare_at_price": 0,
"price": 0,
"sku": "string",
"barcode": "string",
"note": "string",
"inventory_quantity": 0,
"weight": 0,
"weight_unit": "string",
"cost_price": 0,
"whole_prices": [
{
"price": 0,
"min_quantity": 0
}
],
"retail_price": 0,
"position": 0,
"extend": {
"length": 0,
"width": 0,
"height": 0,
"dimension_unit": "string",
"origin_country_code": "string",
"hs_code": "string"
}
}
],
"mixed_wholesale": true,
"collection_ids": [
"string"
],
"product_type": "string",
"brand": "string",
"unique_token": "string",
"independent_seo": true,
"inventory_quantity": 0,
"category_id": "string",
"auto_publish_at": "string"
}
}
响应
- 200
OK
- application/json
- 数据结构
- 示例
数据结构
- Array [
- ]
- Array [
- ]
- Array [
- Array [
- ]
- ]
错误码
错误信息
data object
product object
已创建的商品
商品 ID
商品名称
商品描述
商品是否已上架
商品是否需要物流
商品是否需要计税
商品标签列表
供应商名称
供应商 URL
自定义备注,例如:"This is a customizable product"
SEO 标题
SEO 描述
SEO 关键词列表
商品 handle(用于 URL 的友好别名)
是否仅有默认款式(即无多款式)
是否启用库存追踪
库存策略,可选值:continue(缺货时继续销售)、deny(缺货时停止销售)、auto_unpublished(缺货时自动下架);当 inventory_tracking 为 true 时必填
是否需要为款式设置图片;当 has_only_default_variant 为 false 时必填
商品 SPU(标准产品单元)
商品虚拟销量
是否在前台展示虚拟销量
options object[]
商品款式属性列表(如颜色、尺寸等)
款式属性 ID
款式属性名称,例如:"color"、"size"
款式属性的可选值列表,例如:["red", "black"]、["small", "large"]
款式属性排序位置
images object[]
商品图片列表
图片 ID
图片 URL
图片宽度(单位:像素)
图片高度(单位:像素)
图片替代文本(alt)
图片排序位置
图片存储路径
variants object[]
商品子款式列表
子款式 ID
子款式所属商品的 ID
子款式关联的图片 ID
子款式创建时间
子款式最后更新时间
子款式标题
子款式在第 1 个商品款式属性上的取值
子款式在第 2 个商品款式属性上的取值
子款式在第 3 个商品款式属性上的取值
image object
子款式图片
图片 URL
图片宽度(单位:像素)
图片高度(单位:像素)
图片替代文本(alt)
图片存储路径
子款式在商品中的排序位置
划线价
子款式售价
SKU
条形码
款式备注
库存数量
重量
重量单位,可选值:kg、g、lb、oz
成本价
whole_prices object[]
批发价列表
批发价
起购量(达到该数量才适用此批发价)
零售价
子款式当前是否处于打折状态
原价
extend object
子款式扩展信息(包裹尺寸、原产地国别、HS 代码等)
包裹长度
包裹宽度
包裹高度
尺寸单位,可选值:cm、in、mm
原产地国别(国家代码,例如 CN、US)
HS(协调制度)代码
是否支持混批
商品类型
品牌
商品简介
库存数量
各子款式售价中的最低价
各子款式售价中的最高价
各子款式划线价中的最低价
各子款式划线价中的最高价
商品上架时间
商品创建时间
商品最后更新时间
商品实际销量
是否启用独立的 SEO 设置
商品访问 URL
商品是否可售
各子款式零售价中的最低价
各子款式零售价中的最高价
各子款式原价中的最低价
各子款式原价中的最高价
primary_image object
商品主图
图片 URL
图片宽度(单位:像素)
图片高度(单位:像素)
图片替代文本(alt)
图片存储路径
商品税码
商品所属分类 ID
category object
商品所属分类信息
分类 ID
分类名称
Google 分类 ID
分类层级
分类层级路径
{
"code": "string",
"message": "string",
"data": {
"product": {
"id": "string",
"title": "string",
"description": "string",
"published": true,
"requires_shipping": true,
"taxable": true,
"tags": [
"string"
],
"vendor": "string",
"vendor_url": "string",
"note": "string",
"seo_title": "string",
"seo_description": "string",
"seo_keywords": [
"string"
],
"handle": "string",
"has_only_default_variant": true,
"inventory_tracking": true,
"inventory_policy": "string",
"need_variant_image": true,
"spu": "string",
"fake_sales": 0,
"display_fake_sales": true,
"options": [
{
"id": "string",
"name": "string",
"values": [
"string"
],
"position": 0
}
],
"images": [
{
"id": "string",
"src": "string",
"width": 0,
"height": 0,
"alt": "string",
"position": 0,
"path": "string"
}
],
"variants": [
{
"id": "string",
"product_id": "string",
"image_id": "string",
"created_at": "string",
"updated_at": "string",
"title": "string",
"option1": "string",
"option2": "string",
"option3": "string",
"image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string",
"path": "string"
},
"position": 0,
"compare_at_price": 0,
"price": 0,
"sku": "string",
"barcode": "string",
"note": "string",
"inventory_quantity": 0,
"weight": 0,
"weight_unit": "string",
"cost_price": 0,
"whole_prices": [
{
"price": 0,
"min_quantity": 0
}
],
"retail_price": 0,
"is_discount": true,
"origin_price": 0,
"extend": {
"length": 0,
"width": 0,
"height": 0,
"dimension_unit": "string",
"origin_country_code": "string",
"hs_code": "string"
}
}
],
"mixed_wholesale": true,
"product_type": "string",
"brand": "string",
"brief": "string",
"inventory_quantity": 0,
"price_min": 0,
"price_max": 0,
"compare_at_price_min": 0,
"compare_at_price_max": 0,
"published_at": "string",
"created_at": "string",
"updated_at": "string",
"sales": 0,
"independent_seo": true,
"url": "string",
"available": true,
"retail_price_min": 0,
"retail_price_max": 0,
"origin_price_min": 0,
"origin_price_max": 0,
"primary_image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string",
"path": "string"
},
"tax_code": "string",
"category_id": "string",
"category": {
"id": 0,
"name": "string",
"google_id": 0,
"level": 0,
"path": "string"
}
}
}
}