CreateSKUInAudit
Host: dip-cb.binanceapi.com
POST /mp-api/v1/apps/{appId}/skus
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 | AppId of the mini program |
Body Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
categories | string | Yes | Category of this SKU. | ["Apparel", "Topup"] |
coverImageFileId | string | Yes | FileId for SKU cover image obtained via UploadFile | f7574adb-0ccb-4281-9ed6-943f11a1e85a |
names | {[key:string]: string} | Yes | Name map for this SKU. 'key' is the language code; 'en' is required. Maximum length for each language name is 30. Accepted code can be found in the Language Code section | {"en": "PUBG 100 point"} |
skuId | string | Yes | ID for the SKU. Must be unique within your app. Maximum size is 255. | pubg_point_100 |
originalPrice | number | No | Unit is USD. Amount after cent will be trimmed without indication. E.g., 9.9999 will be treated as 9.99. | 9.99 |
sellingPrice | number | Yes | Unit is USD. Amount after cent will be trimmed. E.g., 9.9999 will be treated as 9.99. | 6 |
discountPercentage | int | No | 0~100 | 32 |
countryWhitelist | Array<String> | No | Countries eligible to display this SKU. Use ISO3166-1 alpha-2 code. If not provided, SKU can be displayed in all countries. | [JP] |
countryBlacklist | Array<String> | No | Countries that are restricted from displaying this SKU. Use ISO3166-1 alpha-2 code. | [CN, GB] |
path | string | Yes | Path that leads to this SKU. | /pages/index/index?foo=bar&baz=qux |
Request Body
{
"categories": ["Apparel", "Topup"],
"coverImageFileId": "f7574adb-0ccb-4281-9ed6-943f11a1e85a",
"names": {
"en": "PUBG 100 points",
"zh-TW": "PUBG 100 點",
},
"skuId": "pubg_point_100",
"originalPrice": 9.99,
"sellingPrice": 9,
"discountPercentage": 30,
"countryWhitelist": ["JP"],
"countryBlacklist": ["CN", "GB"],
"path": "/pages/index/index?foo=bar&baz=qux",
}
Response
HTTP 200
{
"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 |