Appearance
添加商品
请求路径
- 请求方式:
POST - 请求头:
Content-Type:application/json - 接口地址:
/Third/Goods/addGoods - 频率限制:
10秒100次
请求参数
| 参数 | 必选 | 类型 | 描述 |
|---|---|---|---|
| goods_no | 否 | string | 商品编号 |
| name | 是 | string | 商品名称 |
| pics | 是 | array | 商品主图,建议尺寸:750px*750px,支持jpg/png/gif,5MB以内,最多五张 |
| linkType | 是 | string | 购买方式:text-文字链接,pic-图片链接,local-本地购买,applet-小程序购买 |
| link | 是 | string | 购买链接地址 |
| underlined_price | 是 | string | 商品划线价 |
| price | 是 | string | 商品销售价 |
| unit | 是 | string | 商品单位 |
| goods_norm | 是 | array | 属性组 |
| goods_norm_detail | 是 | array | 属性组组合明细 |
| status | 是 | string | 商品状态:1-已上架,2-已下架 |
| des | 是 | string | 图文描述 |
| sort_sn | 是 | string | 排序序号 |
| mall | 是 | string | 虚拟门店信息 |
| video_url | 是 | string | 视频地址 |
| video_img_url | 是 | string | 视频封面 |
| to_store_discount_content | 是 | object | 到店折扣内容 |
| is_to_store_discount | 是 | string | 是否到店折扣:1-是,2-否 |
| type | 是 | string | 商品类型:goods-实体商品,virtual-虚拟商品 |
| storage | 是 | string | 总库存 |
| limit_num | 是 | string | 限购数量 |
| limit_sta | 是 | string | 是否限购:1-是,2-否 |
| stock_enlarge_ratio | 是 | string | 秒杀库存放大比例 |
| uid | 是 | string | 账户id |
| is_sku | 是 | string | 是否是sku商品:1-是,2-否 |
| attr_picture_sw | 是 | string | 第一组属性图片开关:1-开,2-关 |
| applet_buy_conf_link | 是 | string | 小程序链接参数 |
| applet_buy_conf_original_id | 是 | string | 小程序链接参数 |
| applet_buy_conf_appid | 是 | string | 小程序链接参数 |
| goods_mall_need | 是 | string | 门店是否必选:1-是,2-否(线下核销时必传) |
| is_subject | 是 | string | 是否是课程商品:1-是,2-否 |
| free_watch_switch | 是 | string | 是否试看:1-是,2-否 |
| free_watch_time | 是 | string | 试看时长(分钟):1-10 |
| drag_enable | 是 | string | 是否拖动:1-是,2-否 |
| speed_enable | 是 | string | 是否速放:1-是,2-否 |
| library_ids | 是 | string | 素材视频ids |
| attachment | 是 | object | 附件信息 |
| goods_encode | 否 | string | 商品编码 |
to_store_discount_content 参数结构
| 参数 | 必选 | 类型 | 描述 |
|---|---|---|---|
| type | 是 | string | 到店付折扣信息:1-满减,2-抵消,3-折扣,4-定金 |
| full | 是 | string | 满减金额-满足金额 |
| decrease | 是 | string | 满减金额-减少金额 |
goods_norm 参数结构
| 参数 | 必选 | 类型 | 描述 |
|---|---|---|---|
| attr_name | 是 | string | 属性名称 |
| attr_val | 是 | array | 属性值 |
attachment 参数结构
| 参数 | 必选 | 类型 | 描述 |
|---|---|---|---|
| type | 是 | string | 素材表来源:1-library_img,2-library_file,3-library_video |
| id | 是 | string | 素材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"
}响应参数
| 参数 | 必选 | 类型 | 描述 |
|---|---|---|---|
| code | 是 | number | 状态码:200-成功,400-失败 |
| msg | 是 | string | 提示信息 |
| data | 是 | string | 商品id |
响应示例
json
{
"code": 200,
"msg": "",
"data": "168450"
}