# Get Product List

# Interface call request specification

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

# Request Parameter Sample

{
    "status": 5,
    "page": 1,
    "page_size": 10,
    "need_edit_spu": 1      // Default 0: Get online data, 1: Get draft data
}

# Return Package Example

{
    "errcode": 0,
    "errmsg":"ok",
    "total_in a": 1,
    "said":
    [
        {
            "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,
            "path": "plugin-private://wx34345ae5855f892d/pages/productDetail/productDetail?productId=12345",
            "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
status number yes Status of goods
page number yes Page number (1 minimum)
page_size number yes Number of pages(Not exceeding 1,000)
need_edit_spu number no Default 0: Get online data, 1: Get draft data
source number no Default 1: Mini Store Own, 2: AMS, 4: Alliance, 8: Referee Recommendation, 16: Lightning Purchase

# Return parameter specification

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