编辑商品
将废弃
POST
https://api.goofish.pro/sop/product/edit
/sop/product/edit
最后修改时间:2023-07-26 10:14:11
1:可以只传入需要更新的字段, 没有传入的字段不会更新
2:多规格商品,如果已经发布到闲鱼则不能清空SKU,至少要保留一组
3:如果商品状态为销售中,则同步更新到闲鱼APP
请求参数
Query 参数
appid
string
必需
默认值:
{{appid}}
timestamp
string
必需
默认值:
{{timestamp}}
sign
string
必需
默认值:
{{sign}}
Body 参数application/json
product_id
string
管家商品ID
item_biz_type
enum<integer>
商品类型ID
枚举值:
257890
sp_biz_type
enum<integer>
商品分类ID
枚举值:
12389161718192021222324252728293031
channel_cat_id
string
商品类目ID
original_price
integer
商品原价(分)
>= 0<= 9999999900
price
integer
商品售价(分)
>= 1<= 9999999900
stock
integer
商品库存
>= 0<= 9999
默认值:
1
title
string
商品标题
>= 1 字符<= 30 字符
images
array[string]
商品图片URL
>= 1 items<= 30 items
desc
string
商品描述
>= 5 字符<= 5000 字符
sku_items
array [object {4}]
商品SKU
price
integer
SKU售价(分)
>= 1<= 9999999900
stock
integer
SKU库存
>= 0<= 9999
sku_text
string
SKU规格
注意:规格名称限制4个字符以内,属性值限制20个字符以内
outer_id
string
商家SKU编码
>= 1 字符<= 64 字符
district_id
integer
发货地区ID
outer_id
string
商家编码
>= 1 字符<= 64 字符
stuff_status
enum<integer>
商品成色
枚举值:
100-199959080706050
express_fee
integer
运费(分)
>= 0
默认值:
0
book_data
object
图书信息
title
string
书名
>= 1 字符<= 64 字符
author
string
作者
>= 1 字符<= 30 字符
publisher
string
出版社
>= 1 字符<= 30 字符
isbn
string
ISBN码
>= 10 字符<= 13 字符
food_data
object
食品信息
brand
string
品牌
>= 1 字符<= 30 字符
spec
string
规格
>= 1 字符<= 30 字符
pack
string
包装种类
>= 1 字符<= 10 字符
expire
object
保质期信息
production
object
生产信息
sp_guarantee
string
商品标签
1
: 100%验货2
: 正品鉴别3
: 七天包退4
: 一年质保5
: 48小时发货7
: 质量问题包退8
: 一物一证report_data
object
验货报告信息
jewelry
object
珠宝信息
valuable
object
奢品信息
curio
object
文玩信息
beauty_makeup
object
美妆信息
virtual_account
object
(已作废)虚拟账号/租号信息
used_car
object
二手车信息
game
object
游戏信息
support_sdr_policy
enum<integer>
是否支持七天无理由
枚举值:
10
support_nfr_policy
enum<integer>
是否支持描述不符包邮退
枚举值:
10
support_fd24hs_policy
enum<integer>
是否支持极速发货-24小时
枚举值:
10
support_fd10ms_policy
enum<integer>
是否支持极速发货-10分钟
枚举值:
10
示例
{
"item_biz_type": 2,
"sp_biz_type": 1,
"channel_cat_id": "xxx",
"original_price": 700000,
"price": 550000,
"stock": 10,
"title": "iPhone 12 128G 黑色",
"images": [
"https://xxx.com/xxx1.jpg",
"https://xxx.com/xxx2.jpg"
],
"desc": "商品描述",
"sku_items": [
{
"price": 500000,
"stock": 10,
"outer_id": "",
"sku_text": "颜色:白色;容量:128G"
},
{
"price": 600000,
"stock": 10,
"outer_id": "",
"sku_text": "颜色:白色;容量:256G"
},
{
"price": 500000,
"stock": 10,
"outer_id": "",
"sku_text": "颜色:黑色;容量:128G"
},
{
"price": 600000,
"stock": 10,
"outer_id": "",
"sku_text": "颜色:黑色;容量:256G"
}
],
"district_id": 440305,
"outer_id": "2021110112345",
"stuff_status": 100,
"express_fee": 10,
"book_data": {
"title": "北京法源寺",
"author": "李敖",
"publisher": "中国友谊出版公司",
"isbn": "9787505720176"
},
"food_data": {
"pack": "罐装",
"spec": "150",
"brand": "伏特加伏特加",
"expire": {
"num": 360,
"unit": "天"
},
"production": {
"date": "2021-11-29",
"address": {
"detail": "北京市东城区x街道",
"region": [
110000,
110100,
110101
]
}
}
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.goofish.pro/sop/product/edit?appid=×tamp=&sign=' \
--header 'Content-Type: application/json' \
--data-raw '{
"item_biz_type": 2,
"sp_biz_type": 1,
"channel_cat_id": "xxx",
"original_price": 700000,
"price": 550000,
"stock": 10,
"title": "iPhone 12 128G 黑色",
"images": [
"https://xxx.com/xxx1.jpg",
"https://xxx.com/xxx2.jpg"
],
"desc": "商品描述",
"sku_items": [
{
"price": 500000,
"stock": 10,
"outer_id": "",
"sku_text": "颜色:白色;容量:128G"
},
{
"price": 600000,
"stock": 10,
"outer_id": "",
"sku_text": "颜色:白色;容量:256G"
},
{
"price": 500000,
"stock": 10,
"outer_id": "",
"sku_text": "颜色:黑色;容量:128G"
},
{
"price": 600000,
"stock": 10,
"outer_id": "",
"sku_text": "颜色:黑色;容量:256G"
}
],
"district_id": 440305,
"outer_id": "2021110112345",
"stuff_status": 100,
"express_fee": 10,
"book_data": {
"title": "北京法源寺",
"author": "李敖",
"publisher": "中国友谊出版公司",
"isbn": "9787505720176"
},
"food_data": {
"pack": "罐装",
"spec": "150",
"brand": "伏特加伏特加",
"expire": {
"num": 360,
"unit": "天"
},
"production": {
"date": "2021-11-29",
"address": {
"detail": "北京市东城区x街道",
"region": [
110000,
110100,
110101
]
}
}
}
}'
返回响应
🟢200成功
application/json
Body
status
integer
必需
data
object
必需
product_id
string
管家商品ID
product_status
integer
管家商品状态
示例
{
"status": 0,
"data": {
"product_id": "string",
"product_status": 0
}
}
修改于 2023-07-26 10:14:11