Skip to content

商品批量添加 ​

请求路径 ​

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

请求参数 ​

参数必选类型描述
name是string商品名称
underlined_price否string划线价
price是number商品售价
pics是array商品主图,建议尺寸:750px*750px,支持jpg/png/gif,5MB以内,最多五张
linkType是string购买方式:text-文字链接,pic-图片链接,local-本地购买,applet-小程序购买
id是string商品id
link否string小程序链接地址
unit是string计量单位
status是string商品状态:1-上架,2-下架
des是string商品描述
sort_sn是string排序
mall否string核销门店
video_url否string商品视频简介
video_img_url否string商品视频封面
is_to_store_discount是string是否到店付商品:1-是,2-否
buyer_message_sw是string买家留言开关:1-开启,2-关闭
buyer_message否string买家留言文案
selling_point是string商品卖点
is_can_refund是string是否可以申请退款:1-是,2-否
storage是string库存
goods_category_id是string商品分组id
type是string商品类型:goods-实体商品,virtual-虚拟商品
is_sku是number是否是sku商品:1-是,2-否
sale_type是string开售类型:1-立即开售,2-定时开售
express_mode是string物流信息(仅限本地购买):1-快递发货,2-线下核销,3-无需发货和核销
date_limit_type是string虚拟商品使用有效期:1-不限制,2-限制
date_limit_start否string使用开始时间
date_limit_end否string使用结束时间
is_display_stock是string库存展示设置:1-显示,2-隐藏
postage否string邮费
num_start_buy否string起购数量
limit_num否string限购数量
limit_sta否string限购状态:1-不限购,2-限购
stock_enlarge_ratio否number库存放大比例
is_coupon_type是string是否付费优惠券商品:1-是,2-否
goods_no是string三方商品编号

to_store_discount_content 参数结构

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

goods_norm 参数结构

参数必选类型描述
attr_name否string属性名称
attr_val否array属性值

请求示例 ​

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"
  }
]

响应参数 ​

参数必选类型描述
code是number状态码:200-成功,400-失败
msg是string提示信息
data是object消息内容

data 参数结构

参数必选类型描述
goods_id是number商品id
goods_no是string三方商品编号

响应示例 ​

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

注意 ​

  • 接口最大单次添加20条记录

数据模型 ​