# 商品发布
接口地址: http://www.damaijia168.com/vv/external/publishsubmit
请求方式: POST
传参方式: JSON
返回格式: JSON
# 请求头参数
| 参数 | 类型 | 必选 | 值 | 示例 |
|---|---|---|---|---|
| Authorization | string | 是 | 授权 access_token | 1798c6aadec33d1bc2f5b707f1049aefexxxx |
# 请求参数
| 名称 | 类型 | 必须 | 示例值 | 描述 |
|---|---|---|---|---|
| shop_id | String | true | 店铺ID | |
| biz_type | String | false | taobao/1.0.0/brandAsyncRenderEnable | 业务扩展参数,需与平台约定好 |
| market | String | true | taobao | 商品发布的市场。taobao:淘宝,tmall:天猫,litetao:淘宝特价版 |
| cat_id | Number | true | 50021288 | 商品类目ID |
| spu_id | Number | false | 32323 | 产品ID,天猫市场(market=tmall)时必填 |
| barcode | String | false | 6932529211107 | 商品条码 |
| schema | String | true | <、itemSchema、><、/itemSchema、> | 商品schema信息,通过alibaba.item.publish.props.get获取并补全后提交 |
| edition | string | false | 1 | 版本 默认:1(不传默认为1) 1:1.0,2:2.0 |
# 请求示例
cat_id:50021288
market:taobao
schema:<itemSchema> <field id="catProp" name="类目属性" type="complex"> <complex-value> <field id="p-20000" name="品牌" type="singleCheck"> <value>1128204128</value> </field> </complex-value> <fields> <field id="p-20000" name="品牌" type="singleCheck"> </field> </fields> </field></itemSchema>
prop_id:20000
shop_id:123
price:1
# 请求代码示例
cURL请求代码示例
PHP请求代码示例
JAVA请求代码示例
Pyton请求代码示例
# 响应参数
| 参数 | 类型 | 描述 |
|---|---|---|
| data | object | 返回数据 |
| ----create_time | String | 商品创建时间 |
| ----item_id | Number | 商品ID |
| ----market | String | 商品所属市场 |
| ----deduct_money | int | 消耗点券 |
| status | int | 状态码,0为成功 |
# 返回数据
{
"data": {
"create_time":"2020-12-12 00:00:00",
"item_id":634830531619,
"market":"taobao",
"deduct_money": 4
},
"status": 0
}
# 错误码
| 状态码(status) | 错误信息 | 解决方案 |
|---|---|---|
| 132 | 请求格式必须为JSON | 修改请求参数格式为json |
| 422 | 参数列表不合法,在err中会给出提示 | 根据提示做相应修改 |
| 200 | 认证失败 | 请确保请求头里的Authorization存在或者未过期 |
| 2011 | 店铺未授权 | 使用授权店铺 |