Create products on WeChat
Product creation
Get merchant information
Using this interface, merchants can obtain account numbers Information such as category and number segment below.
Request example
HTTP请求方式:GET https://api.weixin.qq.com/scan/merchantinfo/get?access_token=TOKEN
Request parameter description
Parameter | Is it required | Description |
---|---|---|
access_token | Yes | Global credentials of the official account, used for interface calls. |
Return example
The correct JSON return result is as follows:
{ "errcode": 0, "errmsg": "ok", "brand_tag_list":[ "小耿哥8", "testtag" ], "verified_list": [ { "verified_firm_code": 69300570, "verified_cate_list": [ { "verified_cate_id": 538071212, "verified_cate_name": "食品/茶叶/特产/滋补品" } ] }, { "verified_firm_code": 123, "verified_cate_list": [ { "verified_cate_id": 538071212, "verified_cate_name": "食品/茶叶/特产/滋补品" } ] } ] }
Return parameter description
Parameters | Description | ||
---|---|---|---|
0 means the call is successful, otherwise the relevant error code will be returned. | |||
ok means the call is successful, otherwise an error message will be returned. | |||
Brand tag list, passed in when creating a product, the brand identity field generated by the merchant's customization. | |||
Permission list includes the correspondence between merchant number, category ID, and category name. | |||
Merchant number segment, indicating the qualified barcode number segment under the merchant. | |||
Merchant category list, including category ID and corresponding category name. | |||
Merchant category ID, indicating the category ID that can be used to create merchants under this merchant | |||
Merchant category name, corresponding category ID name |
Parameter | Is it required | Description |
---|---|---|
access_token | Yes | Global credentials of the official account, used for interface calls. |
keystandard | is the | product coding standard, supporting ean13, ean8 and qrcode standards. |
keystr | is the | product code content. Directly fill in the product barcode, the standard is ean13, then directly fill in the product barcode, such as "6901939621608". The standard is QRcode. The content of the QR code can be customized by the merchant. It is recommended to use product barcodes, ≤20 characters, consisting of large and small letters, numbers, underscores and hyphens. Note: When the encoding standard is ean13, the encoding content must be under the merchant's number range, otherwise an error will be reported. |
base_info | is the basic information of the | product. |
detail_info | is the detailed description information of the | product. |
action_info | is the promotion service area information of | product. |
module_info | No | The component information of the product. |
base_info part
Parameter | Is it necessary | Description |
---|---|---|
title | Yes | It is recommended that the product name should not exceed 15 characters. The excess part will be displayed with ellipses on the client. |
thumb_url | is the | product thumbnail, the recommended size is 180px*180px, the size does not exceed 50k, supports jpg, png, gif, jpeg Format. |
brand_tag | is the | brand field, such as "Procter & Gamble Head & Shoulders", "P&G Rejoice". |
category_id | is the | product category ID, which is obtained through the "Get Merchant Information" interface. |
store_mgr_type | No | Whether the e-commerce channel for the product is displayed, the identification condition is the encoding content. auto means automatic, WeChat identifies the display channels; custom means customized, merchants can specify the channels in store_vendorid_list to appear. |
store_vendorid_list | No | E-commerce channel, if store_mgr_type is custom, you can choose from the following e-commerce channels: 2 is Amazon, 3 It is Dangdang.com, 4 is JD.com, 9 is Yihaodian, 11 is Jumei Youpin, 19 is Jiuxian.com |
color | No | Home page header background color. Set "auto" or leave it blank to automatically pick the color; it also supports customizing the background color by passing in a hexadecimal color code. For example, "FFFFFF" represents pure white. Note: The color code does not recognize upper and lower case, and there is no need to pass in "#" |
detail_info part
Parameter | Is it necessary | Description |
---|---|---|
banner_list | Yes | Multiple images can be set for graphic and text details on the product details page. |
link | is the picture with graphic details in the | product details page, 640px*320px, single ≤200k, supports jpg, png, gif, jpeg format, up to 6 photos can be uploaded. |
desc | No | Description of graphic and text details on the product details page, ≤80 Chinese characters. |
detail_list | is | Multiple sets of product attributes can be set on the product details page. |
title | is the product attribute name in the | product details page, ≤6 Chinese characters. |
desc | No | The product attribute content in the product details page must be ≤80 Chinese characters. |
action_info part
required? | Description | ||
---|---|---|---|
Yes | Multiple service columns can be set on the product homepage. | ||
is the type of | service bar, Media, video playback; Text, text introduction; Link, picture jump; Link, normal Link; User, official account; Card, WeChat coupon; Price, recommended retail price; Product, WeChat store; Store, e-commerce link; recommendation, product recommendation. |
Parameter | Is it required | Description |
---|---|---|
type | is the | service bar type, and the parameter value of the video type is "media". |
#link | is the video link corresponding to | . It only supports video content uploaded on v.qq.com. Please follow the JSON example for the format. . |
image | is the cover of the video corresponding to | , the recommended size is 690px*320px, the size does not exceed 200k, supports jpg, png, gif, jpeg Format. |
Type: text introduction
Parameter | Is it necessary | Example value | Description |
---|---|---|---|
type | is the | text | service bar type. |
name | No | Product introduction | The title corresponding to the text introduction. |
text | is | This can be used to briefly describe products or activities according to the needs of the brand owner. | corresponds to the content of the text introduction. |
Type: Image jump
Parameter | Is it required? | Description |
---|---|---|
type | is the | service bar type, and the parameter value of the image jump type is "link". |
#link | is the web link to the | corresponding image. |
image | is the image link corresponding to | . Please refer to the JSON example. |
showtype | is | value is banner, required when setting the service bar of image jump type. |
Type: Ordinary link
Parameter | Is it necessary | Example value | Description |
---|---|---|---|
type | is the | link | service bar type. |
name | is the name of the | View official website | link entrance, no more than 12 Chinese characters. |
#link | is the web link corresponding to | http://www.qq.com | after the jump. |
digest | No | Click to view the guide on the right side of the service bar, no more than 5 Chinese characters. |
Is it required | Example value | Description | |
---|---|---|---|
is the | user | service column type . |
Parameter | Is it necessary | Example value | Description |
---|---|---|---|
type | is the | card | service column type. |
cardid | is | pbLatjlZyVY2XCKfIDULuD_J_PKI | Card and coupon must be a non-custom code (see the WeChat card and coupon interface document for concept description ). |
digest | No | Common to all | The guide on the right side of the service column should not exceed 5 Chinese characters. |
Type: Suggested retail price
Parameter | Is it required | Example value | Description |
---|---|---|---|
type | is the | price | service column type. |
retail_price | is | 12.00 | represents the recommended retail price of the product, in "yuan". |
Type: WeChat store
Parameter | Is it necessary | Example value | Description |
---|---|---|---|
type | is the | product | service column type. |
name | is the name of the | official website mall | WeChat store entrance. |
productid | is the id of | pLHCTjvXB6vIqUYUn51AWsK-sKA8 | corresponding to the store product, which must be valid. |
digest | No | Limited time discount | The guide on the right side of the service bar should not exceed 5 Chinese characters. |
Type: E-commerce link
Parameter | Is it necessary | Example value | Description |
---|---|---|---|
type | is the | store | service column type. |
name | is the name of the | Jingdong Mall | e-commerce portal. |
link | is | http://m.jd.com/product/14091549.html | corresponding e-commerce The link is recommended to be a page where you can directly purchase the product. |
sale_price | is the price of | 12.50 | , in yuan. |
Type: Product recommendation
Parameter | Is it necessary | Description |
---|---|---|
type | Yes | Service column type, product recommendation value is recommendation. |
recommend_type | is the way | represents product recommendation. Currently, it only supports specified, and the value is appointed. |
recommend_list | is | indicating a list of products to be recommended |
keystandard | is | indicating the recommended product coding format. |
keystr | is the encoding content of | indicating the recommended product. |
JSON example of "Product Recommendation":
{ "type": "recommend", "recommend": { "recommend_type": "appointed", "recommend_list": [ { "keystandard": "ean13", "keystr": "6900000000001" }, { "keystandard": "ean13", "keystr": "6900873042720" } ] } }
module_info part
Parameter | Is it necessary | Description |
---|---|---|
module_list | No | Multiple components can be set up in the future, but currently only anti-counterfeiting components are supported. |
type | No | The type of component, currently only includes the anti-counterfeiting component anti_fake. |
native_show | No | When set to true, the anti-counterfeiting results are displayed using the pop-up page provided by WeChat, and the merchant only needs to call "Product Management" Some component message interfaces return product authenticity information. When set to false, there will be no anti-counterfeiting pop-up window effect. |
anti_fake_url | No | Anti-counterfeiting query link provided by the merchant, required when native_show is set to false. |
Note:
1. In the action_info part of the promotion service area, the rules for the number of entries are as follows:
1) Set at least one promotion type;
2) There are three promotion types: text introduction, official account and WeChat coupons. Each type can only be set up to 1 respectively;
3) Ordinary link, official account and WeChat coupons A maximum of 3 types can be set in total for the three types;
4) Image jump links and video playback can only be displayed in one of two choices;
2. There must be at least one price information on the product homepage, and the price There are four display channels:
1) Define the store_mgr_type and store_vendorid_list fields in base_info. If the product is sold on the set e-commerce channel, there will be a sales entrance displayed in the [Purchase Area]. For example: "Yanghe - Sky Blue 480ml" is sold on "Jingdong Mall". If Jingdong Mall is in the e-commerce channel list set for this product, the sales entrance of "Jingdong Mall" will appear.
2) Set the productid in the WeChat store (Product) type, and the WeChat store sales entrance for the corresponding product will appear in the purchase area.
3)在电商链接(Store)类型中设置目标地址链接(link),购买区将出现所配置的外部商城售卖入口。
4)在建议零售价(Price)类型中设置retail_price字段。如果商品没有设置前文所述的任何一种购买渠道,也会有该商品建议零售价展示。
Return example
The correct JSON return result is as follows:
{ "errcode": 0, "errmsg": "ok", "pid": "5g0B4A90aqc" }
Return parameter description
Parameters | Description |
---|---|
0 means the call is successful, otherwise the relevant error code will be returned. | |
ok means the call is successful, otherwise an error message will be returned. | |
The translated product ID will be directly incorporated into the QR code content returned by the "Get Product QR Code Interface". |