# Get merchandise
# Dxplaination of Interface Call Request
http请求方式:POST
https://api.weixin.qq.com/product/spu/get?access_token=xxxxxxxxx
# Example of request parameters
{
"product_id": 324545,
"out_product_id": "51514515",
"need_edit_spu": 1 // 默认0:获取线上数据, 1:获取草稿数据
}
# Examples of back-up
{
"errcode": 0,
"errmsg":"ok",
"data":
{
"spu":
{
"title": "任天堂 Nintendo Switch 国行续航增强版 NS家用体感游戏机掌机 便携掌上游戏机 红蓝主机",
"sub_title": "JD自营更放心】【国行Switch,更安心的保修服务,更快的国行服务器】一台主机三种模式,游戏掌机,随时随地,一起趣玩。",
"head_img":
[
"http://img10.360buyimg.com/n1/s450x450_jfs/t1/85865/39/13611/488083/5e590a40E4bdf69c0/55c9bf645ea2b727.jpg"
],
"desc_info":
{
"imgs":
[
"http://img10.360buyimg.com/n1/s450x450_jfs/t1/85865/39/13611/488083/5e590a40E4bdf69c0/55c9bf645ea2b727.jpg"
]
},
"out_product_id": "1234566",
"product_id": 12345,
"brand_id": 2352,
"status": 5,
"edit_status": 2,
"min_price": 100,
"cats":
[
{
"cat_id": 1,
"level": 1
},
{
"cat_id": 2,
"level": 2
},
{
"cat_id": 3,
"level": 3
}
],
"attrs":
[
{
"attr_key": "商品毛重",
"attr_value": "380g"
},
{
"attr_key": "商品产地",
"attr_value": "中国大陆"
}
],
"model": "国行续航增强版",
"shopcat":
[
{
"shopcat_id": 1
},
{
"shopcat_id": 2
}
],
"skus":
[
{
"sku_id": 1001
},
{
"sku_id": 1002
}
]
}
}
}
# Dxplaination of request parameters
参数 | type | Is it compulsory? | Introductions |
---|---|---|---|
out_product_id | string | no | Choose between product_id and product_id |
product_id | number | no | Mini Store internal product ID, and out_product_id two choice |
need_edit_spu | number | no | Default 0: Get online data, 1: Get draft data |
# Dxplaination of callback parameters
参数 | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Error message |
data.spu.product_id | number | Small shop internal product ID |
data.spu.out_product_id | string | Merchant Custom Item ID |
data.spu.title | string | title |
data.spu.sub_title | string | subheading |
data.spu.head_img | string array | Master map, multiple, list, up to 9, each not exceeding 2 MB |
data.spu.desc_info.imgs | string array | Product details, pictures (currently only support pictures, up to 20, each not more than 2MB) |
data.spu.brand_id | number | Merchants need to apply for brands |
data.spu.status | number | Item Status Online |
data.spu.edit_status | number | Draft status of commodities |
data.spu.min_price | number | Minimum SKU price (unit: cent) |
data.spu.cats[].cat_id | number | Merchants need to apply for categories to use first |
data.spu.cats[].level | number | Merchants need to apply for categories to use first |
data.spu.attrs[].attr_key | string | Property key (for property customization) |
data.spu.attrs[].attr_value | string | Attribute values (for attribute customization) |
data.spu.model | string | Product Model |
data.spu.shopcat[].shopcat_id | number | Category ID, the corresponding information is obtained through the get_shop_cat interface |
data.spu.skus[].sku_id | number | skuID |
# Enumeration - edit_status
枚举值 | describe |
---|---|
0 | Initial value |
1 | In edit |
2 | Under review |
3 | The audit failed |
4 | The audit was successful. |
# Enumeration - status
枚举值 | describe |
---|---|
0 | Initial value |
5 | Get on the shelves. |
6 | Recycling Station |
9 | Logical deletion |
11 | Take it off the shelves on her own. |
12 | Sold off shelves |
13 | Violations removed / Risk control removed |
# Return code
返回码 | Error Type |
---|---|
-1 | System exceptions |
-2 | Token too long |
9401020 | The parameter is incorrect. |
9401021 | Call the api without permission |
9401002 | SPU does not exist |
9401001 | SPU already exists |
9401023 | SPU does not allow editing |