Innoshop Panel API
首页InnoShop官网
源码地址
  • Github
  • Gitee
首页InnoShop官网
源码地址
  • Github
  • Gitee
  1. Product
  • Catalog
    • 分类列表
      GET
    • 创建分类
      POST
    • 更新分类
      PUT
    • 删除分类
      DELETE
    • 文章分类自动完成
      GET
    • Catalog Names
      GET
  • Article
    • 文章列表
      GET
    • 文章列表
      GET
    • 创建文章
      POST
    • 更新文章
      PUT
    • 删除文章
      DELETE
    • 文章自动完成
      GET
    • Article Names
      GET
  • Page
    • 单页列表
      GET
    • 创建单页
      POST
    • 更新单页
      PUT
    • 删除单页
      DELETE
    • 单页自动完成
      GET
    • Page Names
      GET
  • Tag
    • 标签列表
      GET
    • 标签列表
      GET
    • 创建标签
      POST
    • 创建标签
      POST
    • 更新标签
      PUT
    • 更新标签
      PUT
    • 删除标签
      DELETE
    • 删除标签
      DELETE
    • Tag Names
      GET
  • Product
    • 产品列表
      GET
    • Product Names
      GET
    • 自动完成
      GET
    • 批量导入
      POST
    • 全量更新
      PUT
    • 增量更新
      PATCH
  • Category
    • 分类列表
    • Category Names
    • 自动完成
  • Order
    • Upate Note
  • Customer
    • 客户列表
    • 创建客户
    • 更新客户
    • 删除客户
    • 客户自动完成
    • 获取客户名称
  • Brand
    • 品牌自动完成
    • Brand Names
  • FileManager
    • File List
    • Directory List
    • Create Directory
  • Inquiry
    • 更新询价数量价格
  • Shipment
    • 删除发货单
    • 物流跟踪
    • 创建发货单
  • 后台Token
    POST
  • 后台概览
    GET
  • 获取当前用户
    GET
  1. Product

增量更新

开发中
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
上一页
全量更新
下一页
分类列表
Built with