# Get a list of goods

# Dxplaination of Interface Call Request

Time rangecreates_timeandupdate_time]]when they exist at the same time, the range`create_time]]]] takes precedence

http请求方式:POST
https://api.weixin.qq.com/shop/spu/get_list?access_token=xxxxxxxxx

# Example of request parameters

{
    "status": 5,            // 选填,不填时获取所有状态商品
    "start_create_time": "2020-12-25 00:00:00",     // 选填,与end_create_time成对
    "end_create_time": "2020-12-26 00:00:00",       // 选填,与start_create_time成对
    "start_update_time": "2020-12-25 00:00:00",     // 选填,与end_update_time成对
    "end_update_time": "2020-12-26 00:00:00",       // 选填,与start_update_time成对
    "page": 1,
    "page_size": 10,        // 不超过100
    "need_edit_spu": 1      // 默认0:获取线上数据, 1:获取草稿数据
}

# Examples of back-up

{
    "errcode": 0,
    "errmsg":"ok",
    "total_num": 20,
    "spus":
    [
        {
            "out_product_id": "1234566",
            "title": "任天堂 Nintendo Switch 国行续航增强版 NS家用体感游戏机掌机 便携掌上游戏机 红蓝主机",
            "path": "pages/productDetail/productDetail?productId=2176180",
            "head_img": 
            [
                "http://img10.360buyimg.com/n1/s450x450_jfs/t1/85865/39/13611/488083/5e590a40E4bdf69c0/55c9bf645ea2b727.jpg"
            ],
            "desc_info": 
            {
                "desc": "xxxxx",
                "imgs": 
                [
                    "http://img10.360buyimg.com/n1/s450x450_jfs/t1/85865/39/13611/488083/5e590a40E4bdf69c0/55c9bf645ea2b727.jpg"
                ]
            },
            "audit_info": {
                "submit_time" :  "2021-03-09 15:14:08",
                "audit_time": "2021-03-09 15:16:08",
                "reject_reason": "不通过"
            },
            "third_cat_id": 6666,
            "brand_id": 2100000000,
            "info_version": "xxx",
            "create_time": "2020-12-25 00:00:00",
            "update_time": "2020-12-26 00:00:00",
            "skus":
            [
                {
                    "out_product_id": "1234566",
                    "out_sku_id": "1024",
                    "thumb_img": "http://img10.360buyimg.com/n1/s450x450_jfs/t1/100778/17/13648/424215/5e590a40E2d68e774/e171d222a0c9b763.jpg",
                    "sale_price": 1300,
                    "market_price": 1500,
                    "stock_num": 100,
                    "sku_code": "A24525252",
                    "barcode": "13251454",
                    "sku_attrs": 
                    [
                        {
                            "attr_key": "选择颜色",
                            "attr_value": "红蓝主机"
                        },
                        {
                            "attr_key": "选择套装",
                            "attr_value": "主机+保护套"
                        }
                    ]
                }
            ]
        },
        ...
    ]
}

# Dxplaination of request parameters

参数 type Is it compulsory? Introductions
status number yes Condition of product
start_create_time string no Start creating time
end_create_time string no End creation time
start_update_time string no Starting update time
end_update_time string no End update time
need_edit_spu number no Default 0: Get online data, 1: Get draft data
page number yes Page number
page_size number yes Page size

# Dxplaination of callback parameters

参数 type Introductions
errcode number Error code
errmsg string Error message
total_num number total
spus[] object array Spu array
spus[].product_id number(uint64) Trading Component Platform Internal Product ID
spus[].out_product_id string Merchant Custom Item ID
spus[].title string title
spus[].path string Bound Weixin Mini Program product path
spus[].head_img string array Main picture, multiple sheets, list
spus[].desc_info.desc string Product Details Graphic
spus[].desc_info.imgs string array Item Details Photo
spus[].audit_info object Product audit information may be empty
spus[].audit_info.submit_time string Last submitted, yyyy-MM-ddHH: mm: ss
spus[].audit_info.audit_time string Last audit time, yyyy-MM-dd HH: mm: ss
spus[].audit_info.reject_reason string Reasons for Refusal
spus[].status number Item Status Online
spus[].edit_status number Draft status of commodities
spus[].third_cat_id number Third-level category ID
spus[].brand_id number Brand id
spus[].create_time string Created time
spus[].update_time string Updated time
spus[].info_version string Reserve fields for version control
spus[].skus[] object array sku array
spus[].skus[].out_product_id string Merchant Custom Item ID
spus[].skus[].out_sku_id string Merchant custom skuID
spus[].skus[].thumb_img string SCU diagram
spus[].skus[].sale_price number Sell prices divided into units
spus[].skus[].market_price number Market prices divided into units
spus[].skus[].stock_num number stock
spus[].skus[].barcode string barcode
spus[].skus[].sku_code string Product Codes
spus[].skus[].sku_attrs[].attr_key string Sales attribute key (custom)
spus[].skus[].sku_attrs[].attr_value string Sales attribute value (custom)
scene_group_list enum array Product use scenarios

# 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.
11 Take it off the shelves on her own.
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