Add SKU
Note: Product has 2 copies of data, draft and online data
Call the interface to add and modify the product data, the impact is only draft data, to tune the interface and audit, draft data will cover online data officially effective
Interface call request specification
Request Parameter Sample
Return Package Example
Request Parameter Dxplaination
parameter | type | Required Required | Introductions |
product_id | number | no | Mini Store internal product ID, with out_product_Id choose two |
out_product_id | string | no | Merchant custom product ID, with product_Id choose two |
out_sku_id | string | yes | Business custom sku_Id, the need to ensure that the only single appid, once the success of the addition of the field can not be modified, up to 32 characters |
thumb_img | string | no | sku small diagram |
sale_price | number | yes | Sale price, divided into units, not exceeding 1000000000 (10 million yuan) |
market_price | number | yes | Market price, divided into units, not exceeding 10 million (10 million yuan) |
stock_A | number | yes | stock |
barcode | string | no | barcode |
sku_code | string | no | Product code, up to 20 characters |
sku_attrs[].attr_key | string | yes | Attribute key (for attribute customization), up to 40 characters |
sku_attrs[].attr_value | string | yes | Attribute values (for custom attributes), up to 40 characters, no more than 100 different values under the same key. |
Be careful
- Image - related parameters such as
thumb_img
), pleasemustUse https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent/API/register/uploadimg.html Interface to upload pictures (parametersor_type=1
And returns thetemp_img_url
Fill in here, here.Do not accept any external link image urlIfurl
Has done a conversion (domain name isstore.mp.video.tencent-cloud.com
Or the url prefix ismmbizurl.cn/p/
Or the url prefix ismmecimage.cn/p/
You can submit directly. - Character: 1 Chinese character/1 letter, each count as 1 character
Return parameter specification
parameter | type | Introductions |
Errcode | number | Error code |
errmsg | string | Error message |
data.sku_id | number | Transaction component internal skuID |
data.create_time | string | Time of creation |
Return code
Return code | Type of error |
-1 | System exception |
-2 | Token is too long |
9401020 | Wrong parameter |
9401006 | SKU does not exist |
9401005 | SKU already exists |
9401025 | SKU does not allow editing |
9401043 | SKU overpriced |
9401044 | SKU Product Codesku_code Too long |
9401045 | |
9401046 | Too many SKUs with key attributes |
9401047 | Key Property Keyskus[].sku_attrs[].attr_key Characters too long |
9401048 | Sku attribute valueskus[].sku_attrs[].attr_value Characters too long |
9401050 | Image url illegal: empty string, or domain name is notstore.mp.video.tencent-cloud.com Or the url prefix is notmmbizurl.cn/p/ Or the url prefix is notmmecimage.cn/p/ (Refer to [Notes] in the documentation) |
9401052 | out_sku_id Too long |