- Catalog
- Article
- Page
- Tag
- Product
- Category
- Order
- Customer
- Brand
- FileManager
- Inquiry
- Shipment
- 后台TokenPOST
- 后台概览GET
- 获取当前用户GET
增量更新
开发中
PATCH
/products/{spu_code}
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Path 参数
spu_code
string
必需
Body 参数application/json
object {0}
示例
{
"spu_code": 123457,
"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": "1GGE0012",
"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": "2GGE0022",
"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 PATCH 'http://innoshop.test/api/panel/products/' \
--header 'Content-Type: application/json' \
--data-raw '{
"spu_code": 123457,
"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": "1GGE0012",
"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": "2GGE0022",
"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