- 商城侧 - 后台
- 用户
- 商品
- 设置
- 营销
- 订单
- 分销
- 回调
- 供应商
- 门店
- 系统
- 财务
- 商城侧 - 门店
- 商城侧 - 收银台
- 商城侧 - 供应商
- 商城侧 - 客服
新建或修改商品
POST
/adminapi/product/product/{id}
请求参数
Authorization
在 header 添加参数
Authori-Zation
示例:
Authori-Zation: ********************
Path 参数
id
integer
商品ID
Body 参数application/json
id
integer
必需
pid
integer
必需
type
enum<integer>
商品所属
枚举值:
012
product_type
enum<integer>
商品类型
枚举值:
0123499
relation_id
integer
关联的店铺或者供应商ID
mer_id
integer
商户ID
image
string
商品图片
recommend_image
string
推荐图
slider_image
array[string]
轮播图
store_name
string
店铺名称
store_info
string
商品简介
keyword
string
关键字
bar_code
string
商品条码(一维码)
cate_id
array[string]
分类ID
price
integer
价格
vip_price
integer
VIP价格
ot_price
integer
必需
postage
integer
必需
delivery_type
array[string]
必需
freight
integer
必需
unit_name
string
必需
sort
integer
必需
sales
integer
必需
stock
integer
必需
is_show
integer
必需
is_hot
integer
必需
is_benefit
integer
必需
is_best
integer
必需
is_new
integer
必需
add_time
integer
必需
is_postage
integer
必需
is_verify
integer
必需
is_del
integer
必需
mer_use
integer
必需
give_integral
integer
必需
cost
integer
必需
is_seckill
integer
必需
is_bargain
integer
必需
is_good
integer
必需
is_sub
array[string]
是否开启分佣
is_vip
integer
必需
ficti
integer
必需
browse
integer
必需
code_path
string
必需
soure_link
string
必需
video_link
string
必需
temp_id
integer
必需
spec_type
enum<integer>
当前的规格
枚举值:
01
activity
array[string]
必需
spu
string
SPU
label_id
array[string]
必需
command_word
string
必需
recommend_list
array[string]
必需
brand_id
array[integer]
必需
brand_com
string
必需
code
string
必需
is_vip_product
integer
必需
is_presale_product
integer
必需
presale_start_time
integer
必需
presale_end_time
integer
必需
presale_day
integer
必需
auto_on_time
string
必需
auto_off_time
string
必需
custom_form
array[string]
必需
system_form_id
integer
必需
applicable_type
integer
必需
applicable_store_id
array[string]
必需
is_support_refund
integer
必需
store_label_id
array[string]
必需
ensure_id
array[string]
必需
specs
array[string]
必需
specs_id
integer
必需
is_limit
boolean
必需
limit_type
integer
必需
limit_num
integer
必需
refusal
string
必需
is_police
integer
必需
is_sold
integer
必需
is_brokerage_ladder
enum<integer>
阶梯分佣
枚举值:
01
drug_attribute_item
object
必需
drug_ident
integer
必需
indication
array[string]
必需
dosage
string
必需
drug_instruction_item
object
必需
instruction_item
object
必需
additional_info_item
object
必需
standard_code
string
必需
v_drug_ident
integer
必需
coupons
array[string]
必需
recommend
array[string]
必需
video_open
boolean
必需
presale_time
array[string]
必需
description
string
必需
custom_form_info
array[string]
必需
items
array [object {3}]
必需
value
string
可选
detail
array[string]
可选
details
array [object {2}]
可选
attrs
array [object {23}]
规格组合
pic
string
必需
vip_price
string
必需
price
string
必需
cost
string
必需
ot_price
string
必需
stock
string
库存
bar_code
string
商品条码
code
string
必需
virtual_list
array[string]
可选
weight
string
必需
volume
string
必需
brokerage
integer
一级分佣
brokerage_two
integer
二级分佣
disk_info
string
可选
write_times
integer
可选
write_valid
integer
可选
days
integer
可选
section_time
array[string]
可选
value1
string
必需
values
string
必需
detail
object
必需
select
string
必需
product_type
enum<integer>
商品类型
枚举值:
01234
默认值:
0
示例值:
1
attr
object
商品规格
pic
string
必需
vip_price
integer
必需
price
integer
必需
cost
integer
必需
ot_price
integer
必需
stock
integer
必需
bar_code
string
必需
code
string
必需
virtual_list
array[string]
必需
weight
integer
必需
volume
integer
必需
brokerage
integer
必需
brokerage_two
integer
必需
disk_info
string
必需
write_times
integer
必需
write_valid
integer
必需
days
integer
必需
section_time
array[string]
必需
stores
array [object {15}]
必需
id
integer
必需
cate_id
integer
必需
name
string
必需
phone
string
必需
address
string
必需
detailed_address
string
必需
image
string
必需
is_show
integer
必需
day_time
string
必需
day_start
string
必需
day_end
string
必需
cate_name
null
必需
range
integer
必需
status_name
string
必需
prefix
string
必需
mapping_info
object
必需
instruction
object
必需
additional_info
object
必需
control_info
object
必需
storage_info
object
必需
transport_info
object
必需
drug_ident
object
必需
supplier_id
integer
必需
coupon_ids
array[string]
必需
header
array[string]
必需
is_sync_price
integer
必需
brokerage_ladder_rule
object
阶梯分佣规则
first_buy
array [object {3}]
首购分佣
repeat_buy
object
复购分佣
示例
{
"id": 2070,
"pid": 0,
"type": 0,
"product_type": 99,
"relation_id": 0,
"mer_id": 0,
"image": "https://oss.tw-yun.com/beta/standard_library/product_img_v2/1138833/640c236840f68.jpg?v=0&x-oss-process=style/standard-img-thumbnail-800_800",
"recommend_image": "",
"slider_image": [
"https://oss.tw-yun.com/beta/standard_library/product_img_v2/1138833/640c236840f68.jpg?v=0&x-oss-process=style/standard-img-thumbnail-800_800"
],
"store_name": "麻杏止咳糖浆 130毫升",
"store_info": "",
"keyword": "",
"bar_code": "",
"cate_id": [
13
],
"price": 30,
"vip_price": 0,
"ot_price": 0,
"postage": 0,
"delivery_type": [
"2",
"3",
"1"
],
"freight": 1,
"unit_name": "件",
"sort": 0,
"sales": 5,
"stock": 95,
"is_show": 1,
"is_hot": 0,
"is_benefit": 0,
"is_best": 0,
"is_new": 0,
"add_time": 1688440410,
"is_postage": 0,
"is_verify": 1,
"is_del": 0,
"mer_use": 0,
"give_integral": 0,
"cost": 10,
"is_seckill": 0,
"is_bargain": 0,
"is_good": 0,
"is_sub": [],
"is_vip": 0,
"ficti": 0,
"browse": 0,
"code_path": "",
"soure_link": "",
"video_link": "",
"temp_id": 0,
"spec_type": 0,
"activity": [
"默认",
"秒杀",
"砍价",
"拼团"
],
"spu": "5054555641841",
"label_id": [],
"command_word": "",
"recommend_list": [],
"brand_id": [],
"brand_com": "",
"code": "1138833",
"is_vip_product": 0,
"is_presale_product": 0,
"presale_start_time": 0,
"presale_end_time": 0,
"presale_day": 1,
"auto_on_time": "",
"auto_off_time": "",
"custom_form": [],
"system_form_id": 0,
"applicable_type": 1,
"applicable_store_id": [
2,
1
],
"is_support_refund": 1,
"store_label_id": [],
"ensure_id": [],
"specs": [],
"specs_id": 0,
"is_limit": 0,
"limit_type": 0,
"limit_num": 0,
"refusal": "",
"is_police": 1,
"is_sold": 0,
"is_brokerage_ladder": 0,
"drug_attribute_item": {
"drug_ident": "3",
"indication": [
"支气管炎"
],
"dosage": "糖浆剂",
"drug_instruction_item": {
"control_type": "1",
"transportation_condition": "1",
"storage_condition": "1",
"license_no": "国药准字Z20064177",
"alias": "",
"scientific_name": "",
"english_name": "",
"chinese_pinyin": "",
"chinese_pinyin_initials": "",
"manufacturer": "广西葛洪堂药业有限公司",
"place_of_origin": "",
"is_liquid": "1",
"is_fragile": "0",
"is_import": "0",
"package_spec": ",,"
},
"instruction_item": [],
"additional_info_item": []
},
"standard_code": "1138833",
"v_drug_ident": 3,
"coupons": [],
"recommend": [],
"video_open": false,
"presale_time": [],
"description": "",
"custom_form_info": [],
"items": [],
"attrs": [
{
"pic": "https://oss.tw-yun.com/beta/standard_library/product_img_v2/1138833/640c236840f68.jpg?v=0&x-oss-process=style/standard-img-thumbnail-800_800",
"vip_price": 0,
"price": 30,
"cost": 10,
"ot_price": 0,
"stock": 95,
"bar_code": "",
"code": "1138833",
"virtual_list": [],
"weight": 0,
"volume": 0,
"brokerage": 0,
"brokerage_two": 0,
"disk_info": "",
"write_times": 1,
"write_valid": 1,
"days": 0,
"section_time": [
"",
""
]
}
],
"attr": {
"pic": "https://oss.tw-yun.com/beta/standard_library/product_img_v2/1138833/640c236840f68.jpg?v=0&x-oss-process=style/standard-img-thumbnail-800_800",
"vip_price": 0,
"price": 30,
"cost": 10,
"ot_price": 0,
"stock": 95,
"bar_code": "",
"code": "1138833",
"virtual_list": [],
"weight": 0,
"volume": 0,
"brokerage": 0,
"brokerage_two": 0,
"disk_info": "",
"write_times": 1,
"write_valid": 1,
"days": 0,
"section_time": [
"",
""
]
},
"stores": [
{
"id": 2,
"cate_id": 0,
"name": "陈先生",
"phone": "13200000000",
"address": "广东汕头市金平区石炮台街道",
"detailed_address": "中国陕西省西安市未央区凤城八路109号张家堡街道",
"image": "http://test.mall.86yfw.com/uploads/system/ops_mobile_logo.png",
"is_show": 1,
"day_time": "08:00:00 - 20:00:00",
"day_start": "08:00:00",
"day_end": "20:00:00",
"cate_name": null,
"range": 0,
"status_name": "营业中",
"prefix": "store"
},
{
"id": 1,
"cate_id": 0,
"name": "测试门店1",
"phone": "13888888888",
"address": "上海徐汇区城区",
"detailed_address": "中国陕西省西安市未央区凤城八路109号张家堡街道",
"image": "http://test.mall.86yfw.com/uploads/attach/2023/04/20230406/ae9552ac220fc235bb6894f7fa294a65.jpg",
"is_show": 1,
"day_time": "08:00:00 - 18:00:00",
"day_start": "08:00:00",
"day_end": "18:00:00",
"cate_name": null,
"range": 0,
"status_name": "营业中",
"prefix": "store"
}
],
"mapping_info": {
"instruction": {
"1": "功能主治",
"2": "不良反应",
"3": "用法用量",
"4": "注意事项",
"5": "禁忌"
},
"additional_info": {
"1": "孕妇及哺乳期妇女用药",
"2": "儿童用药",
"3": "老年用药",
"4": "药物过量",
"5": "药理毒理",
"6": "包装",
"7": "临床试验",
"8": "化学名",
"9": "贮藏",
"10": "有效期",
"11": "临床应用",
"12": "化学式",
"13": "作用类别",
"14": "成份",
"15": "性状",
"16": "性味归经",
"17": "食用价值",
"18": "执行标准",
"19": "药代动力学",
"20": "药物相互作用",
"21": "适用人群",
"22": "适用范围",
"23": "不适用人群",
"24": "结构及组成",
"25": "管理类别"
},
"control_info": {
"1": "非管控",
"2": "疫苗",
"3": "血液制品",
"4": "麻醉药品",
"5": "精神药品",
"6": "医疗用毒性药品",
"7": "放射性药品",
"8": "药品类易制毒化学品"
},
"storage_info": {
"1": "常温",
"2": "避光",
"3": "冷藏",
"4": "密封",
"5": "通风",
"6": "阴凉"
},
"transport_info": {
"1": "常规",
"2": "低温",
"3": "防风",
"4": "防暑",
"5": "加固"
},
"drug_ident": {
"1": "非药品",
"2": "处方药",
"3": "OTC"
}
},
"supplier_id": 0,
"coupon_ids": [],
"header": [],
"is_sync_price": 0,
"brokerage_ladder_rule": {
"first_buy": [
{
"one_rebate": 2,
"two_rebate": 1,
"number": 3
},
{
"one_rebate": 3,
"two_rebate": 2,
"number": 8
}
],
"repeat_buy": {
"one_rebate": 1,
"two_rebate": 2
}
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/adminapi/product/product/' \
--header 'Content-Type: application/json' \
--header 'Authori-Zation;' \
--data-raw '{
"id": 2070,
"pid": 0,
"type": 0,
"product_type": 99,
"relation_id": 0,
"mer_id": 0,
"image": "https://oss.tw-yun.com/beta/standard_library/product_img_v2/1138833/640c236840f68.jpg?v=0&x-oss-process=style/standard-img-thumbnail-800_800",
"recommend_image": "",
"slider_image": [
"https://oss.tw-yun.com/beta/standard_library/product_img_v2/1138833/640c236840f68.jpg?v=0&x-oss-process=style/standard-img-thumbnail-800_800"
],
"store_name": "麻杏止咳糖浆 130毫升",
"store_info": "",
"keyword": "",
"bar_code": "",
"cate_id": [
13
],
"price": 30,
"vip_price": 0,
"ot_price": 0,
"postage": 0,
"delivery_type": [
"2",
"3",
"1"
],
"freight": 1,
"unit_name": "件",
"sort": 0,
"sales": 5,
"stock": 95,
"is_show": 1,
"is_hot": 0,
"is_benefit": 0,
"is_best": 0,
"is_new": 0,
"add_time": 1688440410,
"is_postage": 0,
"is_verify": 1,
"is_del": 0,
"mer_use": 0,
"give_integral": 0,
"cost": 10,
"is_seckill": 0,
"is_bargain": 0,
"is_good": 0,
"is_sub": [],
"is_vip": 0,
"ficti": 0,
"browse": 0,
"code_path": "",
"soure_link": "",
"video_link": "",
"temp_id": 0,
"spec_type": 0,
"activity": [
"默认",
"秒杀",
"砍价",
"拼团"
],
"spu": "5054555641841",
"label_id": [],
"command_word": "",
"recommend_list": [],
"brand_id": [],
"brand_com": "",
"code": "1138833",
"is_vip_product": 0,
"is_presale_product": 0,
"presale_start_time": 0,
"presale_end_time": 0,
"presale_day": 1,
"auto_on_time": "",
"auto_off_time": "",
"custom_form": [],
"system_form_id": 0,
"applicable_type": 1,
"applicable_store_id": [
2,
1
],
"is_support_refund": 1,
"store_label_id": [],
"ensure_id": [],
"specs": [],
"specs_id": 0,
"is_limit": 0,
"limit_type": 0,
"limit_num": 0,
"refusal": "",
"is_police": 1,
"is_sold": 0,
"is_brokerage_ladder": 0,
"drug_attribute_item": {
"drug_ident": "3",
"indication": [
"支气管炎"
],
"dosage": "糖浆剂",
"drug_instruction_item": {
"control_type": "1",
"transportation_condition": "1",
"storage_condition": "1",
"license_no": "国药准字Z20064177",
"alias": "",
"scientific_name": "",
"english_name": "",
"chinese_pinyin": "",
"chinese_pinyin_initials": "",
"manufacturer": "广西葛洪堂药业有限公司",
"place_of_origin": "",
"is_liquid": "1",
"is_fragile": "0",
"is_import": "0",
"package_spec": ",,"
},
"instruction_item": [],
"additional_info_item": []
},
"standard_code": "1138833",
"v_drug_ident": 3,
"coupons": [],
"recommend": [],
"video_open": false,
"presale_time": [],
"description": "",
"custom_form_info": [],
"items": [],
"attrs": [
{
"pic": "https://oss.tw-yun.com/beta/standard_library/product_img_v2/1138833/640c236840f68.jpg?v=0&x-oss-process=style/standard-img-thumbnail-800_800",
"vip_price": 0,
"price": 30,
"cost": 10,
"ot_price": 0,
"stock": 95,
"bar_code": "",
"code": "1138833",
"virtual_list": [],
"weight": 0,
"volume": 0,
"brokerage": 0,
"brokerage_two": 0,
"disk_info": "",
"write_times": 1,
"write_valid": 1,
"days": 0,
"section_time": [
"",
""
]
}
],
"attr": {
"pic": "https://oss.tw-yun.com/beta/standard_library/product_img_v2/1138833/640c236840f68.jpg?v=0&x-oss-process=style/standard-img-thumbnail-800_800",
"vip_price": 0,
"price": 30,
"cost": 10,
"ot_price": 0,
"stock": 95,
"bar_code": "",
"code": "1138833",
"virtual_list": [],
"weight": 0,
"volume": 0,
"brokerage": 0,
"brokerage_two": 0,
"disk_info": "",
"write_times": 1,
"write_valid": 1,
"days": 0,
"section_time": [
"",
""
]
},
"stores": [
{
"id": 2,
"cate_id": 0,
"name": "陈先生",
"phone": "13200000000",
"address": "广东汕头市金平区石炮台街道",
"detailed_address": "中国陕西省西安市未央区凤城八路109号张家堡街道",
"image": "http://test.mall.86yfw.com/uploads/system/ops_mobile_logo.png",
"is_show": 1,
"day_time": "08:00:00 - 20:00:00",
"day_start": "08:00:00",
"day_end": "20:00:00",
"cate_name": null,
"range": 0,
"status_name": "营业中",
"prefix": "store"
},
{
"id": 1,
"cate_id": 0,
"name": "测试门店1",
"phone": "13888888888",
"address": "上海徐汇区城区",
"detailed_address": "中国陕西省西安市未央区凤城八路109号张家堡街道",
"image": "http://test.mall.86yfw.com/uploads/attach/2023/04/20230406/ae9552ac220fc235bb6894f7fa294a65.jpg",
"is_show": 1,
"day_time": "08:00:00 - 18:00:00",
"day_start": "08:00:00",
"day_end": "18:00:00",
"cate_name": null,
"range": 0,
"status_name": "营业中",
"prefix": "store"
}
],
"mapping_info": {
"instruction": {
"1": "功能主治",
"2": "不良反应",
"3": "用法用量",
"4": "注意事项",
"5": "禁忌"
},
"additional_info": {
"1": "孕妇及哺乳期妇女用药",
"2": "儿童用药",
"3": "老年用药",
"4": "药物过量",
"5": "药理毒理",
"6": "包装",
"7": "临床试验",
"8": "化学名",
"9": "贮藏",
"10": "有效期",
"11": "临床应用",
"12": "化学式",
"13": "作用类别",
"14": "成份",
"15": "性状",
"16": "性味归经",
"17": "食用价值",
"18": "执行标准",
"19": "药代动力学",
"20": "药物相互作用",
"21": "适用人群",
"22": "适用范围",
"23": "不适用人群",
"24": "结构及组成",
"25": "管理类别"
},
"control_info": {
"1": "非管控",
"2": "疫苗",
"3": "血液制品",
"4": "麻醉药品",
"5": "精神药品",
"6": "医疗用毒性药品",
"7": "放射性药品",
"8": "药品类易制毒化学品"
},
"storage_info": {
"1": "常温",
"2": "避光",
"3": "冷藏",
"4": "密封",
"5": "通风",
"6": "阴凉"
},
"transport_info": {
"1": "常规",
"2": "低温",
"3": "防风",
"4": "防暑",
"5": "加固"
},
"drug_ident": {
"1": "非药品",
"2": "处方药",
"3": "OTC"
}
},
"supplier_id": 0,
"coupon_ids": [],
"header": [],
"is_sync_price": 0,
"brokerage_ladder_rule": {
"first_buy": [
{
"one_rebate": 2,
"two_rebate": 1,
"number": 3
},
{
"one_rebate": 3,
"two_rebate": 2,
"number": 8
}
],
"repeat_buy": {
"one_rebate": 1,
"two_rebate": 2
}
}
}'
返回响应
🟢200成功
application/json
Body
status
integer
必需
msg
string
必需
示例
{
"status": 200,
"msg": "保存商品信息成功"
}