Submitting a Cloud Service Package Order
Function
This API is used to submit a cloud service package order.
Calling Method
For details, see Calling APIs.
URI
POST /v2/orders/{order_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
order_id |
Yes |
String |
Order ID |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. For details, see Token-based Authentication. Constraints N/A Range The value can contain 1 to 32,768 characters. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
cloudServices |
No |
Array of cloudServicesRequestEntry objects |
Definition Cloud service resource package details Constraints N/A Range N/A Default Value N/A |
|
purchaseMode |
No |
Int |
Definition Purchase mode Constraints N/A Range N/A Default Value 1 |
|
tenantId |
No |
String |
Definition Tenant ID, which is the same as the value of projectid Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
chargingMode |
No |
Int |
Definition Billing mode. The prepaid mode is used by default. Constraints N/A Range N/A Default Value 0 |
|
paymentMode |
No |
Int |
Definition Payment method Constraints N/A Range N/A Default Value 0 |
|
periodNum |
No |
Int |
Definition Subscription duration. The subscription duration can be 1 to 9 months or 1 to 3 years (only integer months or years). This parameter is used together with periodType. Constraints N/A Range When periodType is set to 2, the value of this parameter can be an integer from 1 to 9. When periodType is set to 3, the value of this parameter can be an integer from 1 to 3. Default Value 1 |
|
periodType |
No |
Int |
Definition Subscription duration type, which can be monthly or yearly. Value 2 indicates monthly, and value 3 indicates yearly. Constraints N/A Range
Default Value 2 |
|
cloudServiceForm |
No |
Array of cloudServiceFormRequestEntry objects |
Definition Resource package type information, including the cloud service type, project ID, and order ID Constraints N/A Range N/A Default Value N/A |
|
isAutoRenew |
No |
Boolean |
Definition Whether automatic renewal is enabled Constraints N/A Range
Default Value 0 |
|
isTrial |
No |
Boolean |
Definition Whether the current subscription is in the trial period Constraints N/A Range
Default Value 0 |
|
cloudServiceType |
No |
String |
Definition Cloud service type Constraints N/A Range N/A Default Value hws.service.type.dis |
|
productInfos |
No |
Array of productInfosRequestEntry objects |
Definition Product information, including the cloud service type, product ID, and resource package name Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
cloudservicetype |
No |
String |
Definition Cloud service type Constraints N/A Range N/A Default Value hws.service.type.dis |
|
projectid |
No |
String |
Definition Project ID. For how to obtain it, see Obtaining a Project ID. Constraints N/A Range The value can contain 1 to 64 characters. Only letters and digits are allowed. Default Value N/A |
|
orderid |
No |
String |
Definition Order ID. Each order has a unique ID. Constraints N/A Range The value can contain 1 to 64 characters. Only letters and digits are allowed. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
productId |
No |
String |
Definition ID of the product to be purchased. Each product has a unique ID. Constraints N/A Range N/A Default Value N/A |
|
resourceSpecCode |
No |
String |
Definition Name of the resource package Constraints N/A Range N/A Default Value dis.general.partition.duration.pkg |
|
resourceType |
No |
String |
Definition Resource type Constraints N/A Range N/A Default Value hws.service.type.dis |
Response Parameters
Status code: 200
Success
None
Example Requests
POST https://{Endpoint}/v2/orders/{order_id}
{
"cloudServices" : {
"avalibleZoneId" : "",
"chargingMode" : 0,
"cloudServiceEndpoint" : "",
"cloudServiceForm" : {
"projectid" : "5d5916d21xxx46efbe7c2e93bd1xxxce",
"orderid" : "CS25110715xxx86MU",
"cloudServiceType" : "hws.service.type.dis"
},
"cloudServiceType" : "hws.service.type.dis",
"isAutoRenew" : 0,
"isTrial" : 0,
"paymentMode" : 0,
"periodNum" : 1,
"periodType" : 2,
"productInfos" : {
"cloudServiceType" : "hws.service.type.dis",
"productId" : "00301-261175-0--0",
"resourceSpecCode" : "dis.general.partition.duration.pkg",
"resourceType" : "hws.resource.type.dis"
},
"regionId" : "cn-north-x",
"subscriptionNum" : 1
},
"discountId" : "",
"purchaseMode" : 1,
"tenantId" : "5d5916d21xxx46efbe7c2e93bd1xxxce"
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Success |
Error Codes
See Error Codes.
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