- Catalog
- Article
- Page
- Tag
- Product
- Category
- Order
- Customer
- Brand
- FileManager
- Inquiry
- Shipment
- 后台TokenPOST
- 后台概览GET
- 获取当前用户GET
全量更新
PUT
/products/{spu_code}
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Path 参数
spu_code
string
必需
示例值:
spuxxx
Body 参数application/json
spu_code
integer
必需
translations
object
必需
en
object
必需
zh_cn
object
必需
images
array[string]
必需
active
string
必需
skus
array [object {11}]
必需
code
string
必需
price
integer
必需
quantity
integer
必需
image
string
必需
image_url
string
必需
model
string
必需
origin_price
integer
必需
is_default
integer
必需
error
boolean
必需
text
string
必需
variants
array[integer]
必需
variants
array [object {2}]
必需
name
object
必需
values
array [object {2}]
必需
attributes
array [object {2}]
必需
attribute_id
string
必需
attribute_value_id
string
必需
tax_class_id
null
必需
weight
string
必需
weight_class
null
必需
brand_id
string
必需
position
string
必需
categories
array[string]
必需
sales
string
必需
viewed
string
必需
is_virtual
null
必需
slug
string
必需
示例
{
"translations": {
"en": {
"name": "Galaxy Glittering Evening Gown Shines Everywhere",
"locale": "en",
"content": "<p>Galaxy Glittering Evening Gown Shines Everywhere</p>",
"summary": "Galaxy Glittering Evening Gown Shines Everywhere",
"selling_point": "Galaxy Glittering Evening Gown Shines Everywhere",
"meta_title": "Galaxy Glittering Evening Gown Shines Everywhere",
"meta_description": "Galaxy Glittering Evening Gown Shines Everywhere",
"meta_keywords": "Galaxy Glittering Evening Gown Shines Everywhere"
},
"zh_cn": {
"name": "银河流光璀璨晚礼服闪耀全场",
"locale": "zh_cn",
"content": "<p>银河流光璀璨晚礼服闪耀全场</p>",
"summary": "银河流光璀璨晚礼服闪耀全场",
"selling_point": "银河流光璀璨晚礼服闪耀全场",
"meta_title": "银河流光璀璨晚礼服闪耀全场",
"meta_description": "银河流光璀璨晚礼服闪耀全场",
"meta_keywords": "银河流光璀璨晚礼服闪耀全场"
}
},
"images": [
"images/demo/product/1.png"
],
"active": "1",
"skus": [
{
"code": "GGE0012",
"price": 111,
"quantity": 49,
"image": "images/demo/product/1.png",
"image_url": "http://maijin.test/cache/images/demo/product/1-100x100.png",
"model": "GGE001",
"origin_price": 112,
"is_default": 1,
"error": false,
"text": " 红色 / 大 ",
"variants": [
0,
0
]
},
{
"code": "GGE0022",
"price": 222,
"quantity": 50,
"image": "images/demo/product/1.png",
"image_url": "http://maijin.test/cache/images/demo/product/1-100x100.png",
"model": "GGE002",
"origin_price": 223,
"is_default": 0,
"error": false,
"text": " 红色 / 小 ",
"variants": [
0,
1
]
}
],
"variants": [
{
"name": {
"en": "Color",
"zh_cn": "颜色"
},
"values": [
{
"name": {
"en": "Red",
"zh_cn": "红色"
},
"image": ""
}
]
},
{
"name": {
"en": "Size",
"zh_cn": "尺寸"
},
"values": [
{
"name": {
"en": "Big",
"zh_cn": "大"
},
"image": ""
},
{
"name": {
"en": "Small",
"zh_cn": "小"
},
"image": ""
}
]
}
],
"attributes": [
{
"attribute_id": "1",
"attribute_value_id": "3"
},
{
"attribute_id": "2",
"attribute_value_id": "1"
}
],
"tax_class_id": null,
"weight": "0.00",
"weight_class": null,
"brand_id": "1",
"position": "0",
"categories": [
"帽子",
"鞋子"
],
"sales": "1",
"viewed": "5",
"is_virtual": null,
"slug": ""
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'http://innoshop.test/api/panel/products/spuxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"translations": {
"en": {
"name": "Galaxy Glittering Evening Gown Shines Everywhere",
"locale": "en",
"content": "<p>Galaxy Glittering Evening Gown Shines Everywhere</p>",
"summary": "Galaxy Glittering Evening Gown Shines Everywhere",
"selling_point": "Galaxy Glittering Evening Gown Shines Everywhere",
"meta_title": "Galaxy Glittering Evening Gown Shines Everywhere",
"meta_description": "Galaxy Glittering Evening Gown Shines Everywhere",
"meta_keywords": "Galaxy Glittering Evening Gown Shines Everywhere"
},
"zh_cn": {
"name": "银河流光璀璨晚礼服闪耀全场",
"locale": "zh_cn",
"content": "<p>银河流光璀璨晚礼服闪耀全场</p>",
"summary": "银河流光璀璨晚礼服闪耀全场",
"selling_point": "银河流光璀璨晚礼服闪耀全场",
"meta_title": "银河流光璀璨晚礼服闪耀全场",
"meta_description": "银河流光璀璨晚礼服闪耀全场",
"meta_keywords": "银河流光璀璨晚礼服闪耀全场"
}
},
"images": [
"images/demo/product/1.png"
],
"active": "1",
"skus": [
{
"code": "GGE0012",
"price": 111,
"quantity": 49,
"image": "images/demo/product/1.png",
"image_url": "http://maijin.test/cache/images/demo/product/1-100x100.png",
"model": "GGE001",
"origin_price": 112,
"is_default": 1,
"error": false,
"text": " 红色 / 大 ",
"variants": [
0,
0
]
},
{
"code": "GGE0022",
"price": 222,
"quantity": 50,
"image": "images/demo/product/1.png",
"image_url": "http://maijin.test/cache/images/demo/product/1-100x100.png",
"model": "GGE002",
"origin_price": 223,
"is_default": 0,
"error": false,
"text": " 红色 / 小 ",
"variants": [
0,
1
]
}
],
"variants": [
{
"name": {
"en": "Color",
"zh_cn": "颜色"
},
"values": [
{
"name": {
"en": "Red",
"zh_cn": "红色"
},
"image": ""
}
]
},
{
"name": {
"en": "Size",
"zh_cn": "尺寸"
},
"values": [
{
"name": {
"en": "Big",
"zh_cn": "大"
},
"image": ""
},
{
"name": {
"en": "Small",
"zh_cn": "小"
},
"image": ""
}
]
}
],
"attributes": [
{
"attribute_id": "1",
"attribute_value_id": "3"
},
{
"attribute_id": "2",
"attribute_value_id": "1"
}
],
"tax_class_id": null,
"weight": "0.00",
"weight_class": null,
"brand_id": "1",
"position": "0",
"categories": [
"帽子",
"鞋子"
],
"sales": "1",
"viewed": "5",
"is_virtual": null,
"slug": ""
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2025-02-19 13:32:40