# Query the list of available SKUs

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

getConvertibleSkus

# Functional description

  • After the service provider purchases goods, it can query the list of SKUs that can be allocated through the purchased resource package.

# Calling mode

# HTTPS call


GET https://api.weixin.qq.com/wxa/charge/service-provider/package/get_convertible_SKUs?access_token=ACCESS_TOKEN 

# Request parameters

attribute type Required Introductions
access_Token string yes Interface invokes the certificate, which is URL Parameters, non Body Parameters. access_Token is available throughgetAccessTokenInterface is obtained.
spSpuId string yes Wholesale goods purchased by service providers SPU ID
spSkuId string yes Wholesale goods purchased by service providers SKU ID

# Return parameters

attribute type Introductions
errcode number Error code
errmsg string Error message
skuList array List of SKUs

# SKU

attribute type Introductions
spuId string Distributable Mini Program Product SPU ID
skuId string Distributable Mini Program product SKU ID
skuName string Distributable Mini Program Product SKU Name
bizId number Distributable Mini Program Product Business ID
finalPrice string SKU Price (unit: cents, 64 digits)
attr object SKU Properties
attr.duration number Duration (in seconds)

# Call Example

Example Dxplaination: HTTPS calls

# Sample Request Data

GET https://api.weixin.qq.com/wxa/charge/service-provider/package/get_convertible_SKUs?access_token=ACCESS_TOKEN&spSpuId=10000001&spSkuId=20000101

# Return Data Example


{
  "errcode": 0,
  "skuList": [
    {
      "skuId": "20000000",
      "spuId": "10000000",
      "skuName": sku name",
      "bizId": 100000,
      "attr": {
        "duration": "31536000",
        "granularity": 99,
        "proportion": {
          "quota": {
            "quota": 初始值
          }
        },
        "durationType": 1
      },
      "finalPrice": "0"
    },
    {
      "skuId": "20000001",
      "spuId": "10000000",
      "skuName": sku name2",
      "bizId": 100000,
      "attr": {
        "duration": "31536000",
        "granularity": 99,
        "proportion": {
          "quota": {
            "quota": "1000"
          }
        },
        "durationType": 1
      },
      "finalPrice": "1"
    }
  ]
}

# Error code

Error code Error code Solutions
10120002 Parameter error Check the parameters
10120405 Method not available Use the correct method to request against the document