UpdateSKU
Host: dip-cb.binanceapi.com
PATCH /mp-api/v1/apps/{appId}/skus/{skuId}
Header
Parameter | Required | Description |
---|---|---|
X-Mp-Open-Api-Token | Yes | JWT token. Please refer to Description of External Interface Signature Authentication Algorithm |
Path Parameters
Parameter | Description |
---|---|
appId | The AppId of the mini program |
skuId | The skuId of the SKU |
Body Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
categories | Array<String> | No | Category of this SKU. Refer to this list | ["Apparel", "Topup"] |
coverImageFileId | string | No | FileId for SKU cover image obtained via UploadFile | f7574adb-0ccb-4281-9ed6-943f11a1e85a |
names | {[key:string]: string} | No | Name map for this SKU. 'key' refers to the language code; 'en' is mandatory. | {"en": "pubg 100 point"} |
originalPrice | number | No | Price in USD. Please note, the amount after the cent will be trimmed e.g., 9.9999 will be treated as 9.99. | 9.99 |
sellingPrice | number | No | Selling price in USD. Any amount after the cent will also be trimmed e.g., 9.9999 will be treated as 9.99. | 6 |
discountPercentage | int | No | Discount percentage, can be between 0 and 100 inclusive. | 32 |
countryWhitelist | Array<String> | No | Countries eligible to display this SKU (using ISO3166-1 alpha-2 code). If empty, SKU can be displayed in all countries. | ["JP"] |
countryBlacklist | Array<String> | No | Countries restricted from displaying this SKU (using ISO3166-1 alpha-2 code). | ["CN", "GB"] |
path | string | Yes | Path that leads to this SKU. | /hello/world?foo=bar |
Note:
- All updates, except for
sellingPrice
anddiscountPercentage
, need audit approval. - Updating each field will overwrite its entire original value.
Request Body
{
"names": {
"en": "PUBG 100 points",
"zh-TW": "PUBG 100 點",
},
"countryWhitelist": ["JP"],
"countryBlacklist": ["CN", "TW"]
}
Response
HTTP 200 in JSON
{
"code": "000000",
"message": null,
"data": {},
"success": true
}
ErrorCode | Remark |
---|---|
000000 | Success |
900001 | Invalid Parameter |
900002 | JWT Authentication Failed |
900003 | Unexpected Error |
900004 | Invalid FileId |
900260 | Invalid SkuId |