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.
- The password must contain at least eight characters, which will take effect as of August 1, 2022.
This API will be brought offline soon. 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 partner IDs, 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_-])*)$. If this parameter is not included in the request parameters, is set to "", or is set to null, the value is randomly generated. |
|
No |
String |
A maximum of 64 characters |
Email address. The value must contain @. If this parameter is not included in the request parameters or is set to null, no value is returned. If this parameter is set to "", "" is returned. |
verificationCode |
No |
String |
[1-10] |
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. If this parameter is not included in the request parameters or is set to null, this parameter will not be used. It cannot be set to "". |
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 can be a string of 8 to 32 characters. |
The password must meet the following rules:
If this parameter is left blank, the value is generated randomly. If this parameter is not included in the request parameters or is set to null, the password is randomly generated. This parameter cannot be set to "". |
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). If this parameter is not included in the request parameters, is set to "", or is set to null, false is returned. |
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 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.
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. |
400 |
CBC. 50010059 |
Customer association not allowed for Partner Service Provider. |
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. |
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. |
400 |
CBC.50010085 |
Customer association not allowed. The account of this partner has been restricted. |
400 |
CBC.50010086 |
Customer association not allowed. This partner is a Huawei Cloud reseller, and the account of its associated distributor has been restricted. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot