标准版对外接口文档
  1. 商品
标准版对外接口文档
  • 对外接口
    • 商品
      • 新增分类
        POST
      • 更新分类
        PUT
      • 更新分类状态
        PUT
      • 更新商品状态
        PUT
      • 删除分类
        DELETE
      • 新增商品
        POST
      • 更新商品
        PUT
      • 分类列表
        GET
      • 商品列表
        GET
      • 获取分类详情
        GET
      • 获取商品详情
        GET
      • 同步商品库存
        PUT
    • 第三方授权
      • 获取access_token
      • 刷新access_token
    • 订单
      • 订单列表
      • 订单详情
      • 获取订单可拆分商品列表
      • 获取快递公司
      • 订单收货
      • 订单发货
      • 订单拆单发货
      • 修改订单发票
      • 修改订单备注
      • 修改订单配送信息
      • 修改订单发票状态
      • 推送订单
    • 售后订单
      • 售后订单列表
      • 售后单详情
      • 修改售后单备注
      • 售后订单退款
      • 同意退款
      • 拒绝退款
    • 用户
      • 新增用户
      • 赠送相关
      • 等级列表
      • 用户列表
      • 更新用户
    • 优惠券
      • 优惠券列表
      • 新增优惠券
      • 修改状态
      • 删除优惠券
  1. 商品

更新商品

开发中
PUT
/product/{id}
对外接口/商品

请求参数

Path 参数
id
string 
必需
Header 参数
authori-zation
string 
token
必需
示例值:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0ZXN0LnByby53dWh0Lm5ldCIsImF1ZCI6InRlc3QucHJvLnd1aHQubmV0IiwiaWF0IjoxNjQ5NzQ2MjAyLCJuYmYiOjE2NDk3NDYyMDIsImV4cCI6MTY1MDM1MTAwMiwianRpIjp7ImlkIjoxLCJ0eXBlIjoiYWRtaW4ifX0.-xDXOdYfBNsu3IqF3nMO_E_fop2lxkwNw25fdQpzGVQ
Body 参数application/json
postage
string 
邮费
必需
0元则包邮
recommend
array[string]
商品推荐
必需
is_best:精品 is_new:新品 is_hot:热卖 is_good:优品 is_benefit:促销
presale
integer 
预售商品开关
必需
1开启 0关闭
presale_day
integer 
预售发货日
必需
预售结束后几天内发货单位为天
presale_time
array[string]
预售时间段
必需
[ "2022-07-20 00:00", "2022-08-20 00:00" ]
is_limit
integer 
是否开启限购
必需
1开启 0关闭 默认为0
limit_type
integer 
限购类型
必需
1单次限购 2永久限购
limit_num
integer 
限购数量
必需
video_open
integer 
是否开启视频
必需
1开启 0关闭
video_link
string 
视频链接地址
必需
vip_product
integer 
是否会员专属商品
必需
1是 0否
store_name
string 
商品名称
必需
cate_id
array[integer]
分类ID
必需
至少拥有一个分类
keyword
string 
商品关键字
必需
unit_name
string 
单位名称
必需
store_info
string 
商品简介
必需
slider_image
array[string]
轮播图
必需
description
string 
商品详情
必需
ficti
integer 
虚拟销量
必需
give_integral
integer 
赠送积分
必需
sort
integer 
排序
必需
is_show
integer 
上架状态
必需
1上架 0下架
spec_type
integer 
规格类型
必需
0单规格 1多规格
attrs
array [object {13}] 
必需
value1
string 
第一个规格名称
可选
多规格必填 和items里面的多个value顺序一致
value2
string 
第二个规格名称
可选
detail
object 
规格值组合
可选
参考示例值 {"锅型":"火锅必备","尺寸":"33寸"}
pic
string 
属性图片
可选
price
string 
售价
必需
cost
string 
成本价
必需
ot_price
string 
原价
必需
bar_code
string 
产品编号
必需
weight
string 
重量
必需
volume
string 
体积
必需
brokerage
string 
一级返佣
必需
brokerage_two
string 
二级返佣
必需
vip_price
string 
会员专享价
必需
items
array [object {2}] 
商品规格
必需
多规格必填 单规格为空数组
value
string 
规格名称
必需
detail
array[string]
规格值
必需
示例
{
  "postage": "9.90",
  "recommend": [
    "is_hot",
    "is_best"
  ],
  "presale": 1,
  "presale_day": 1,
  "presale_time": [
    "2022-07-20 00:00",
    "2022-08-20 00:00"
  ],
  "is_limit": 0,
  "limit_type": 0,
  "limit_num": 0,
  "video_open": 0,
  "video_link": "",
  "vip_product": 0,
  "store_name": "美的(Midea)电磁炉 旋控调节火力 C22-RX22H0107",
  "cate_id": [
    2
  ],
  "keyword": "电磁炉 美的",
  "unit_name": "件",
  "store_info": "美的xxxxx",
  "slider_image": [
    "https://data44.wuht.net//uploads/attach/2022/01/15/f391b023d240b73f13fe0f5d08250884.jpg",
    "https://data44.wuht.net//uploads/attach/2022/01/15/6fc4a434065f9b20da5d68e2b7915069.jpg",
    "https://data44.wuht.net//uploads/attach/2022/01/15/1d6a58df8f136925bffa326b22a59d1a.jpg",
    "https://data44.wuht.net//uploads/attach/2022/01/15/80475fb57727e34049b902efa8bcdf4f.jpg"
  ],
  "description": "<p>详情</p>",
  "ficti": 0,
  "give_integral": 0,
  "sort": 10,
  "is_show": 1,
  "spec_type": 1,
  "attrs": [
    {
      "value1": "大面版",
      "value2": "30寸",
      "detail": {
        "锅型": "大面版",
        "尺寸": "30寸"
      },
      "pic": "http://www.crmebstd450.test/uploads/attach/2022/06/20220625/b4d26d8fa71a7b35ad9dfe94b7956a58.jpg",
      "price": "100.00",
      "cost": "90.00",
      "ot_price": "80.00",
      "bar_code": "MD-01",
      "weight": "21.00",
      "volume": "3.00"
    },
    {
      "value1": "大面版",
      "value2": "33寸",
      "detail": {
        "锅型": "大面版",
        "尺寸": "33寸"
      },
      "pic": "http://www.crmebstd450.test/uploads/attach/2022/06/20220625/b4d26d8fa71a7b35ad9dfe94b7956a58.jpg",
      "price": "100.00",
      "cost": "90.00",
      "ot_price": "80.00",
      "bar_code": "MD-02",
      "weight": "22.00",
      "volume": "3.00"
    },
    {
      "value1": "火锅必备",
      "value2": "30寸",
      "detail": {
        "锅型": "火锅必备",
        "尺寸": "30寸"
      },
      "pic": "http://www.crmebstd450.test/uploads/attach/2022/06/20220625/b4d26d8fa71a7b35ad9dfe94b7956a58.jpg",
      "price": "100.00",
      "cost": "90.00",
      "ot_price": "80.00",
      "bar_code": "MD-03",
      "weight": "21.00",
      "volume": "3.00"
    },
    {
      "value1": "火锅必备",
      "value2": "33寸",
      "detail": {
        "锅型": "火锅必备",
        "尺寸": "33寸"
      },
      "pic": "http://www.crmebstd450.test/uploads/attach/2022/06/20220625/b4d26d8fa71a7b35ad9dfe94b7956a58.jpg",
      "price": "100.00",
      "cost": "90.00",
      "ot_price": "80.00",
      "bar_code": "MD-04",
      "weight": "22.00",
      "volume": "3.00"
    }
  ],
  "items": [
    {
      "value": "锅型",
      "detail": [
        "大面版",
        "火锅必备"
      ]
    },
    {
      "value": "尺寸",
      "detail": [
        "30寸",
        "33寸"
      ]
    }
  ],
  "type": 0
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT '/product/' \
--header 'authori-zation: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0ZXN0LnByby53dWh0Lm5ldCIsImF1ZCI6InRlc3QucHJvLnd1aHQubmV0IiwiaWF0IjoxNjQ5NzQ2MjAyLCJuYmYiOjE2NDk3NDYyMDIsImV4cCI6MTY1MDM1MTAwMiwianRpIjp7ImlkIjoxLCJ0eXBlIjoiYWRtaW4ifX0.-xDXOdYfBNsu3IqF3nMO_E_fop2lxkwNw25fdQpzGVQ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "postage": "9.90",
    "recommend": [
        "is_hot",
        "is_best"
    ],
    "presale": 1,
    "presale_day": 1,
    "presale_time": [
        "2022-07-20 00:00",
        "2022-08-20 00:00"
    ],
    "is_limit": 0,
    "limit_type": 0,
    "limit_num": 0,
    "video_open": 0,
    "video_link": "",
    "vip_product": 0,
    "store_name": "美的(Midea)电磁炉 旋控调节火力 C22-RX22H0107",
    "cate_id": [
        2
    ],
    "keyword": "电磁炉 美的",
    "unit_name": "件",
    "store_info": "美的xxxxx",
    "slider_image": [
        "https://data44.wuht.net//uploads/attach/2022/01/15/f391b023d240b73f13fe0f5d08250884.jpg",
        "https://data44.wuht.net//uploads/attach/2022/01/15/6fc4a434065f9b20da5d68e2b7915069.jpg",
        "https://data44.wuht.net//uploads/attach/2022/01/15/1d6a58df8f136925bffa326b22a59d1a.jpg",
        "https://data44.wuht.net//uploads/attach/2022/01/15/80475fb57727e34049b902efa8bcdf4f.jpg"
    ],
    "description": "<p>详情</p>",
    "ficti": 0,
    "give_integral": 0,
    "sort": 10,
    "is_show": 1,
    "spec_type": 1,
    "attrs": [
        {
            "value1": "大面版",
            "value2": "30寸",
            "detail": {
                "锅型": "大面版",
                "尺寸": "30寸"
            },
            "pic": "http://www.crmebstd450.test/uploads/attach/2022/06/20220625/b4d26d8fa71a7b35ad9dfe94b7956a58.jpg",
            "price": "100.00",
            "cost": "90.00",
            "ot_price": "80.00",
            "bar_code": "MD-01",
            "weight": "21.00",
            "volume": "3.00"
        },
        {
            "value1": "大面版",
            "value2": "33寸",
            "detail": {
                "锅型": "大面版",
                "尺寸": "33寸"
            },
            "pic": "http://www.crmebstd450.test/uploads/attach/2022/06/20220625/b4d26d8fa71a7b35ad9dfe94b7956a58.jpg",
            "price": "100.00",
            "cost": "90.00",
            "ot_price": "80.00",
            "bar_code": "MD-02",
            "weight": "22.00",
            "volume": "3.00"
        },
        {
            "value1": "火锅必备",
            "value2": "30寸",
            "detail": {
                "锅型": "火锅必备",
                "尺寸": "30寸"
            },
            "pic": "http://www.crmebstd450.test/uploads/attach/2022/06/20220625/b4d26d8fa71a7b35ad9dfe94b7956a58.jpg",
            "price": "100.00",
            "cost": "90.00",
            "ot_price": "80.00",
            "bar_code": "MD-03",
            "weight": "21.00",
            "volume": "3.00"
        },
        {
            "value1": "火锅必备",
            "value2": "33寸",
            "detail": {
                "锅型": "火锅必备",
                "尺寸": "33寸"
            },
            "pic": "http://www.crmebstd450.test/uploads/attach/2022/06/20220625/b4d26d8fa71a7b35ad9dfe94b7956a58.jpg",
            "price": "100.00",
            "cost": "90.00",
            "ot_price": "80.00",
            "bar_code": "MD-04",
            "weight": "22.00",
            "volume": "3.00"
        }
    ],
    "items": [
        {
            "value": "锅型",
            "detail": [
                "大面版",
                "火锅必备"
            ]
        },
        {
            "value": "尺寸",
            "detail": [
                "30寸",
                "33寸"
            ]
        }
    ],
    "type": 0
}'

返回响应

🟢200成功
application/json
Body
status
integer 
状态码
必需
msg
string 
信息描述
必需
示例
{
  "status": 200,
  "msg": "修改成功"
}
修改于 2022-07-13 02:24:03
上一页
新增商品
下一页
分类列表
Built with