Help Center/ Workspace/ API Reference/ Workspace APIs/ Inquiry/ Querying the Price for Adding a Single Disk to Yearly/Monthly Desktop Pools in Batches
Updated on 2025-07-14 GMT+08:00

Querying the Price for Adding a Single Disk to Yearly/Monthly Desktop Pools in Batches

Function

Queries the price for adding a single disk to yearly/monthly desktop pools in batches.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

POST /v2/{project_id}/desktop-pool/periodic/inquiry/add-volume

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Content-Type

No

String

MIME type of the request body.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

desktop_pool_id

No

String

Desktop pool ID. If both desktop_pool_id and desktop_ids are set, the value of desktop_ids is used. The two parameters cannot be empty at the same time.

desktop_ids

No

Array of strings

IDs of yearly/monthly desktops. Common desktop IDs and pooled desktop IDs cannot coexist.

promotion_plan_id

No

String

Promotion plan ID.

volume_type

Yes

String

Type of the newly added disk.

volume_size

Yes

Integer

Size of the newly added disk.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

currency

String

Currency, for example, USD.

cloud_service_rating_results

Array of CloudServiceRatingResult objects

Price query result.

Table 5 CloudServiceRatingResult

Parameter

Type

Description

order_request_id

String

orderRequestId in the order request body.

official_website_rating_result

OfficialWebsiteRatingResult object

Result.

optional_discount_rating_results

Array of OptionalDiscountRatingResult objects

Discounted price query result.

Table 6 OfficialWebsiteRatingResult

Parameter

Type

Description

amount

Number

Total order amount, that is, the final order amount after discount (reserved instances include only the prepaid part).

official_website_amount

Number

List price (reserved instances include only the prepaid part).

original_amount

Number

Original total order amount, that is, the total order amount before discount (reserved instances include only the prepaid part).

official_website_discount_amount

Number

List price discount (reserved instances include only the prepaid part).

optional_discount_amount

Number

Discount available (reserved instances include only the prepaid part).

discount_amount

Number

Total discount (reserved instances include only the prepaid part).

per_amount

Number

Total installment amount, which is available only when the installment period types of the products for batch price query are the same.

per_discount_amount

Number

Discount of the total installment amount (perDiscountAmount = perOriginalAmountperAmount).

per_original_amount

Number

Original price of the total installment amount.

per_period_type

Integer

Installment period type. 2: monthly; 4: hourly.

measure_id

Integer

Measurement unit.

product_rating_results

Array of ProductResult objects

Product price query result.

Table 7 OptionalDiscountRatingResult

Parameter

Type

Description

discount_id

String

Discount ID.

amount

Number

Total order amount, that is, the final order amount after discount (reserved instances include only the prepaid part).

official_website_amount

Number

List price (reserved instances include only the prepaid part).

original_amount

Number

Original total order amount, that is, the total order amount before discount (reserved instances include only the prepaid part).

official_website_discount_amount

Number

List price discount (reserved instances include only the prepaid part).

optional_discount_amount

Number

Discount available (reserved instances include only the prepaid part).

discount_amount

Number

Total discount (reserved instances include only the prepaid part).

per_amount

Number

Total installment amount, which is available only when the installment period types of the products for batch price query are the same.

per_discount_amount

Number

Discount of the total installment amount (perDiscountAmount = perOriginalAmountperAmount).

per_original_amount

Number

Original price of the total installment amount.

per_official_website_amount

Number

List price of the total installment amount, which is available only when the installment period types of the products for batch price query are the same.

per_official_website_discount_amount

Number

List price discount of the total installment amount, which is available only when the installment period types of the products for batch price query are the same. perOfficialWebsiteDiscountAmount = perOriginalAmountperOfficialWebsiteAmount.

per_optional_discount_amount

Number

Available discount of the installment amount, including commercial discount, partner discount, promotion discount, and coupon discount. This parameter is available only when the installment period types of the products for batch price query are the same. perOptionalDiscountAmount = perOfficialWebsiteAmountperAmount.

per_period_type

Integer

Installment period type. 2: monthly; 4: hourly.

measure_id

Integer

Measurement unit.

discount_type

Integer

Discount type.

discount_name

String

Discount name.

best_offer

Integer

Whether the discount is the optimal discount. 0: no (default value). 1: yes. The optimal discount is selected from the commercial discount, partner discount, and promotion discount (if the discount amounts are the same, the priority is: commercial discount > partner discount > promotion discount). Coupon discounts are not included in the calculation of the optimal discount.

same_ratio_flag

Integer

sameRatioFlag.

discount_ratio

Number

Discount rate. A discount rate needs to be specified if sameRatioFlag is set to 1.

promotion_info

String

Basic discount information. After determining the discount, the API caller uses this parameter to fill in the field promotionInfo in the API for subscription or change.

product_rating_results

Array of ProductResult objects

Product price query result.

Table 8 ProductResult

Parameter

Type

Description

id

String

ID in the request body.

product_id

String

Product ID.

amount

Number

Total amount, that is, the final amount after discount (reserved instances include only the prepaid part).

discount_amount

Number

Discount (reserved instances include only the prepaid part).

original_amount

Number

Original total amount, that is, the total amount before discount (reserved instances include only the prepaid part).

official_website_amount

Number

List price (This field is not available for all APIs. Reserved instances include only the prepaid part.)

official_website_discount_amount

Number

List price discount (This field is not available for all APIs. Reserved instances include only the prepaid part.)

optional_discount_amount

Number

Available discount, including commercial discount, partner discount, promotion discount, and coupon discount. (This field is not available for all APIs. Reserved instances include only the prepaid part.)

per_amount

Number

Total installment amount, which is available only when the installment period types of the products for batch price query are the same.

per_discount_amount

Number

Discount of the total installment amount (perDiscountAmount = perOriginalAmountperAmount).

per_original_amount

Number

Original price of the total installment amount.

per_official_website_amount

Number

List price for the installment payment amount.

per_official_website_discount_amount

Number

List price discount of the installment amount, that is, perOfficialWebsiteDiscountAmount = perOriginalAmountperOfficialWebsiteAmount.

per_optional_discount_amount

Number

Available discount of the installment amount, including commercial discount, partner discount, promotion discount, and coupon discount. perOptionalDiscountAmount = perOfficialWebsiteAmountperAmount.

per_period_type

Integer

Installment period type. 2: monthly; 4: hourly.

measure_id

Integer

Measurement unit.

extend_params

String

Extended parameter.

Status code: 400

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

error_detail

String

Error details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 409

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

error_detail

String

Error details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 500

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

error_detail

String

Error details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Example Requests

{
  "desktop_pool_id" : "string",
  "desktop_ids" : [ "string" ],
  "promotion_plan_id" : "string",
  "volume_type" : "string",
  "volume_size" : 8200
}

Example Responses

Status code: 200

Response body for querying the price for yearly/monthly desktop pools in batches.

{
  "currency" : "string",
  "cloud_service_rating_results" : [ {
    "order_request_id" : "string",
    "official_website_rating_result" : {
      "amount" : 0,
      "official_website_amount" : 0,
      "original_amount" : 0,
      "official_website_discount_amount" : 0,
      "optional_discount_amount" : 0,
      "discount_amount" : 0,
      "per_amount" : 0,
      "per_discount_amount" : 0,
      "per_original_amount" : 0,
      "per_period_type" : 0,
      "measure_id" : 0,
      "product_rating_results" : [ {
        "id" : "string",
        "product_id" : "string",
        "amount" : 0,
        "discount_amount" : 0,
        "original_amount" : 0,
        "official_website_amount" : 0,
        "official_website_discount_amount" : 0,
        "optional_discount_amount" : 0,
        "per_amount" : 0,
        "per_discount_amount" : 0,
        "per_original_amount" : 0,
        "per_official_website_amount" : 0,
        "per_official_website_discount_amount" : 0,
        "per_optional_discount_amount" : 0,
        "per_period_type" : 0,
        "measure_id" : 0,
        "extend_params" : "string"
      } ]
    },
    "optional_discount_rating_results" : [ {
      "discount_id" : "string",
      "amount" : 0,
      "official_website_amount" : 0,
      "original_amount" : 0,
      "official_website_discount_amount" : 0,
      "optional_discount_amount" : 0,
      "discount_amount" : 0,
      "per_amount" : 0,
      "per_discount_amount" : 0,
      "per_original_amount" : 0,
      "per_official_website_amount" : 0,
      "per_official_website_discount_amount" : 0,
      "per_optional_discount_amount" : 0,
      "per_period_type" : 0,
      "measure_id" : 0,
      "discount_type" : 0,
      "discount_name" : "string",
      "best_offer" : 0,
      "same_ratio_flag" : 0,
      "discount_ratio" : 0,
      "promotion_info" : "string",
      "product_rating_results" : [ {
        "id" : "string",
        "product_id" : "string",
        "amount" : 0,
        "discount_amount" : 0,
        "original_amount" : 0,
        "official_website_amount" : 0,
        "official_website_discount_amount" : 0,
        "optional_discount_amount" : 0,
        "per_amount" : 0,
        "per_discount_amount" : 0,
        "per_original_amount" : 0,
        "per_official_website_amount" : 0,
        "per_official_website_discount_amount" : 0,
        "per_optional_discount_amount" : 0,
        "per_period_type" : 0,
        "measure_id" : 0,
        "extend_params" : "string"
      } ]
    } ]
  } ]
}

Status Codes

Status Code

Description

200

Response body for querying the price for yearly/monthly desktop pools in batches.

400

The request cannot be understood by the server due to malformed syntax.

409

Operation conflict.

500

Internal server error.

Error Codes

See Error Codes.