# Add goods

After the new success will be directly submitted for review, can be through the product review callback, or through the get interface edit_Status See if the review is approved.

The product has 2 copies of data, draft and online data.

After the call interface adds or modifies the product data, only the draft data will be affected, after the examination and approval of draft data to cover online data, officially effective.

Note:

  1. third_cat_idPlease get it according to the Get Class interface and determine thequalification_typeCategory qualification is required, if required, then you must first adjust the category qualification audit interface for thethird_cat_idQualification Audit
  2. qualification_picsPlease click on the link to get the class interfacethird_cat_idofproduct_qualification_typeIf it is required, then the field needs to add the product quality picture
  3. If you need to upload a brand of goods, the need to open the corresponding brand access in accordance with the rules of WeChat Mini Store. WeChat Mini Store brand opening rules:Click to jumpIf no brand name can be specified No brand(No brandbrand_id: 2100000000)。
  4. Inventory fieldstock_ANote that if it is 0, you can not live in the video number on the shelf of the goods.
  5. Some special category titles need to be uploaded in accordance with the specifications, please read carefully to avoid the audit failed. Product title rules:Click to jump
  6. Product Details Fielddesc_info.desc desc_info.imgs Although not required, but some special categories still need to upload product details, please read carefully to avoid the audit failed. Product Details Rules:[Click to jump](https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent2/zujianyunyingguifan.html#% E 4% BA% 94% E 3%80%81% E 4% BA%A 4% E 6%98%93% E 7% BB% 84% E 4% BB%B 6% E 5%95%86% E 5%93%81% E 8% AF%A 6% E 6%83%85% E 8% A 7%84% E 5%88%99 )。
  7. Pictures need to use the picture upload interface in exchange for temporary links for upload, upload WeChat side will be turned into permanent links. Temporary links are permanently valid on the WeChat side, and businesses can store temporary links to avoid repeated exchange links. WeChat side component picture domain name,store.mp.video.tencent-cloud.com or mmbizurl.cn

# Interface call request specification

Http request method: POST
https://api.weixin.qq.com/shop/spu/add?access_token=xxxxxxxxx

# Request Parameter Sample

{
    "out_product_id": "1234566",
    "title": " Nintendo Nintendo Switch China Line Endurance Enhanced Edition NS Home Gaming Console Portable handheld game consoles Red and blue host ""path": "pages/productDetail/productDetail?productId=2176180",
    "head_img": 
    [
        " http://img10.360buyimg.com/n1/s450x450_jfs/t1/85865/39/13611/488083/5e590a40E4bdf69c0/55c9bf645ea2b727.jpg"
    ],
    "qualification_pics": [
        " 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"
        ]
    },
    "third_cat_id": 6666,
    "brand_id": 2100000000,
    "info_version": "xxx",
    "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_in a": 100,
            "sku_code": "A24525252",
            "barcode": "13251454",
            "sku_attrs": 
            [
                {
                    "attr_key": "Choose a color,"
                    "attr_value": "Red and blue host."
                },
                {
                    "attr_key": "Choose a suit,"
                    "attr_value": "Host + Protective Case"
                }
            ]
        }
    ]
}

# Return Package Example

{
    "errcode": 0,
    "errmsg":"ok",
    "data": 
    {
        "product_id": 23423523452345235,
        "out_product_id": "1234566",
        "create_time": "2020-03-25 12:05:25",
        "skus":
        [
            {
                "sku_id": 123,
                "out_sku_id": "1024"
            },
            ...
        ]
    }
}

# Request Parameter Dxplaination

parameter type Is it necessary to fill out Introductions
out_product_id string yes Custom Product ID
title string yes title
path string yes Bound Mini Program product path
head_img string array yes Main chart, multiple sheets, list
qualification_pics string array no Picture of the day
desc_info.desc string no Product Details
desc_info.imgs string array no Picture of the day
third_cat_id number yes Level 3 Category ID
brand_id number yes Brand id
info_version string no Reserved fields for version control
skus[] object array yes sku array
skus[].out_product_id string yes Custom Product ID
skus[].out_sku_id string yes Business custom skuID
skus[].thumb_img string yes sku small diagram
skus[].sale_price number yes Sale Price in Units
skus[].market_price number yes Market prices in units
skus[].stock_A number yes stock
skus[].barcode string no barcode
skus[].sku_code string no Product code
skus[].sku_attrs[].attr_key string yes Sales attribute key (custom)
skus[].sku_attrs[].attr_value string yes Sales attribute value (custom)
supplier string no Supplier name
express_fee number no Courier charges, divided into units
product_type string no Product attributes, such as: 1, pre-sale goods, 2, virtual electronic certificate goods, 3, custom
sell_time string no Timed shelf time
pick_up_type string array no Distribution mode 1 Express 2 City 3 Home delivery 4 p.m.
onsale number no 0 - Not on sale 1 - On sale
unitname string no Product unit
unitfactor number no Packaging factor

# Return parameter specification

parameter type Introductions
Errcode number Error code
errmsg string Error message
data.product_id number(uint64) Trading Component Internal Product ID
data.out_product_id string Custom Product ID
data.create_time string Create time
data.skus object array sku array
data.skus[].sku_id string Trading Component Platform Custom skuID
data.skus[].out_sku_id string Business custom skuID