# Access to goods

# Interface call request specification

Http request method: POST
https://api.weixin.qq.com/product/spu/get?access_Token = xxxxxxxxx

# Request Parameter Sample

{
    "product_id": 324545,
    "out_product_id": "51514515",
    "need_edit_spu": 1      // Default 0: Get online data, 1: Get draft data
}

# Return Package Example

{
    "errcode": 0,
    "errmsg":"ok",
    "data":
    {
        "spu": 
        {
            "title": " Nintendo Nintendo Switch China Line Endurance Enhanced Edition NS Home Gaming Console Portable handheld game consoles Red and blue host " ,
            "sub_title": "JD self-support more assured] [National Bank Switch, more secure warranty services, faster national bank server] a host three modes, game palm, anytime, anywhere, fun to play together." ,
            "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": "Gross weight of merchandise," 
                    "attr_value": "380g"
                },
                {
                    "attr_key": "Origin of goods,"
                    "attr_value": "Mainland China"
                }
            ],
            "model": China Line Endurance Enhanced Edition,
            "shopcat":
            [
                {
                    "shopcat_id": 1
                },
                {
                    "shopcat_id": 2
                }
            ],
            "skus":
            [
                {
                    "sku_id": 1001
                },
                {
                    "sku_id": 1002
                }
            ]
        }
    }
}

# Request Parameter Dxplaination

parameter type Is it necessary to fill out Introductions
out_product_id string no Merchant custom product ID, with product_Id choose two
product_id number no Mini Store internal product ID, with out_product_Id choose two
need_edit_spu number no Default 0: Get online data, 1: Get draft data

# Return parameter specification

parameter type Introductions
Errcode number Error code
errmsg string Error message
data.spu.product_id number Mini Store Internal Product ID
data.spu.out_product_id string Custom Product ID
data.spu.title string title
data.spu.sub_title string subheading
data.spu.head_img string array Master, Multiple, List, Max. 9, No more than 2MB each
data.spu.desc_info.imgs string array Product details, graphic(Currently only support pictures, up to 20 pictures, each not more than 2MB)
data.spu.brand_id number Businesses need to apply for a brand
data.spu.status number Product Online Status
data.spu.edit_status number Draft status of merchandise
data.spu.min_price number Minimum price of product SKU (unit: sub)
data.spu.cats[].cat_id number Merchants need to apply for Usable Categories first
data.spu.cats[].level number Merchants need to apply for Usable Categories first
data.spu.attrs[].attr_key string Attribute key (for attribute customization)
data.spu.attrs[].attr_value string Property values (for property customization)
data.spu.model string Commodity model
data.spu.shopcat[].shopcat_id number Classification ID, corresponding information through get_shop_cat Interface gets
data.spu.skus[].sku_id number skuID

# Enumerate - edit _status

Enumeration value describe
0 Initial value
1 Editing
2 Under review
3 Audit failure
4 Audit success

# Enumerate - status

Enumeration value describe
0 Initial value
5 Shelf
6 Recycling station
9 Logical deletion
11 Autonomous dismounting
12 Sell Chime Off the Shelf
13 Offending Shelf/Air Control System Off the Shelf

# Return code

Return code Type of error
-1 System exception
-2 Token is too long
9401020 Wrong parameter
9401021 Call the api without permission
9401002 SPU does not exist
9401001 SPU already exists
9401023 SPU does not allow editing