getMallInfoV2(data: GetMallInfoV2Params)

Requires:
@tuya-miniapp/cloud-api≥1.6.1

Description

Query mall information by bound object and service category, returning codes for mall, shop, site, and currency as base parameters for subsequent SKU queries, order creation, and payment.

Parameters

ParameterTypeRequiredDescription
YesRequest parameters

Return Value

Type: Promise<MallInfo>
Mall information, including mall, shop, site codes and currency

Referenced Types

interfaceMallInfoStore information
PropertyTypeDescription
mallCodestringMall code
shopCodestringShop code
siteCodestringSite code
currencystringCurrency
enumVasBindingObjectType
ValueActual ValueDescription
VasBindingObjectType.PID0PID
VasBindingObjectType.MINI_APP1Mini App
VasBindingObjectType.APP2APP

Valid Values

VasBindingObjectType
ValueDescriptionSince
0PID-
1Mini App-
2APP-

Examples

Request example

import { getMallInfoV2, VasBindingObjectType } from '@tuya-miniapp/cloud-api';

getMallInfoV2({
  catalogCode: 'your_catalog_code',
  bindingObjectType: VasBindingObjectType.MINI_APP,
  bindingObjectCode: 'your_mini_app_id',
})
  .then(mallInfo => {
    console.log('Mall info:', mallInfo);
  })
  .catch(error => {
    console.error('Failed to query mall info:', error);
  });

Response example

{
  "mallCode": "your_mall_code",
  "shopCode": "your_shop_code",
  "siteCode": "your_site_code",
  "currency": "CNY"
}