# [Mini Program Live] Live product management interface

Name Function explaination
Goods added and submitted for review Call this interface to upload and arraigned the need for live product information, after the review of the product input [Mini Program live] product library
Withdrawal of product audit Call this interface, you can withdraw the live product arraignment application, the consumption of arraiment times do not return
Re-submission of Goods for Review Call this interface to initiate a retrial request for goods that have been withdrawn
Remove merchandise Call this interface, you can delete [Mini Program live] merchandise library, delete the live between the shelves of the merchandise will also be deleted synchronously, not restored
Update goods By calling this interface, you can update the product information. Only the price type and price can be updated for the approved products. The products under audit can not be updated. The unaudited products are allowed to update all fields. Just pass in fields that need to be updated
Get Product Status Call this interface to get information and audit status of goods
Get Product List Call this interface to get a list of items

# I. Introduction

Live product management interface is a Mini Program to provide developers live on the live product batch operation interface capabilities.

Developers can add, interrogate, delete and update products in bulk.

Interface only support to add through the interface of goods for operation, developers in the Mini Program management background to add goods, do not support through the operation interface.

The developer must save the [Product ID] and [Audit Order ID,] and if they are lost, the other relevant interfaces cannot be invoked.

# Second, the interface document

# 1. Addition of goods and arraignment

# Interface Dxplaination

Call this interface to upload and arraigned the need for live product information, after the review of the product input [Mini Program live] product library

Note: The developer must save the [Product ID] and [Audit Order ID,] if lost, you cannot call other related interfaces

# Call frequency

Call quota: 500/One day.

# Request method

POST

# Requested URL:

https://api.weixin.qq.com/wxaapi/broadcast/goods/addaccess_token=

# Sample request parameters: json

{    
    "goodsInfo": {              
         "coverImgUrl": "ZuYVNKk9sMP1X4m7FXdcDCKra251KDZTjS502UTV7gwalgLZXcrOhG6oNYX6c7AR",        
         "name": "TIT cup,"      
         "priceType":1,   
         "price":99.5,
         // "price2": 150.5, Required if price Type is 2 or 3
         "url":"pages/index/index"  
    }
}

# Request parameter meaning

parameter type Required Introductions
coverImgUrl String yes Fill in the mediaID (mediaIDs will be valid for 3 days after getting them)For the mediaID, please refer to the following documents: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/New_temporary_materials.htmlPicture rules: Picture size max. 300 pixels*300 pixels
name String yes Product name, maximum 14 Chinese characters, 1 Chinese character is equivalent to 2 characters
priceType Number yes Price type, 1: one price (only need to pass price, price 2 not pass) Price range (price field is left boundary, price 2 field is right border, price and price 2 must pass) 3: Display discount price (price field is original price, price 2 field is current price, Price and price 2 must pass)
price Number yes Number, keep up to two decimal places, unit unit
price2 Number no Number, keep up to two decimal places, unit unit
url String yes Product details page Mini Program path, path parameters exist url The value of the parameter requires a encode Process and fill in
thirdPartyAppid String no If the product is a third-party Mini Program, fill in the appid of the corresponding third-party appllet, and the product of its own Mini Program is "

# Return Examples Correctly

{  
    "goodsId": 51,
    "auditId": 525022786,
    "errcode": 0 
}

# Return Parameter Meaning

parameter Introductions
goodsId Goods ID
auditId Audit Single ID

# 2. Withdrawal of audit

# Interface Dxplaination

Call this interface, you can withdraw the live product arraignment application, the consumption of arraiment times do not return

# Call frequency

Call quota: 500/One day.

# Request method

POST

# Requested URL:

https://api.weixin.qq.com/wxaapi/broadcast/goods/resetauditaccess_token=

# Sample request parameters: json

{    
    "auditId": 525022184,
    "goodsId": 9
}

# Request parameter meaning

parameter type Required Introductions
goodsId Number yes Goods ID
auditId Number yes Audit Single ID

# Return Examples Correctly

{  
    "errcode": 0 
}

# 3. Resubmission for review

# Interface Dxplaination

Call this interface to initiate a retrial request for goods that have been withdrawn

# Call frequency

Call quota: 500/One day (500 limit shared with interface 1)

# Request method

POST

# Requested URL:

https://api.weixin.qq.com/wxaapi/broadcast/goods/auditaccess_token=

# Sample request parameters: json

{    
    "goodsId": 9
}

# Request parameter meaning

parameter type Required Introductions
goodsId Number yes Goods ID

# Return Examples Correctly

{  
    "errcode": 0,
    "auditId": 525022184
}

# Return Parameter Meaning

parameter Introductions
auditId Audit Single ID

# 4. Deletion of goods

# Interface Dxplaination

Call this interface, you can delete [Mini Program live] merchandise library, delete the live between the shelves of the merchandise will also be deleted synchronously, not restored

# Call frequency

Call quota: 1000 times/One day.

# Request method

POST

# Requested URL:

https://api.weixin.qq.com/wxaapi/broadcast/goods/deleteaccess_token=

# Sample request parameters: json

{    
    "goodsId": 9
}

# Request parameter meaning

parameter type Required Introductions
goodsId Number yes Goods ID

# Return parameters

{   
    "errcode": 0,   
}

# 5. Updating commodities

# Interface Dxplaination

By calling this interface, you can update the product information. Only the price type and price can be updated for the approved products. The products under audit can not be updated. The unaudited products are allowed to update all fields. Only the fields that need to be updated are passed in.

# Call frequency

Call quota: 1000 times/One day.

# Request method

POST

# Requested URL:

https://api.weixin.qq.com/wxaapi/broadcast/goods/updateaccess_token=

# Sample request parameters: json

{    

    "goodsInfo": {        
        // Pass in whatever field you need to update, goodsId Bihuan        
        "coverImgUrl": "ZuYVNKk9sMP1X4m7FXdcDCKra251KDZTjS502UTV7gwalgLZXcrOhG6oNYX6c7AR",        
        "name": "TIT cup,"        
        "priceType":1,
        "price":99.5,
        // "price2": 150.5, Required if price Type is 2 or 3
        "url": "pages/index/index",       
        "goodsId": 9     
    }
}

# Request parameter meaning

parameter type Required Introductions
coverImgUrl String yes Fill in the mediaID (mediaIDs will be valid for 3 days after getting them)For the mediaID, please refer to the following documents: https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/New_temporary_materials.htmlPicture rules: Picture size max. 300 pixels*300 pixels
name String yes Product name, maximum 14 Chinese characters, 1 Chinese character is equivalent to 2 characters
priceType Number yes Price type, 1: one price (only need to pass price, price 2 not pass) Price range (price field is left boundary, price 2 field is right border, price and price 2 must pass) 3: Display discount price (price field is original price, price 2 field is current price, Price and price 2 must pass)
price Number yes Number, keep up to two decimal places, unit unit
price2 Number no Number, keep up to two decimal places, unit unit
url String yes Product details page Mini Program path, path parameters exist url The value of the parameter requires a encode Process and fill in
goodsId Number yes Goods ID
thirdPartyAppid String no If the product is a third-party Mini Program, fill in the appid of the corresponding third-party appllet, and the product of its own Mini Program is "

# Return parameters

{   
    "errcode": 0,   
}

# 6. Access to Goods Status

# Interface Dxplaination

Call this interface to get information and audit status of goods

# Call frequency

Call quota: 1000 times/One day.

# Request method

POST

# Requested URL:

https://api.weixin.qq.com/wxa/business/getgoodswarehouseaccess_token=

# Sample request parameters: json

{
    "goods_ids": [1] //Up to 20 product status at a time
}

# Request parameter meaning

parameter type Required Introductions
goods_ids Array yes Goods ID

# Return parameters

{
    "errcode":0,
    "errmsg":"ok",
    "goods":
        [
            {
                "goods_id":9,
                "cover_img_URL ":" xxxx ",
                "name":"xxxxx"
                "price":12300,
                'url': 'xxxxxxx';
                "price_type":1,
                "price2":0,
                "audit_status":1,
                "third_party_tag":0
            }
        ],
    "total":0
}

# Return Parameter Meaning

parameter Introductions
goods_id Goods ID
name Product Name
cover_img_url Product Image URL
url Mini Program path for product detail page
priceType 1: a price, this time read the price field 2: Price range, where the price field is the left boundary and the price 2 field the right boundary 3: discount price, the price field is the original price, price 2 field for the current price
price Price left range, unit "yuan"
price2 Price right range, unit "yuan"
audit_status 0: Unaudited, 1: In Audit, 2: Approved, 3 Failed
third_party_day 1, 2: denotes as API Add an item, otherwise an item added by the live console
thirdPartyAppid For a third - party Mini Program, the appid for the corresponding Mini Program and its own Mini Program are "
total Number of items

# Get a list of products

# Interface Dxplaination

Call this interface to get a list of items

# Call frequency

Call quota: 10000 times/One day.

# Request method

GET

# Requested URL:

https://api.weixin.qq.com/wxaapi/broadcast/goods/getapprovedaccess_token=[access_token]

# URL query parameter

parameter type Required Introductions
offset Number yes Number of paging bars starting point
limit Number no Page size, default 30, not more than 100
status Number yes Product Status, 0: Unaudited. 1: Under review, 2: Approved, 3: Rejected

# Return parameters

{
    "errcode":0,
    "total":68,
    "goods":
        [
            {
                "goodsId":9,
                "coverImgUrl":"xxxx",
                "name":"xxxxx"
                "price":12300,
                'url': 'xxxxxxx';
                "priceType":1,
                "price2":0,
                "thirdPartyTag":0
            }
        ]
}

# Return Parameter Meaning

parameter Introductions
total Number of commodities
goodsId Goods ID
coverImgUrl Product Image Links
name Product Name
price Price left range, unit "yuan"
price2 Price right range, unit "yuan"
url Product Mini Program path
priceType 1: a price, this time read the price field 2: Price range, where the price field is the left boundary and the price 2 field the right boundary 3: discount price, the price field is the original price, price 2 field for the current price
thirdPartyTag 1, 2: denotes as API Add an item, otherwise an item added by the live console
thirdPartyAppid For a third - party Mini Program, the appid for the corresponding Mini Program and its own Mini Program are "

# Appendix: Error codes

-1: System error

1003: product id does not exist

47001: Entry format does not comply with specifications

200002: Input error

300001: Prohibition to create/Update product (e.g. product creation is blocked)

300002: Name length not in line with rules

300003: The price input is not compliant (e.g. the current price is bigger than the original price, the incoming price is not a number, etc.)

300004: There are illegal contents in the name of the product

300005: There are illegal content in product pictures

300006: Image upload failed (e.g. mediaID expired)

300007: The link does not exist in the online Mini Program version

300008: Failed to add merchandise

300009: Goods review withdrawal failed

300010: Product audit status is not correct (e.g. product audit)

300011: Illegal operation (API does not allow manipulation of non-API created goods)

300012: No quota for arraignment (500 per day)

300013: Arraignment fails

300014: Audit, unable to delete (non-zero means failure)

300017: Goods not arraigned

300018: Product image size is too large

300021: Product addition success, audit failure