Skip to content

添加商品

请求路径

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

请求参数

参数必选类型描述
goods_nostring商品编号
namestring商品名称
picsarray商品主图,建议尺寸:750px*750px,支持jpg/png/gif,5MB以内,最多五张
linkTypestring购买方式:text-文字链接,pic-图片链接,local-本地购买,applet-小程序购买
linkstring购买链接地址
underlined_pricestring商品划线价
pricestring商品销售价
unitstring商品单位
goods_normarray属性组
goods_norm_detailarray属性组组合明细
statusstring商品状态:1-已上架,2-已下架
desstring图文描述
sort_snstring排序序号
mallstring虚拟门店信息
video_urlstring视频地址
video_img_urlstring视频封面
to_store_discount_contentobject到店折扣内容
is_to_store_discountstring是否到店折扣:1-是,2-否
typestring商品类型:goods-实体商品,virtual-虚拟商品
storagestring总库存
limit_numstring限购数量
limit_stastring是否限购:1-是,2-否
stock_enlarge_ratiostring秒杀库存放大比例
uidstring账户id
is_skustring是否是sku商品:1-是,2-否
attr_picture_swstring第一组属性图片开关:1-开,2-关
applet_buy_conf_linkstring小程序链接参数
applet_buy_conf_original_idstring小程序链接参数
applet_buy_conf_appidstring小程序链接参数
goods_mall_needstring门店是否必选:1-是,2-否(线下核销时必传)
is_subjectstring是否是课程商品:1-是,2-否
free_watch_switchstring是否试看:1-是,2-否
free_watch_timestring试看时长(分钟):1-10
drag_enablestring是否拖动:1-是,2-否
speed_enablestring是否速放:1-是,2-否
library_idsstring素材视频ids
attachmentobject附件信息

to_store_discount_content 参数结构

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

goods_norm 参数结构

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

attachment 参数结构

参数必选类型描述
typestring素材表来源:1-library_img,2-library_file,3-library_video
idstring素材id

请求示例

json
{
  "goods_no": "g111",
  "name": "111",
  "underlined_price": 0,
  "price": "0.01",
  "pics": ["https://example.com/image.jpg"],
  "linkType": "local",
  "unit": "个",
  "status": "1",
  "des": "<p><br></p>",
  "sort_sn": "1",
  "is_to_store_discount": "2",
  "buyer_message_sw": 1,
  "selling_point": "",
  "is_can_refund": "1",
  "storage": 1,
  "goods_category_id": "1",
  "type": "goods",
  "goods_norm": [{
    "attr_name": "",
    "attr_val": []
  }],
  "goods_norm_detail": [],
  "is_sku": 2,
  "sale_type": "1",
  "express_mode": "1",
  "is_display_stock": 1,
  "limit_num": 1,
  "limit_sta": 2,
  "stock_enlarge_ratio": 0,
  "is_coupon_type": "2",
  "uid": "35016"
}

响应参数

参数必选类型描述
codenumber状态码:200-成功,400-失败
msgstring提示信息
datastring商品id

响应示例

json
{
  "code": 200,
  "msg": "",
  "data": "168450"
}

可能遇到的问题