Update 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 |
sku_id | number | no | Out_sku_id, sku_id |
out_sku_id | string | no | Out_sku_id, sku_id |
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 | string | yes | The order of sku_attr of the first sku below each spu determines the order of the spu on the pc side of the product details page |
attr_key | string | yes | Property key (for property customization), up to 40 characters |
attr_value | string | yes | Attribute value (attribute custom), up to 40 characters, no more than 100 different values under the same key |
Be careful
- Picture-related parameters such as
thumb_img
Please use the https://developers.weixin.qq.com/miniprogram/dev/framework/ministore/minishopopencomponent/API/register/uploadimg.html interface to upload the image (parameterresp_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 | skuID |
data.update_time | string | Updated 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 |
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] |
9401054 | Sku price is 0 |
9401055 | Sku sale pricesale_price greater than or equal to market pricemarket_price |