Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying Customers

Updated on 2025-01-20 GMT+08:00

Function

This API is used to query your customers.

Visit Querying Customers to learn about how to query customers in Partner Center.

Constraints

This API can be invoked only by the partner AK/SK or token.

Debugging

You can debug the API in API Explorer which supports automatic authentication. API Explorer can automatically generate and debug example SDK code.

URI

POST /v2/partners/sub-customers/query

Request

Request parameters

Parameter

Mandatory

Type

Value Range

Description

account_name

No

String

A maximum of 64 characters

Account name. If the customer has created an IAM user, enter the account name of the master account. For details about the two concepts, see "Account" and "IAM User" in Basic Concepts.

Fuzzy search is supported. Only prefix, suffix, or middle part can be used for fuzzy search. The content you enter for fuzzy search cannot contain spaces.

If this parameter is not included in the request parameters, is set to "", or is set to null, it cannot be used as a filter criterion.

customer

No

String

A maximum of 64 characters

Name used by customer for real-name authentication, which can be queried using fuzzy search. Only prefix, suffix, or middle part can be used for fuzzy search. The content you enter for fuzzy search cannot contain spaces.

If this parameter is not included in the request parameters, is set to "", or is set to null, it cannot be used as a filter criterion.

offset

No

Integer

0 to 40,000,000

Offset, which starts from 0. The default value is 0.

NOTE:

This parameter is used for pagination. Retain its default value 0 if pagination is not required. offset indicates the offset relative to the first data record among all that meets the conditions configured. If you set offset to 1, the second and subsequent data records are returned.

For example, if there are 10 records that meet query conditions, when you set limit to 10 and offset to 1, the second to the tenth records are returned.

If there are 20 records that meet query conditions, when you set offset to 0 and limit to 10 for the first page and set offset to 10 and limit to 10 for the second page, then each page will respectively have 10 records.

limit

No

Integer

Maximum value: 100

Number of customers queried each time. The default value is 10.

label

No

String

A maximum of 64 characters

Tag. Fuzzy search is supported. Only prefix, suffix, or middle part can be used for fuzzy search. The content you enter for fuzzy search cannot contain spaces. The letters entered for search are case-sensitive.

If this parameter is not included in the request parameters, is set to "", or is set to null, it cannot be used as a filter criterion.

association_type

No

String

A maximum of 2 characters

Association type.

  • 1: Referral
  • 3: Reseller

If this parameter is not included in the request parameters, is set to "", or is set to null, it cannot be used as a filter criterion.

associated_on_begin

No

String

A maximum of 20 characters

Start time of the association time range (UTC time).

Value format: YYYY-MM-DD'T'hh:mm:ss'Z', for example, 2019-05-06T08:05:01Z.

If this parameter is not included in the request parameters or is set to null, it cannot be used as a filter criterion.

associated_on_end

No

String

A maximum of 20 characters

End time of the association time range (UTC time).

Value format: YYYY-MM-DD'T'hh:mm:ss'Z', for example, 2019-05-06T08:05:01Z.

If this parameter is not included in the request parameters or is set to null, it cannot be used as a filter criterion.

customer_id

No

String

A maximum of 64 characters

Customer account ID. You can call the API for Querying Customers to obtain the value of this parameter, or you can obtain the value of the domain ID from the response of the API for Creating a Customer.

If this parameter is not included in the request parameters, is set to "", or is set to null, it cannot be used as a filter criterion.

indirect_partner_id

No

String

A maximum of 64 characters

Reseller ID. For details about how to obtain the ID, see Querying the List of Huawei Cloud Resellers. This parameter is mandatory for querying the list of customers of a Huawei Cloud reseller.

Example Request

POST https://bss-intl.myhuaweicloud.com/v2/partners/sub-customers/query HTTP/1.1
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ
{
  "account_name": "betahc_kehu107",
  "customer": "sun***01",
  "offset": "0",
  "limit": "10",
  "label": "sunny",
  "association_type": "1",
  "associated_on_begin": "2019-05-06T08:05:01Z",
  "associated_on_end": "2019-05-06T08:05:01Z",
  "customer_id":"065024********e90f44c01cbccfa280",
  "indirect_partner_id": "si3fjg8ugf********"
}

Response

Response parameters

Parameter

Type

Value Range

Description

error_code

String

A maximum of 16 characters

Error code. This parameter is returned only when a failure occurs.

For details, see Returned Values.

error_msg

String

A maximum of 1024 characters

Error description. This parameter is returned only when a failure occurs.

customer_infos

List<CustomerInfo>

-

Customer list.

For details, see Table 1.

count

Integer

-

Total number of records.

Table 1 Customer information

Parameter

Type

Value Range

Description

customer

String

A maximum of 128 characters

Name that has passed the real-name authentication.

account_name

String

A maximum of 128 characters

Account name. If the customer has created an IAM user, the account name of the master account is returned.

customer_id

String

A maximum of 64 characters

Customer account ID.

associated_on

String

A maximum of 20 characters

Time when a customer is associated with a partner.

The value is UTC time in "yyyy-MM-dd 'T' HH:mm:ss 'Z'" format, such as 2019-05-06T08:05:01Z. HH ranges from 0 to 23, and mm and ss ranges from 0 to 59.

association_type

String

A maximum of 2 characters

Association type.

  • 1: Referral
  • 3: Reseller

label

String

A maximum of 64 characters

Tag.

telephone

String

A maximum of 20 characters

Customer phone number.

verified_status

String

A maximum of 5 characters

Real-name authentication status.

  • -1: The real name is not authenticated.
  • 0: Real-name authentication is under review.
  • 1: The real-name authentication is not passed.
  • 2: The real name is authenticated.

country_code

String

A maximum of 10 characters

Country code, which is the country code prefix of a phone number.

Example: 0086 for China

customer_type

Integer

-

Customer type.

  • -1: None
  • 0: Individual
  • 1: Enterprise

When a customer is registered, customerType is -1. The customer can set customerType in the account center or select the enterprise or individual real-name authentication to determine the customer type.

is_frozen

Integer

-

Whether to freeze the account.

  • 0: No
  • 1: Only account
  • 2: Account and resources

account_managers

List<AccountManager>

A maximum of 10 managers

Customer manager list. Only 1 account manager can be configured at present. For details, see Table 2.

xaccount_id

String

A maximum of 128 characters

Unique user ID on the partner sales platform. The ID is allocated by the partner.

xaccount_type

String

A maximum of 64 characters

Platform ID assigned by Huawei to a partner.

This value is assigned by Huawei. For details about how to obtain the platform ID, see How Do I Obtain the xaccountType Value?

customer_level

String

A maximum of 64 characters

Customer tier.

  • V0
  • V1
  • V2
  • V3
  • V4
  • V5

email

String

A maximum of 256 characters

Customer's email address.

Table 2 AccountManager

Parameter

Type

Value Range

Description

account_name

String

A maximum of 128 characters

Name of the account manager.

Example Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time
{
  "customer_infos": [
    {
      "customer": "sun***01",
      "account_name": "betahc_kehu107",
      "customer_id": "0b11fa********870f20c003f6a53940",
      "associated_on": "2021-01-05T06:35:51Z",
      "association_type": "1",
      "label": "sunny",
      "telephone": "134****6666",
      "verified_status": "2",
      "country_code": "0086",
      "customer_type": "0",
      "is_frozen": "0",
      "account_managers": [
        {
          "account_name": "tan_ma"
        }
      ],
       "xaccount_id": "98**9707",
       "xaccount_type": "***_IDP",
       "customer_level": "V0",
       "email":"***@163.com"
    }
  ],
  "count": "1"
}

Returned Values

NOTE:
  • 4xx: This class of HTTP status code is intended for situations in which the error seems to have been caused by the client, for example, the request contains bad syntax or incorrect parameters. You must ensure the request is correct.
  • 5xx: This class of HTTP status code is intended for cases in which the Huawei Cloud server is aware that it has encountered an error or is otherwise incapable of performing the request. In this case, contact Huawei Cloud customer service.

HTTP Value

Error Code

Description

400

CBC.0100

Parameter error.

400

CBC.99000037

You do not have the permission to operate this Huawei Cloud reseller.

401

CBC.0154

Invalid or expired token.

403

CBC.0151

Access denied.

500

CBC.0999

Other errors.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback