# Bulk access to SKU information

# Dxplaination of Interface Call Request

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

# Example of request parameters

{
    "product_id": 23423523452345235,
    "need_edit_sku": 1,     //	默认0:获取线上数据, 1:获取草稿数据
    "need_real_stock": 1    // 默认0:获取草稿库存, 1:获取线上真实库存
}

# Examples of back-up

{
    "errcode": 0,
    "errmsg":"ok",
    "skus":
    [
      {
         "product_id": 23423523452345235,
         "out_product_id": "1234566",
         "out_sku_id": "1024",
         "sku_id": 2352525,
         "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
product_id number yes Small shop internal product ID
need_real_stock number no Default 0: Get draft inventory, 1: Get real inventory online
need_edit_sku 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
skus[].product_id number Small shop internal product ID
skus[].out_product_id string Merchant Custom Item ID
skus[].sku_id number Small shop internal skuID
skus[].out_sku_id string The merchant defines the skuID, the character string
skus[].thumb_img string SCU diagram
skus[].sale_price number Sell prices divided into units
skus[].market_price number The market price is divided into units
skus[].stock_num number stock
skus[].barcode string barcode
skus[].sku_code string Product Codes
skus[].status number sku state
skus[].sku_attrs[].attr_key string Property key (for property customization)
skus[].sku_attrs[].attr_value string Attribute values (for attribute customization)

# Enumeration - status

枚举值 describe
0 Not on the shelves.
5 It's on the shelves.
21 False deletion

# Return code

返回码 Error Type
-1 System exceptions
-2 Token too long
9401020 The parameter is incorrect.
9401006 SKU does not exist
9401005 SKU already exists
9401025 SKU does not allow editing