Submitting Product Information for Review/Unpublishing Products

After a product is created, you can call this API to request publishing it, and then the product information will be forwarded to the scan review system. Once approved, the product will be published. Ordinary users can only scan to see the approved and published products. Whitelisted users can also see the unpublished products and those under review.

Request Example

HTTPRequest method: POST
https://api.weixin.qq.com/scan/product/modstatus?access_token=ACCESS_TOKEN
POST data format: JSON
POST data example:
{
 "keystandard": "ean13",
 "keystr": "6900873042720",
 "status":"on"
}

Request Parameters

Parameter Required Description
access_token Yes The global certificate of the Official Account, which can be used for the API call.
keystandard Yes Product coding standard
keystr Yes Product coding content
status Yes Sets the status. on: Submitted for review; off: Canceled.

Response Example

The response JSON packet for a successful request:

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

Response Parameters

Parameter Description
errcode 0: Success. Otherwise, relevant error code is returned.
errmsg Ok: Success. Otherwise, relevant error message is returned.

# Setting the Tester Whitelist

Testers on the white list can see the information of unpublished products and those under review.

Request Example

HTTPRequest method: POST
https://api.weixin.qq.com/scan/testwhitelist/set?access_token=ACCESS_TOKEN
POST data format: JSON
POST data example:
{
 "openid":["o1Pj9jmZvwSyyyyyyBa4aULW2mA","o1Pj9jmZvxxxxxxxxxULW2mA"],
 "username":["afdvvf","abcd"]
}

Request Parameters

Parameter Required Description
access_token Yes The global certificate of the Official Account, which can be used for the API call.
openid No List of testers' openids
username No List of testers' Weixin IDs

Note: Each setting is considered a reset, not an incremental change. A maximum of 10 openids and Weixin IDs can be set.

Response Example

The response JSON packet for a successful request:

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

Response Parameters

Parameter Description
errcode 0: Success. Otherwise, relevant error code is returned.
errmsg Ok: Success. Otherwise, relevant error message is returned.

# Getting Product QR Code

By calling this API, merchants can get products' Weixin QR code, which can be printed on packaging for identification.

Request Example

HTTPRequest method: POST
https://api.weixin.qq.com/scan/product/getqrcode?access_token=ACCESS_TOKEN
POST data format: JSON
POST data example:
{
 "keystandard": "ean13",
 "keystr": "6900873042720",
 "extinfo": "test",
 "qrcode_size": 64
}

Request Parameters

Parameter Required Description
access_token Yes The global certificate of the Official Account, which can be used for the API call.
keystandard Yes Product coding standard
keystr Yes Product coding content
extinfo No Merchant-defined parameter, which only supports uppercase and lowercase letters, numbers, "-", "_", "()", ".", "", and "*".
qrcode_size Yes The size of the QR Code (in integer, representing the number of pixels). If left empty, it defaults to 100.

Note:

Merchants can use extinfo to generate multiple QR codes for products of the same family to differentiate products from different sources. That is to say, you can only generate a product ID for products of the same family, but you can generate an extinfo for each product in this family. When a user opens a product page or taps the promotion URL in the page, Weixin will pass through the extinfo to the merchant so that they can track the interaction between the product and the user. For more information on the product QR code, see "Unique Item Code".

Response Example

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

Response Parameters

Parameter Description
errcode 0: Success. Otherwise, relevant error code is returned.
errmsg Ok: Success. Otherwise, relevant error message is returned.
pic_url The image link of the product QR code, via which the image can be downloaded locally.
qrcode_url The content of the product QR code, starting with http://p.url.cn/ and followed by pid and extinfo.