Skip to content

批量添加商品

请求路径

  • 请求方式:POST
  • 请求头:Content-Type:application/json
  • 接口地址:/Third/Goods/saveBatchGoods
  • 频率限制:10秒100次

请求参数

参数必选类型描述
namestring商品名称
underlined_pricestring划线价
pricenumber商品售价
picsarray商品主图,建议尺寸:750px*750px,支持jpg/png/gif,5MB以内,最多五张
linkTypestring购买方式:text-文字链接,pic-图片链接,local-本地购买,applet-小程序购买
idstring商品id
linkstring小程序链接地址
unitstring计量单位
statusstring商品状态:1-上架,2-下架
desstring商品描述
sort_snstring排序
mallstring核销门店
video_urlstring商品视频简介
video_img_urlstring商品视频封面
is_to_store_discountstring是否到店付商品:1-是,2-否
buyer_message_swstring买家留言开关:1-开启,2-关闭
buyer_messagestring买家留言文案
selling_pointstring商品卖点
is_can_refundstring是否可以申请退款:1-是,2-否
storagestring库存
goods_category_idstring商品分组id
typestring商品类型:goods-实体商品,virtual-虚拟商品
is_skunumber是否是sku商品:1-是,2-否
sale_typestring开售类型:1-立即开售,2-定时开售
express_modestring物流信息(仅限本地购买):1-快递发货,2-线下核销,3-无需发货和核销
date_limit_typestring虚拟商品使用有效期:1-不限制,2-限制
date_limit_startstring使用开始时间
date_limit_endstring使用结束时间
is_display_stockstring库存展示设置:1-显示,2-隐藏
postagestring邮费
num_start_buystring起购数量
limit_numstring限购数量
limit_stastring限购状态:1-不限购,2-限购
stock_enlarge_rationumber库存放大比例
is_coupon_typestring是否付费优惠券商品:1-是,2-否
goods_nostring三方商品编号

to_store_discount_content 参数结构

参数必选类型描述
typestring到店付折扣信息:1-满减,2-抵消,3-折扣,4-定金
fullstring满减金额--满足金额(如:满100可用)
decreasestring满减金额--减少金额(如:减20)

goods_norm 参数结构

参数必选类型描述
attr_namestring属性名称
attr_valarray属性值

请求示例

json
[
  {
    "name": "测试实体商品-0",
    "underlined_price": "100.00",
    "price": 0.01,
    "pics": [
      "https://example.com/image.jpg"
    ],
    "linkType": "local",
    "id": "",
    "link": "",
    "unit": "pcs",
    "status": "1",
    "des": "<p><br></p>",
    "sort_sn": "1",
    "mall": "",
    "video_url": "",
    "video_img_url": "",
    "to_store_discount_content": {
      "type": "1",
      "full": "",
      "decrease": ""
    },
    "is_to_store_discount": "2",
    "buyer_message_sw": "1",
    "buyer_message": "",
    "selling_point": "极具性价比,近十日热评",
    "is_can_refund": "1",
    "storage": "121",
    "goods_category_id": "73",
    "type": "goods",
    "goods_norm": [
      {
        "attr_name": "",
        "attr_val": []
      }
    ],
    "goods_norm_detail": [],
    "is_sku": 2,
    "sale_type": "1",
    "express_mode": "1",
    "date_limit_type": "1",
    "date_limit_start": "",
    "date_limit_end": "",
    "is_display_stock": "1",
    "postage": "0.00",
    "num_start_buy": "1",
    "limit_num": "1",
    "limit_sta": "2",
    "stock_enlarge_ratio": 0,
    "is_coupon_type": "2",
    "goods_no": "ny123456"
  }
]

响应参数

参数必选类型描述
codenumber状态码:200-成功,400-失败
msgstring提示信息
dataobject消息内容

data 参数结构

参数必选类型描述
goods_idnumber商品id
goods_nostring三方商品编号

响应示例

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "code": 200,
    "data": {
      "goods_id": 170896,
      "goods_no": "2024032001"
    },
    "msg": "success"
  }
}

数据模型