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

Creating a Customer (Old)

Function

This API is used to create a HUAWEI CLOUD account for a customer when the customer creates an account on your sales platform, and bind the customer account on the partner sales platform to the HUAWEI CLOUD account. In addition, the HUAWEI CLOUD account is bound to the partner account.

Note:

  • This API can be invoked only by the partner AK/SK or token.
  • HUAWEI CLOUD Customer Agreement and Privacy Statement must be displayed on the page for creating a customer on the partner sales platform.
  • This API is used to replace the partner token with the customer token to allow the partner to provide or query resources as a customer. Therefore, the partner must obtain the customer authorization before invoking this API.
  • Obtain the verification code using the API in Sending a Verification Code(Old) and then invoke this API if you enter the email address when creating a customer.
  • After a HUAWEI CLOUD account is created for a customer, SAML authentication is required if the customer wants to switch from the partner sales platform to the HUAWEI CLOUD official website. For details, see "SAML Authentication" in Web UI Mode.
  • If you do not enter the email address when creating a customer, the customer cannot receive any email notification from HUAWEI CLOUD. The customer needs to log in to the HUAWEI CLOUD to add the email address by itself.
  • When the API for creating a customer is invoked, HUAWEI CLOUD will synchronously create a HUAWEI CLOUD customer account and send the customer ID and account name to the partner platform. Then, HUAWEI CLOUD associates the customer with the partner asynchronously. To query the association result, you can invoke the API described in Querying Customers (Old).
  • The customer created using this API is a reseller customer for a partner.

    This API will be brought offline. For details about the API for creating a customer, see Creating a Customer.

URI

POST /v1.0/{partner_id}/partner/customer-mgr/customer

The following table describes the parameters.

Parameter

Mandatory

Maximum Length of Characters

Description

partner_id

Yes

A maximum of 64 characters

Partner ID (assigned by Huawei).

For details about how to obtain the partner ID, see How Do I Check the Partner ID?.

Request

Request Parameters

Parameter

Mandatory

Type

Maximum Length of Characters/Value Range

Description

domainName

No

String

A maximum of 32 characters

A minimum of 5 characters

HUAWEI CLOUD username of the customer.

If this parameter is left blank, the value is generated randomly.

The value cannot start with op_ or shadow_ and cannot contain only digits.

The verification length is 5 to 32 digits and the verification rules are ^([a-zA-Z_-]([a-zA-Z0-9_-])*)$.

email

No

String

A maximum of 64 characters

Email address.

The value must contain @.

verificationCode

No

String

A maximum of 10 characters

Verification code.

Invoke the API described in Sending a Verification Code(Old) to obtain the verification code.

If no email address is available, you do not need to enter the verification code.

domainArea

Yes

String

A maximum of 2 characters

Two-letter ID representing the country/region of the customer. The ID complies with the ISO 3166 standard.

Example: MX for Mexico

xAccountId

Yes

String

A maximum of 128 characters

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

xAccountType

Yes

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?

password

No

String

The value is a string of 6 to 32 characters.

The password must meet the following rules:

  • Contains at least two of the following character types: uppercase letters, lowercase letters, digits, and special characters.
  • Differs from the account name or the account name in reverse order.
  • Does not contain the email address.

If this parameter is left blank, the value is generated randomly.

isCloseMarketMs

No

String

A maximum of 10 characters

Whether to disable the marketing message sending function.

true: Disable this function.

false: Retain this function enabled (default).

Example Request

POST  https://bss-intl.myhuaweicloud.com/v1.0/{partner_id}/partner/customer-mgr/customer HTTP/1.1
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ

{
    "domainName":"xxxxxxx",
    "email":"xxxxxxx@xxxxxxx",
    "domainArea":"xx",
    "verificationCode":"xxxxxx",
    "xAccountId":"xxxxxxx",
    "xAccountType":"xxxxxxx"
}

Response

Response Parameters

Parameter

Type

Maximum Length of Characters

Description

error_code

String

A maximum of 16 characters

Error code. For details, see Status Codes. This parameter is returned only when a failure occurs.

error_msg

String

A maximum of 1024 characters

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

domainId

String

A maximum of 64 characters

Customer ID.

This parameter is returned only when the customer is successfully created or the customer fails to authorize rights for the partner (with the error code CBC.5025).

domainName

String

A maximum of 64 characters

HUAWEI CLOUD username of the customer.

  • If the request contains this parameter, the response must contain the same parameter value as the request.
  • If the request does not contain this parameter, the response contains a 32-bit character string randomly generated by the system.

This parameter is returned only when the customer is successfully created or the customer fails to authorize rights for the partner (with the error code CBC.5025).

Example Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time  

{
  "domainId":"xxxxxxx",
  "domainName":"xxxxxxx"
}

Status Codes

  • 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 Status Code

Error Code

Description

400

CBC.0100

Incorrect parameter.

Check whether the input parameters meet the requirements according to the request parameter descriptions.

401

CBC.0154

Invalid or expired token.

403

CBC.0151

Access denied.

500

CBC.0999

Other errors.

500

CBC.4007

Invalid email address.

500

CBC.4008

Invalid verification code.

500

CBC.4009

The verification code is available, but the number of verification failures is greater than 3.

500

CBC.4010

The verification code entered by the client is incorrect.

400

CBC.0101

Invalid parameter.

500

CBC.5012

The account name already exists.

500

CBC.5013

The email address already exists.

500

CBC.5015

Invalid account name.

500

CBC.5016

Invalid email address.

500

CBC.5018

Duplicate xAccountId.

500

CBC.5019

The number of customers exceeds the license limit.

500

CBC.5025

An exception occurred when the customer authorized rights to the partner.

500

CBC.7228

Invalid password.

500

CBC.7254

Currently, registration with HUAWEI CLOUD is not available for users in this country.

400

CBC.99000051

Customer creation failed because this mobile number or email address has been preregistered by Huawei.

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