May 18, 2021 WeChat Mini Program Development Document
Name | Description of the function |
---|---|
Items added and adrogated | Call this interface to upload and admiss the commodity information that needs to be broadcast live, after the approval of the commodity entry into the "small program live" commodity library |
Recall the product review | Call this interface, you can withdraw the live goods of the request for atrial, the number of times consumed is not returned |
Resubmit the product review | Calling this interface can re-initiate a request for atrial hearing for a commodity that has been withdrawn for questioning |
Delete the item | Call this interface, you can delete the "small program live" commodity library of goods, after deletion of the live broadcast between the shelves of the goods will also be deleted synchronously, not recoverable |
Update the product | Call this interface to update the commodity information, the approved goods only allow to update the price type and price, the approved items are not allowed to update, the unoly approved items are allowed to update all fields, only the fields that need to be updated |
Get the status of the product | Call this interface to get the product's information and audit status |
Get a list of items | Call this interface to get a list of items |
Live commodity management interface is the interface capability that small program live programs provide to developers to perform bulk operations on live products.
Developers can add, adage, delete, and update items in bulk.
The interface only supports the operation of goods added through the interface, the developer manages the goods added in the background in the small program, and does not support the operation through the interface.
Developers must save [Product ID] and [Audit Document ID], if lost, other related interfaces cannot be invoked.
Call this interface upload and review product information that require live broadcast, review the goods after passing the goods [small program live] Product library
Note: Developers must save [product ID] and [audit order ID], if lost, other related interfaces cannot be invoked
Call quota: 500 times / day
POST
https://api.weixin.qq.com/wxaapi/broadcast/goods/add?access_token=
{
"goodsInfo": {
"coverImgUrl": "ZuYVNKk9sMP1X4m7FXdcDCKra251KDZTjS502UTV7gwalgLZXcrOhG6oNYX6c7AR",
"name":"TIT茶杯",
"priceType":1,
"price":99.5,
// "price2": 150.5, priceType为2或3时必填
"url":"pages/index/index"
}
}
Parameters | Type | Required | Description |
---|---|---|---|
coverImgUrl | String | Is | Fill in media https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/New_temporary_materials.html ID (mediaID, valid for three days); |
name | String | Is | Product name, up to 14 Chinese characters, 1 Chinese character is equivalent to 2 characters |
priceType | Number | Is | Price type, 1: price (only pass in price, price2 does not pass) 2: price range (price field is left boundary, price2 field is right boundary, price and price2 must pass) 3: show discount price (price field is the original price, price2 field is present price, price and price2 must pass) |
price | Number | Is | Numbers, up to two digits of the number, units |
price2 | Number | Whether | Numbers, up to two digits of the number, units |
Url | String | Is | The small program path on the commodity details page, the path parameter exists url, the value of which needs to be processed encode and then filled in |
{
"goodsId": 51,
"auditId": 525022786,
"errcode": 0
}
Parameters | Description |
---|---|
goodsId | Merchandise ID |
auditId | The approval document ID |
Call this interface, you can withdraw the live goods of the request for atrial, the number of times consumed is not returned
Call limit: 500 times/day
POST
https://api.weixin.qq.com/wxaapi/broadcast/goods/resetaudit?access_token=
{
"auditId": 525022184,
"goodsId": 9
}
Parameters | Type | Required | Description |
---|---|---|---|
goodsId | Number | Is | Merchandise ID |
auditId | Number | Is | The approval document ID |
{
"errcode": 0
}
Calling this interface can re-initiate a request for atrial hearing for a commodity that has been withdrawn for questioning
Call limit: 500 times/day (500 times limit shared with interface 1)
POST
https://api.weixin.qq.com/wxaapi/broadcast/goods/audit?access_token=
{
"goodsId": 9
}
Parameters | Type | Required | Description |
---|---|---|---|
goodsId | Number | Is | Merchandise ID |
{
"errcode": 0,
"auditId": 525022184
}
Parameters | Description |
---|---|
auditId | The approval document ID |
Call this interface, you can delete the "small program live" commodity library of goods, after deletion of the live broadcast between the shelves of the goods will also be deleted synchronously, not recoverable;
Call quota: 1000 times / day
POST
https://api.weixin.qq.com/wxaapi/broadcast/goods/delete?access_token=
{
"goodsId": 9
}
Parameters | Type | Required | Description |
---|---|---|---|
goodsId | Number | Is | Merchandise ID |
{
"errcode": 0,
}
Call this interface to update the commodity information, the approved goods only allow to update the price type and price, the approved items are not allowed to update, the unoly approved items are allowed to update all fields, only the fields that need to be updated.
Call quota: 1000 times / day
POST
https://api.weixin.qq.com/wxaapi/broadcast/goods/update?access_token=
{
"goodsInfo": {
// 需要更新哪个字段就传入哪个字段,goodsId 必传
"coverImgUrl": "ZuYVNKk9sMP1X4m7FXdcDCKra251KDZTjS502UTV7gwalgLZXcrOhG6oNYX6c7AR",
"name":"TIT茶杯",
"priceType":1,
"price":99.5,
// "price2": 150.5, priceType为2或3时必填
"url": "pages/index/index",
"goodsId": 9
}
}
Parameters | Type | Required | Description |
---|---|---|---|
coverImgUrl | String | Is | Fill in media https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/New_temporary_materials.html ID (mediaID, valid for three days); |
name | String | Is | Product name, up to 14 Chinese characters, 1 Chinese character is equivalent to 2 characters |
priceType | Number | Is | Price type, 1: price (only pass in price, price2 does not pass) 2: price range (price field is left boundary, price2 field is right boundary, price and price2 must pass) 3: show discount price (price field is the original price, price2 field is present price, price and price2 must pass) |
price | Number | Is | Numbers, up to two digits of the number, units |
price2 | Number | Whether | Numbers, up to two digits of the number, units |
Url | String | Is | The small program path on the commodity details page, the path parameter exists url, the value of which needs to be processed encode and then filled in |
goodsId | Number | Is | Merchandise ID |
{
"errcode": 0,
}
Call this interface to get the product's information and audit status
Call quota: 1000 times / day
POST
https://api.weixin.qq.com/wxa/business/getgoodswarehouse?access_token=
{
"goods_ids": [1]
}
Parameters | Type | Required | Description |
---|---|---|---|
goods_ids | Array<Number> | Is | Merchandise ID |
{
"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
}
Parameters | Description |
---|---|
goods_id | Merchandise ID |
name | Product name |
cover_img_url | Product picture url |
Url | The small program path on the product details page |
priceType | 1: a price, at this time read the price field; 2 : Price range, at this time the price field is the left boundary, the price2 field is the right boundary; 3: Discount price, at this time price field is the original price, price2 field is the current price; |
price | Price left range, unit "yuan" |
price2 | Price right range, unit "yuan" |
audit_status | 0: Unodred, 1: Audited, 2: Approved, 3 Audit failed |
third_party_tag | 1, 2: Indicates that the item is added for the API, otherwise it is the item added to the live console |
total | The number of goods |
Call this interface to get a list of items
Call quota: 10,000 times / day
GET
https://api.weixin.qq.com/wxaapi/broadcast/goods/getapproved?access_token=[access_token]
Parameters | Type | Required | Description |
---|---|---|---|
offset | Number | Is | The starting point for the number of paged bars |
limit | Number | Whether | Peddle size, default 30, no more than 100 |
status | Number | Is | Product status, 0: Unodred. 1: In the audit, 2: the audit passed, 3: the audit was rejected |
{
"errcode":0,
"total":68,
"goods":
[
{
"goodsId":9,
"coverImgUrl":"xxxx",
"name":"xxxxx"
"price":12300,
"url":"xxxxxxx",
"priceType":1,
"price2":0,
"thirdPartyTag":0
}
]
}
Parameters | Description |
---|---|
total | The quantity of goods |
goodsId | Merchandise ID |
coverImgUrl | A link to a picture of the product |
name | Product name |
price | Price left range, unit "yuan" |
price2 | Price right range, unit "yuan" |
Url | The commodity program path |
priceType | 1: a price, at this time read the price field; 2 : Price range, at this time the price field is the left boundary, the price2 field is the right boundary; 3: Discount price, at this time price field is the original price, price2 field is the current price; |
thirdPartyTag | 1, 2: Indicates that the item is added for the API, otherwise it is the item added to the live console |
-1: System error
1003: The product id does not exist
47001: The entry format does not conform to the specification
200002: Entry error
300001: Do not create/update items (e.g. product creation is blocked)
300002: The name length does not conform to the rules
300003: Price input is not compliant (e.g. the current price is large than the original price, the incoming price is not a number, etc.)
300004: There is illegal content in the product name
300005: There is illegal content in the picture of the product
300006: Image upload failed (e.g. mediaID expired)
300007: The link does not exist in the online iterer version
300008: Failed to add items
300009: Product review recall failed
300010: The status of the product review is not correct (e.g. in the commodity review)
300011: Illegal operation (API does not allow operation of non-API-created items)
300012: No amount of ad litigate (500 a day)
300013: The trial failed
300014: Cannot be deleted during audit (non-zero for failure)
300017: Merchandise not tried
300021: The item was added successfully and the audit failed