Partner CenterPartner Center

Compute
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Anti-DDoS
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Compass
Cloud Certificate Manager
Anti-DDoS Service
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB NoSQL
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
ServiceStage
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain Service
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
DevCloud
ProjectMan
CodeHub
CloudRelease
CloudPipeline
CloudBuild
CloudDeploy
Cloud Communications
Message & SMS
Cloud Ecosystem
Marketplace
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
enterprise-collaboration
Meeting
IoT
IoT
Intelligent EdgeFabric
DeveloperTools
SDK Developer Guide
API Request Signing Guide
Terraform
HCloud CLI
Updated at: Apr 27, 2022 GMT+08:00

Querying Customers

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.

URI

POST /v2/partners/sub-customers/query

Request

Request parameters

Parameter

Mandatory

Type

Value Range

Description

account_name

No

String

A maximum of 128 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.

customer

No

String

A maximum of 128 characters

Name used by customer for real-name authentication, which can be queried using fuzzy search.

offset

No

Integer

0 to maximum integer

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, there are 10 data records, and if you set limit to 10 and offset to 1, the second to the tenth data records are returned.

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.

association_type

No

String

A maximum of 2 characters

Association type.

  • 1: Referral
  • 3: indicates Reseller.

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.

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.

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"
}

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: indicates 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.
  • 3: Real-name authentication failed.

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: Yes

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
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"
    }
  ],
  "count": "1"
}

Returned Values

  • 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.5004

You do not have the operation permission to this customer.

401

CBC.0154

Invalid or expired token.

403

CBC.0151

Access denied.

500

CBC.0999

Other errors.

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel