Add SKU
Note: There are 2 copies of data for the item, draft and online
After calling the interface to add and modify product data, only the draft data affects it. It must be called onto the shelving interface and approved before the draft data covers the online data officially enters into force.
Dxplaination of Interface Call Request
Example of request parameters
Examples of back-up
Dxplaination of request parameters
参数 | type | Is it compulsory? | Introductions |
product_id | number | no | Mini Store internal product ID, and out_product_id two choice |
out_product_id | string | no | Choose between product_id and product_id |
out_sku_id | string | yes | Merchant custom sku_id, need to ensure their own single AppID unique, once added after the success of the field can not be modified, up to 32 characters |
thumb_img | string | no | SCU diagram |
sale_price | number | yes | Selling price, divided into units, not exceeding 1000000000 (10 million yuan) |
market_price | number | no | The market price, in units not exceeding 1000000000 ($10 million), must be greater thansale_price [ ] |
stock_num | number | yes | stock |
barcode | string | no | barcode |
sku_code | string | no | Product code, up to 20 characters |
sku_attrs[].attr_key | string | yes | Property key (for property customization), up to 40 characters |
sku_attrs[].attr_value | string | yes | Attribute value (attribute custom use), up to 40 characters, the same key can not be more than 100 different values. |
Be careful
- Picture-related parameters such as
thumb_img
Please Be sure to to use the https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent/API/register/uploadimg.html interface to upload images (parametersresp_type=1
),The returnedtemp_img_url
should be filled in here, where does not accept any external image url .Ifurl
has ever been converted (domain namestore.mp. video.tencent-cloud.com
, or url prefixed withmmbizurl.cn / p /
, or url prefixmmecimage.cn / p /
),Then it may be submitted directly. - Characters: 1 Chinese text / 1 English letter, each counts 1 character
Dxplaination of callback parameters
参数 | type | Introductions |
errcode | number | Error code |
errmsg | string | Error message |
data.sku_id | number | Trading component internal skuID |
data.create_time | string | Created time |
Return code
返回码 | Error Type |
-1 | System exceptions |
-2 | Token too long |
9401020 | The parameter is incorrect. |
9401006 | SKU does not exist |
9401005 | SKU already exists |
9401025 | SKU does not allow editing |
9401043 | SKU is overpriced |
9401044 | SKU trade codesku_code is too long |
9401045 | |
9401046 | SKU with too many key attributes |
9401047 | Sku attribute keyskus [].sku_attrs [].attr_key Too long character |
9401048 | Sku attribute valueskus [].sku_attrs [].attr_value Character too long |
9401050 | The image url is illegal: it is an empty character string, or the domain name is not store.mp. video.tencent-cloud.com , or URL prefix other thanmmbizurl.cn / p / , or url prefix notmmecimage.cn / p / (Please refer to the document's [Note] |
9401052 | Out_sku_id too long |
9401054 | Sku price is 0 |
9401055 | Sku sale pricesale_price greater than or equal to market pricemarket_price |