Data dictionary

BaseError

Field

Data type

Required

Description

code

string

Yes

Error code. For more information, refer to the Result codes section of the specific SPI or API specification.

errorMsg

string

No

Error description.

BaseServiceResult

Field

Data type

Required

Description

showReactNativePage

boolean

No

Whether to show a React Native page. Valid values are:

  • true: Show a React Native page.
  • false: Remain inside the mini program.

moduleName

string

No

The name of the module that contains the React Native page to be opened. The value corresponds to the string that is specified in the AppRegistry.registerComponent method.

Specify this parameter when showReactNativePage is set to true.

jsMainModulePath

string

No

The name of the main module that contains the registerComponent call. For example, index.

Specify this parameter when showReactNativePage is set to true.

bundleURLPath

string

No

The name of the bundle that contains all the JavaScript code for the application to run. For example, index.ios.bundle and index.android.bundle.

Specify this parameter when showReactNativePage is set to true.

extendedInfo

Map<string, string>

No

An extended attribute that is used to provide additional information if necessary.

error

BaseError

No

Common error. Specify this parameter if the request fails.

BaseSuccess

Field

Data type

Required

Description

code

string

Yes

Success code. For more information, refer to the Result codes section of the specific API specification.

msg

string

No

Success message.

AppInfosResult

Name

Type

Description

Required

totalCount

Int

The quantity of the mini programs that match the specified query conditions.

M

appInfos

Array<AppInfo>

The list of the mini programs. An empty array is returned when the value of totalCount is 0.

Maximum size: 50 elements

M

AppInfo

Name

Type

Description

Required

identifier

String

The unique ID that is assigned by Mini Program Platform to identify a mini program.

Yes

name

String

The mini program name.

Yes

slogan

String

The mini program tagline.

Yes

iconURL

String

The URL of the mini program logo.

Yes

releaseVersion

String

The release version of a mini program, which follows the major.minor.patch.timestamp pattern. For example, "1.0.1.1653969582308".

Yes

categories

Array<AppCategory>

The categories that a mini program belongs to.

No

firstPublishTime

Long

The date and time of the first release of the mini program, which is in the timestamp format.

No

AppCategory

Name

Type

Description

Required

name

String

The name of the first-level category that a mini program belongs to.

Yes

identifier

String

The unique ID that is assigned by Mini Program Platform to identify the first-level mini program category.

Yes

category2

String

The name of the secondary category that a mini program belongs to.

No

categoryCode2

String

The unique ID that is assigned by Mini Program Platform to identify the secondary mini program category.

No

category3

String

The name of the tertiary category that a mini program belongs to.

No

categoryCode3

String

The unique ID that is assigned by Mini Program Platform to identify the tertiary mini program category.

No

CategoryInfo

Name

Type

Description

Required

category

String

The name of the first-level category that a mini program belongs to.

No

categoryId

String

The unique ID that is assigned by Mini Program Platform to identify the first-level mini program category.

No

category2

String

The name of the secondary category that a mini program belongs to.

No

categoryCode2

String

The unique ID that is assigned by Mini Program Platform to identify the secondary mini program category.

No

category3

String

The name of the tertiary category that a mini program belongs to.

No

categoryCode3

String

The unique ID that is assigned by Mini Program Platform to identify the tertiary mini program category.

No

FetchAppsByIdsRequest

Name

Type

Required

Description

appIdList

Array<String>

Yes

Specify a list of mini program IDs to determine the mini programs to query. You can get the mini program ID from the Mini Program Platform console.

category

String

No

The category that mini programs belong to. Specify this parameter with the unique category ID that is assigned by Mini Program Platform. You can get the category ID from the Mini Program Platform console.

FetchAppsRequest

Name

Type

Required

Description

queryStartIndex

Number

Yes

The starting index to query the mini program list. The index list is determined by the following specified sortDescriptor, ascending, and category parameters.

Default value: 0

querySize

Number

Yes

The quantity of the mini programs to be queried.

Default value: 0

sortDescriptor

String

No

The way mini programs are sorted. Valid values are:

  • APP_ID: Sort by the mini program IDs.
  • PUBLISH_TIME: Sort by the mini program release time.
  • APP_NAME: Sort by the mini program names.
  • APP_DESC: Sort by the mini program descriptions.
  • APP_CREATE_TIME(Default value): Sort by the mini program creation time.

ascending

Boolean

No

Whether to sort mini programs in ascending order. The order follows the utf8mb4_general_ci sorting rule. Valid values are:

  • true(Default value): Sort in ascending order.
  • false: Sort in descending order.

category

String

No

The category that mini programs belong to. Specify this parameter with the unique category ID that is assigned by Mini Program Platform. You can get the ID from the Mini Program Platform console.

FetchAppsResult

Name

Type

Description

Required

totalCount

Integer

The quantity of the mini programs that match the specified query conditions.

M

appInfoList

Array<FetchAppInfo>

The list of the mini programs. An empty array is returned when the value of totalCount is 0.

Maximum size: 50 elements

M

FetchAppInfo

Name

Type

Description

Required

developerVersion

String

The release version of a mini program, which follows the major.minor.patch pattern. For example, "1.0.1".

Yes

appId

String

The unique ID that is assigned by Mini Program Platform to identify a mini program.

Yes

appName

String

The mini program name.

Yes

deployVersion

String

The release version of a mini program, which follows the major.minor.patch.timestamp pattern. For example, "1.0.1.1653969582308".

Yes

appSlogan

String

The mini program tagline.

Yes

appDesc

String

The mini program description.

Yes

iconUrl

String

The URL of the mini program logo.

Yes

status

String

The mini program release status in your super app. Valid values are:

  • GRAY: The mini program is in a grayscale release.
  • ONLINE: The mini program is fully released and runs online.

Yes

packageSize

String

The mini program package size.

Yes

createTime

Int

The date and time when a mini program is created, which is in the timestamp format.

Yes

firstPublishTime

Int

The date and time of the first release of the mini program, which is in the timestamp format.

No

categoryInfos

Array<CategoryInfo>

The categories that a mini program belongs to.

No

MemberInfo

Note: If the strategy request parameter is set to localUserIdOnly, specify userId only. For other strategy values, it is recommended to specify optional parameters if they are available.

Field

Data type

Required

Description

userId

string

Yes

The unique ID that is assigned by the super app to identify a user.

avatar

string

No

The URL of the user's avatar.

extendedInfo

Map<string, any>

No

An extended attribute that is used to provide additional information if necessary. This parameter is specified in key-value pairs with the following valid key:

  • nickName: Optional String. The user's nickname.

MemberInfoFetchResult

MemberInfoFetchResult extends the BaseServiceResult data model and includes the following declared parameters:

Field

Data type

Required

Description

memberInfo

MemberInfo

No

The actual object that contains the user information.

MemberInfoScope

Field

Data type

Required

Description

appId

string

No

The unique ID that is assigned by Mini Program Platform to identify a mini program. This parameter is specified if the user information request is from mini programs.

scopes

Array<string>

No

The type of user information that is requested. The only valid value is auth_user, which indicates all available basic user information is requested. This is the default value.

extendInfo

Map<string, any>

No

An extended attribute that is used to provide additional information if necessary.

OAuthResult

OAuthResult extends the BaseServiceResult data model and includes the following declared parameters:

Field

Data type

Required

Description

authCode

string

Yes

The authorization code that is generated by the super app.

authErrorScopes

Map<string, string>

No

The authorization scopes that are failed to be granted. The parameter value is in the key-value format. The key is the scope and the value is a numeric error code that is specified in the Error codes section of OAuthService. For example, "auth_user":"1000".

Specify this parameter if any requested scopes are denied.

authSuccessScopes

Array<string>

No

The authorization scopes that are successfully granted. Specify this parameter if any requested scopes are granted.

OAuthScopeQueryResult

OAuthScopeQueryResult extends the BaseServiceResult data model and includes the following declared parameters:

Field

Data type

Required

Description

authorizedScopes

Array<string>

Yes

A list of scopes that the super app supports. The super app can implement and define the scopes to meet your specific requirements. However, it is recommended to follow the guidelines and implement the values that are stated in the Scopes section of OAuthService.

PaymentRequest

Field

Data type

Required

Description

type

PaymentType

Yes

The type of payment certificate. Valid values are:

  • orderId: A unique ID that identifies an order.
  • paymentId: A unique ID that identifies a payment.
  • cashierUrl: The URL of the cashier page.
  • orderStr: A string of complete payment parameters.

paymentString

string

Yes

The payment certificate, which corresponds to the value of the type parameter.

PaymentResult

PaymentResult extends the BaseServiceResult data model and includes the following declared parameters:

Field

Data type

Required

Description

resultCode

string

Yes

The result code for the payment request. Valid values are:

  • CODE_PENDING: The payment is pending. The underlying result code is 8000 (PAY_PENDING).
  • CODE_FAILURE: The payment has failed. The underlying result code is 4000 (PAY_FAILURE).
  • CODE_SUCCESS: The payment has succeeded. The underlying result code is 9000 (PAY_SUCCESS).
  • CODE_USER_CANCEL: The user cancels the payment. The underlying result code is 6001 (USER_CANCEL).

resultMessage

string

No

The result message for the payment request.

ScannerOption

Field

Data type

Required

Description

type

ScannerCodetype

Yes

The type of code that the mini program requests to scan. Valid values are:

  • qrCode: The mini program requests to scan a QR code. This is the default value.
  • barCode: The mini program requests to scan a barcode.

hideAlbum

boolean

Yes

Whether the mini program needs to display an album entry on the code scan page for users to read and scan from albums. Valid values are:

  • true: The mini program does not need to display an album entry.
  • false: The mini program needs to hide an album entry.

The value defaults to false.

extendedInfo

Map<string, any>

No

An extended attribute that is used to provide additional information if necessary.

ScannerResult

ScannerResult extends the BaseServiceResult data model and includes the following declared parameters:

Field

Data type

Required

Description

code

string

No

The scan result, which is a code string extracted from the QR code or barcode image. Specify this parameter if the scanning operation is successful. Return null if scan error happens.