创建商品
POST
https://saas-open.vhall.com/v3/goods/good/create
SKU数组属性封装说明
创建商品时需要开启多端配置
enable_multi_config=1
,此时可以针不同观看端创建不同的商品SKU;当商品开启端多配置后, 不可更改为单端商品; 反之单端商品同样不支持修改为多端商品, 请提前考量,创建匹配的商品;
平台购买商品配置字段
字段 | 类型 | 说明 |
---|---|---|
buy_type | integer | 1=平台购买 |
price | number | 平台购买-商品价格 |
discount_price | number | 平台购买-商品优惠价格 |
shop_show | integer | 平台购买-是否展示店铺按钮 |
shop_url | string | 平台购买-店铺跳转地址 |
ext_attr | string | 平台购买-透传扩展字段 |
外链购买商品配置字段
字段 | 类型 | 说明 |
---|---|---|
buy_type | integer | 2=外链购买 |
price | number | 外链购买-商品价格 |
discount_price | number | 外链购买-商品优惠价格 |
shop_show | integer | 外链购买-是否展示店铺按钮 |
shop_url | string | 外链购买-店铺跳转地址 |
url | string | 外链购买-购买跳转地址 |
ext_attr | string | 外链购买-透传扩展字段 |
APP购买商品配置字段
字段 | 类型 | 说明 |
---|---|---|
buy_type | integer | 3=APP购买 |
price | number | APP购买-商品价格 |
discount_price | number | APP购买-商品优惠价格 |
shop_show | integer | APP购买-是否展示店铺按钮 |
shop_url | string | APP购买-店铺跳转地址 |
ext_attr | string | APP购买-透传扩展字段 |
third_goods_id | string | APP购买-三方商品编号 |
scheme_template | string | APP购买-跳转模板 |
qr_code_url | string | APP购买-引导下载二维码地址 |
小程序购买商品配置字段
字段 | 类型 | 说明 |
---|---|---|
buy_type | integer | 4=小程序购买 |
mini_program_price | number | 小程序购买-商品价格 |
mini_program_discount_price | number | 小程序购买-商品优惠价格 |
shop_show | integer | 小程序购买-是否展示店铺按钮 |
shop_url | string | 小程序购买-店铺跳转地址 |
ext_attr | string | 小程序购买-透传扩展字段 |
mini_program_jump_type | string | 小程序购买-跳转方式,默认0, 小程序内跳转 |
mini_program_id | string | 小程序购买-小程序ID |
mini_program_app_id | string | 小程序购买-小程序appid |
mini_program_path | string | 小程序购买-购买跳转地址 |
"sku": [
{
"buy_type": 1,
"price": 99.99,
"discount_price": 0.99,
"shop_show": 0,
"shop_url": "https://www.eshop.com/shop/6666",
"ext_attr": ""
},
{
"buy_type": 2,
"price": 99.99,
"discount_price": 0.99,
"url": "https://www.eshop.com",
"shop_show": 0,
"shop_url": "https://www.eshop.com/shop/6666",
"ext_attr": ""
},
{
"buy_type": 3,
"third_goods_id": "sku_121883138",
"price": 96.99,
"discount_price": 0.99,
"scheme_template": "eshop.com://orders/suborder?type=1&skuId={{goods_id}}&skuNum={{quantity}}&hostId={{webinar_id}}&liveUrl={{watch_url}}",
"qr_code_url": "https://eshop.com/app_downlod.png",
"shop_url": "eshop.com://shop/index",
"shop_show": 0,
"ext_attr": ""
},
{
"buy_type": 4,
"mini_program_price": 88.99,
"mini_program_discount_price": 0.99,
"mini_program_jump_type": 0,
"mini_program_id": "gh_9a54b795xxxx",
"mini_program_app_id": "wx829e6fa92724xxxx",
"mini_program_path": "/pages/jump/jump?colType=117&id=46035",
"mini_program_ext": "{\"flag\":111,\"msg\":\"透传内容,通过postmssage,回传上层\"}"
}
]
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'https://saas-open.vhall.com/v3/goods/good/create' \
--header 'platform: 15' \
--header 'Content-Type: application/json' \
--data-raw '{
"app_key": "75844ad7a2a5f2b421c04a125b197996",
"signed_at": "{% mock 'timestamp' , 's' %}",
"sign_type": "0",
"sign": "{{sign}}",
"name": "国宝玩偶1:1",
"third_goods_id": "sku121883138",
"description": "贩卖一只国宝",
"enable_multi_config": 1,
"images": [
{
"img_url": "https://eshop.com/goods/666.png",
"is_cover": 1
}
],
"ext_data": "{\"flag\":111,\"msg\":\"透传内容,通过接口等回传\"}",
"sku": [
{
"buy_type": 1,
"price": 99.99,
"discount_price": 0.99,
"shop_show": 0,
"shop_url": "https://www.eshop.com/shop/6666",
"ext_attr": ""
},
{
"buy_type": 2,
"price": 99.99,
"discount_price": 0.99,
"url": "https://www.eshop.com",
"shop_show": 0,
"shop_url": "https://www.eshop.com/shop/6666",
"ext_attr": ""
},
{
"buy_type": 3,
"third_goods_id": "sku_121883138",
"price": 96.99,
"discount_price": 0.99,
"scheme_template": "eshop.com://orders/suborder?type=1&skuId={{goods_id}}&skuNum={{quantity}}&hostId={{webinar_id}}&liveUrl={{watch_url}}",
"qr_code_url": "https://eshop.com/app_downlod.png",
"shop_url": "eshop.com://shop/index",
"shop_show": 0,
"ext_attr": ""
},
{
"buy_type": 4,
"mini_program_price": 88.99,
"mini_program_discount_price": 0.99,
"mini_program_jump_type": 0,
"mini_program_id": "gh_9a54b795xxxx",
"mini_program_app_id": "wx829e6fa92724xxxx",
"mini_program_path": "/pages/jump/jump?colType=117&id=46035",
"mini_program_ext": "{\"flag\":111,\"msg\":\"透传内容,通过postmssage,回传上层\"}"
}
]
}'
响应示例响应示例
{
"trace_id": "",
"code": 0,
"msg": "",
"data": {
"goods_id": 0
}
}
请求参数
Header 参数
platform
integer
可选
默认值:
15
Body 参数application/json
返回响应
修改于 2025-07-07 03:27:18