Update 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 | Is it necessary to fill out | 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 |
sku_id | number | no | out_sku_id、sku_id Either way, |
out_sku_id | string | no | out_sku_id、sku_Id choose two |
thumb_img | string | no | sku small diagram |
sale_price | number | yes | Sale price, to be divided into units, not more than 10 million (10 million yuan) |
market_price | number | yes | Market price, to be divided into units, not exceeding 1 0000000 (10 million yuan) |
stock_A | number | yes | stock |
barcode | string | no | barcode |
sku_code | string | no | Product code, up to 20 characters |
sku_attrs | string | yes | Sales properties, each spu below the first sku sku_ATTR order determines the order of the SPU on the PC side of the listing page |
attr_key | string | yes | Attribute key (for attribute customization), up to 40 characters |
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
Be sure to use https://developers.weixin.qq.com/miniprogram/dev/framework/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/
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 | skuID |
data.update_time | string | Update time |
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 |
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/ (Refer to [Notes] in the documentation) |