WeChat product release


Product release

1475975700798399.png

#Submit for review/Unpublish product

After the product is successfully created, you can call this interface to apply for product release. Submit for review, and the product information will immediately enter the scan review system. Once the review is approved, the product will be released successfully.

Only products that have passed the review and are in the released state can be viewed by ordinary users by scanning the QR code. Products that have not been published or approved before can only be viewed by users in the whitelist.

Request example

HTTP请求方式:POST
https://api.weixin.qq.com/scan/product/modstatus?access_token=ACCESS_TOKEN
POST数据格式:JSON
POST数据例子:
{
 "keystandard": "ean13",
 "keystr": "6900873042720",
 "status":"on"
}

Request parameter description

ParameterIs it requiredDescription
access_tokenYesGlobal credentials of the official account, used for interface calls.
keystandard is the product coding standard.
keystr is the product code content.
status is to set the publishing status. on is to submit for review, and off is to cancel publishing.

Return example

The correct JSON return result is as follows:

{
 "errcode": 0,
 "errmsg": "ok"
}

Return parameter description

ParametersDescription
errcode0 means the call is successful, otherwise the relevant error code will be returned.
errmsgok means the call is successful, otherwise an error message will be returned.

Set tester whitelist

Testers in the whitelist can view product information that has not been published or approved.

Request example

HTTP请求方式:POST
https://api.weixin.qq.com/scan/testwhitelist/set?access_token=ACCESS_TOKEN
POST数据格式:JSON
POST数据例子:
{
 "openid":["o1Pj9jmZvwSyyyyyyBa4aULW2mA","o1Pj9jmZvxxxxxxxxxULW2mA"],
 "username":["afdvvf","abcd"]
}

Request parameter description

ParameterIs it requiredDescription
access_tokenYesGlobal credentials of the official account, used for interface calls.
openidNoOpenid list of testers.
usernameNoWeChat account list of testers.

注意:每次设置均被视为一次重置,而非增量设置。openid、微信号合计最多设置10个。

Return example

The correct JSON return result is as follows:

{
 "errcode":0,
 "errmsg":"ok"
}

Return parameter description

ParametersDescription
errcode0 means the call is successful, otherwise the relevant error code will be returned.
errmsgok means the call is successful, otherwise an error message will be returned.

Get the product QR code

By calling this interface, the merchant can obtain the QR code generated in WeChat format Product QR code is used to print on the packaging to identify the product.

Request example

HTTP请求方式:POST
https://api.weixin.qq.com/scan/product/getqrcode?access_token=ACCESS_TOKEN
POST数据格式:JSON
POST数据例子:
{
 "keystandard": "ean13",
 "keystr": "6900873042720",
 "extinfo": "test",
 "qrcode_size": 64
}

Request parameter description

ParameterIs it requiredDescription
access_tokenYesGlobal credentials of the official account, used for interface calls.
keystandard is the product coding standard.
keystr is the product code content.
extinfoNo is customized by the merchant. It is recommended to only use uppercase and lowercase letters, numbers and -_().*these 6 common characters.
qrcode_size is the size (integer) of the QR code. The value represents the number of pixels on the side. If not filled in, the default value is 100.

Note:

Merchant can generate multiple QR codes for the same product through extinfo for differentiation or source determination. For example, although a product has only one corresponding product ID, each individual product under the product can be assigned an extinfo parameter for identification. When a user opens the product homepage or clicks on a promotion link on the homepage, WeChat will transmit the extinfo parameters to the merchant, and the merchant can track the contact between each product and the user. For more product QR code capabilities, please see the "One Product, One Code Zone".

Return example

{
 "errcode":0,
 "errmsg":"ok",
 "pic_url":"http://mmbiz.qpic.cn/mmbiz/test/0",
 "qrcode_url":"http://p.url.cn/hA0P71b9MKc/123"
}

Return parameter description

##errcode0 means the call is successful, otherwise the relevant error code will be returned. errmsgok means the call is successful, otherwise an error message will be returned. pic_urlThe picture link of the product QR code can be downloaded directly to the local. qrcode_urlThe content of the product QR code is prefixed with http://p.url.cn/, plus three parts: pid and extinfo.
Parameters Description