名称 | 类型 | 必选 | 描述 |
---|---|---|---|
app_key | Long | 是 | 接入时申请的app_key |
method | String | 是 | 接口名称 |
access_token | String | 是 | Oauth2.0授权获得的access_token |
sign | String | 是 | 对 API 调用参数(除sign外)进行 md5 加密获得。参数的顺序为字母表的顺序 |
timestamp | Long | 是 | 时间戳,使用Unix时间戳格式 |
format | String | 是 | 响应格式。默认为json格式,固定 |
sign_method | String | 否 | 参数的加密方法选择,当前只支持Md5 |
version | String | 否 | API协议版本,固定值为:1.0 |
名称 | 类型 | 必选 | 描述 | 示例值 |
---|---|---|---|---|
userId
|
Number | 是 | 用户的ID | |
item
|
Object | 是 | 商品数据 | |
title
|
String | 是 | 商品标题 | |
description
|
String | 是 | 商品描述 | |
classIds
|
String[] | 否 | 店铺内分类id(通过xiaodian.common.decryptID编码后的id,非值类型) | |
decStockType
|
Number | 是 | 1下单减库存,0付款减库存 | |
cid
|
String | 是 | (叶子)类目id | |
code
|
String | 否 | 商品编码 | |
isShelf
|
Number | 是 | 0:上架,1:下架 | 0 |
brandId
|
String | 否 | 品牌id | |
coverImages
|
String[] | 是 | 封面图数组 | |
skus
|
Object[] | 是 | sku数据,多个sku属性时sku的数量为各个属性的笛卡尔积,如:颜色有白色、黑色,尺码有S、M,就应该有:白色-S、白色-M、黑色-S、黑色-M四条记录,可参考下面请求参数示例。 | |
image
|
String | 否 | sku图片(默认sku不传图则为商品主图) | |
stock
|
Number | 是 | 库存 | |
code
|
String | 是 | sku编码 | |
price
|
Number | 是 | 价格 | |
style
|
String | 否 | 款式 | |
size
|
String | 否 | 尺码 | |
attrs
|
Object[] | 否 | sku属性,可以根据cid查询xiaodian.item.getSkuProperties获取到指定类目下的可填写属性信息,可参考下面请求参数示例。 | |
name
|
String | 否 | 属性名,比如:颜色 | |
value
|
String | 否 | 属性值,比如:黑色 | |
props
|
Object | 否 | 尺码对照信息(map/字典类型) | |
key
|
String | 否 | 尺码对照属性值,比如:腰围 | |
value
|
Object | 否 | 尺码信息 | |
name
|
String | 否 | 属性名,比如:腰围 | |
values
|
String[] | 否 | 属性值:比如:66 | |
postage
|
Object | 否 | 运费模版数据 | |
tplId
|
String | 否 | 运费模版id | |
weight
|
String | 否 | 重量 | |
volume
|
String | 否 | 体积 | |
details
|
Object[] | 是 | 商品详情模块数据 | |
slug
|
String | 是 | 模块英文名称,自定义模块格式:custom_module_0_+模块名称,比如:custom_module_0_服装效果 | |
desc
|
String | 否 | 模块描述 | |
imageDescs
|
Object[] | 否 | 图片列表 | |
path
|
String | 否 | 图片相对路径 | |
properties
|
Object | 否 | 商品属性,例如“细节:拼接; 图案:粗条纹; 风格:日韩;”,”新增“厂名”,"厂址"用来保存商品出产信息 properties字段的具体格式为:Map<String, List<String>> 如:properties:{"厚薄":["普通"],"领型": ["圆领"],"图案":["色块","千鸟格"],"衣长":["短款(41-50cm)"]} | |
threeStandardPic
|
String[] | 否 | 三标图数组 说明:把入口展示给商家,让商家决定是否上传 |
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
data
|
String | 添加成功后的itemId |
1).{
"cid":"114q",
"code":"",
"coverImages":[
"http://s11.mogucdn.com/mlcdn/c45406/180417_7jdhe22ij22j10ic0c4216bg6lec5_666x1000.jpg"
],
"decStockType":0,
"description":"蘑菇街开放平台测试商品,请勿购买,谢谢配合",
"details":[
{
"desc":"蘑菇街开放平台测试商品,请勿购买",
"imageDescs":[
{
"path":"/mlcdn/55cf19/190228_7hb41h5ec9c0afekk9c2d5gg1fg0g_800x800.jpg"
},
{ "path":"/mlcdn/55cf19/190228_7hb41h5ec9c0afekk9c2d5gg1fg0g_800x800.jpg"
},
{ "path":"/mlcdn/55cf19/190228_7hb41h5ec9c0afekk9c2d5gg1fg0g_800x800.jpg"
},
{ "path":"/mlcdn/55cf19/190228_7hb41h5ec9c0afekk9c2d5gg1fg0g_800x800.jpg"
}
],
"slug":"model_img"
}
],
"isShelf":1,
"postage":{
"tplId":"100"
},
"properties":{
"开衩":[
"高开衩"
],
"裙型":[
"蛋糕裙"
],
"腰型":[
"高腰"
],
"材质":[
"雪纺"
],
"潮流":[
"韩系"
],
"袖长":[
"短袖"
],
"袖型":[
"常规袖"
],
"组合形式":[
"三件套"
],
"风格":[
"性感"
],
"裙长":[
"超短裙(小于75cm)"
],
"版型":[
"直筒"
],
"摆型":[
"不对称"
],
"元素":[
"铆钉"
],
"衣门襟":[
"拉链"
],
"领型":[
"圆领"
],
"图案":[
"色块"
],
"季节":[
"春季"
]
},
"skus":[
{
"attrs":[
{
"name":"颜色",
"props":{
},
"value":"白色"
},
{
"name":"尺码",
"props":{
"裙长":{
"name":"裙长",
"values":[
"88"
]
},
"肩宽":{
"name":"肩宽",
"values":[
"88"
]
},
"腰围":{
"name":"腰围",
"values":[
"88"
]
},
"胸围":{
"name":"胸围",
"values":[
"88"
]
},
"臀围":{
"name":"臀围",
"values":[
"88"
]
},
"袖长":{
"name":"袖长",
"values":[
"88"
]
}
},
"value":"M"
}
],
"code":"", "image":"http://s3.mogucdn.com/mlcdn/c45406/180417_3e18eba074kh6425h37fijkk1k6ja_720x720.jpg",
"price":0.01,
"size":"M",
"stock":1000,
"style":"白色"
},
{
"attrs":[
{
"name":"颜色",
"props":{
},
"value":"黑色"
},
{
"name":"尺码",
"props":{
"裙长":{
"name":"裙长",
"values":[
"78"
]
},
"肩宽":{
"name":"肩宽",
"values":[
"48"
]
},
"腰围":{
"name":"腰围",
"values":[
"88"
]
},
"胸围":{
"name":"胸围",
"values":[
"28"
]
},
"臀围":{
"name":"臀围",
"values":[
"98"
]
},
"袖长":{
"name":"袖长",
"values":[
"108"
]
}
},
"value":"S"
}
],
"code":"", "image":"http://s3.mogucdn.com/mlcdn/c45406/180417_3e18eba074kh6425h37fijkk1k6ja_720x720.jpg",
"price":0.01,
"size":"S",
"stock":1000,
"style":"黑色"
},
{
"attrs":[
{
"name":"颜色",
"props":{
},
"value":"白色"
},
{
"name":"尺码",
"props":{
"裙长":{
"name":"裙长",
"values":[
"88"
]
},
"肩宽":{
"name":"肩宽",
"values":[
"88"
]
},
"腰围":{
"name":"腰围",
"values":[
"88"
]
},
"胸围":{
"name":"胸围",
"values":[
"88"
]
},
"臀围":{
"name":"臀围",
"values":[
"88"
]
},
"袖长":{
"name":"袖长",
"values":[
"88"
]
}
},
"value":"S"
}
],
"code":"", "image":"http://s3.mogucdn.com/mlcdn/c45406/180417_3e18eba074kh6425h37fijkk1k6ja_720x720.jpg",
"price":0.01,
"size":"S",
"stock":1000,
"style":"白色"
},
{
"attrs":[
{
"name":"颜色",
"props":{
},
"value":"黑色"
},
{
"name":"尺码",
"props":{
"裙长":{
"name":"裙长",
"values":[
"78"
]
},
"肩宽":{
"name":"肩宽",
"values":[
"48"
]
},
"腰围":{
"name":"腰围",
"values":[
"88"
]
},
"胸围":{
"name":"胸围",
"values":[
"28"
]
},
"臀围":{
"name":"臀围",
"values":[
"98"
]
},
"袖长":{
"name":"袖长",
"values":[
"108"
]
}
},
"value":"M"
}
],
"code":"", "image":"http://s3.mogucdn.com/mlcdn/c45406/180417_3e18eba074kh6425h37fijkk1k6ja_720x720.jpg",
"price":0.01,
"size":"M",
"stock":1000,
"style":"黑色"
}
],
"title":"蘑菇街开放平台测试商品",
"threeStandardPic":["http://s3.mogucdn.com/mlcdn/c45406/180417_3e18eba074kh6425h37fijkk1k6ja_720x720.jpg"
]
}
1).{
"result": {
"data": "18kahta"
},
"status": {
"code": "0000000",
"msg": ""
}
}
1).{
"result":{
"data":{
}
},
"status":{
"code":"1100403",
"msg":"无权限访问该商品"
}
}