All Products
Search
Document Center

GetSubscriptionPrice

Last Updated: Oct 14, 2019

API Name

GetSubscriptionPrice

Overview

You can call this operation to query the subscription price of a specified product.Alibaba cloud have various products and complexe configuration parameter that will determin the price. You could use with other APIs to get the appropriate attributes:Process of query price using API

Request parameters

Name Type Required Description
ProductCode String Yes The code of the specified product. Find the code in Alibaba cloud product code list.
ProductType String No The type of the specified product.
SubscriptionType String Yes The type of subscription. Valid values: Subscription
OrderType String Yes The type of the specified order. Valid values: NewOrder: new order, Renewal: renewal order, Upgrade: upgrade order.
ServicePeriodQuantity Integer Yes The validity of the specified service.
ServicePeriodUnit String Yes The unit of the validity of the specified service. Valid values: Year: year, Month: month
Region String No The ID of the region that the specified instance is located in. Find the id with Common Region Id Reference
InstanceId String No The ID of the specified instance. This parameter is required in an upgrade order to obtain the earlier configurations before the upgrade.
ModuleList.n.Config String Yes The configuration of the nth ModuleList. Valid values of n: [1,50]. Format: “AA:aa,BB:bb”. AA and BB are the specified configCode of the ModuleList. aa and bb are the values of the specified configCode. Call the API DescribePricingModule to get the price module. You can check the pricing module samples in this document.
ModuleList.n.ModuleCode String Yes The specified moduleCode of the nth ModuleList.
ModuleList.n.ModuleStatus Integer No You need to specify the status value if the configuration of the ModuleList is changed in upgrading. The ModuleStatus indicate the status for the upgrade. Valid values: 1 - module added, 2 - module updated. Default value: 1.
ModuleList.n.Tag Integer No You need to specify the tag for some kind of product when upgrading. The tag will used to indicate some named resource. For example, the tag will be used to indicate the Disk to be upgraded with it’s Id

Response parameters

Name Type Required
OriginalPrice Double The list price of the specified product
DiscountPrice Double The discount of the specified product.
TradePrice Double The discounted price of the specified product. TradePrice is the actual price to pay. TradePrice = OriginalPrice - DiscountPrice
Currency String The currency used for payment. Valid values: CNY, USD, JPY
ModuleDetails ModuleDetail The pricing details of the ModuleList. For more information, see Data dictionary.
PromotionDetails PromotionDetail The details of the promotion. For more information, see Data dictionary.

Error codes

Error code Description HTTP status code Description
NotApplicable This API is not applicable for caller. 400 The error message returned when you are not authorized to use the API.
MissingParameter The specified parameter xx is mandatory for this request. 400 The error message returned when the xx parameter is not specified.
InvalidParameter The specified parameter xx is not valid. 400 The error message returned when the xx parameter is invalid.
InvalidModuleCode The specified moduleCode is not valid. 400 The error message returned when the specified moduleCode parameter is invalid.
InvalidConfigCode The specified configCode is not valid. 400 The error message returned when the specified configCode parameter is invalid.
InvalidOwner The specified owner doesn’t belong to caller. 400 The error message returned when the specified owner does not belong to the caller.
InvalidCaller The specified caller doesn’t exists. 400 The error message returned when the caller is invalid.
InternalError The request processing has failed due to some unknown error, exception or failure. 400 The error message returned when an unknown internal error occurs.
ProductNotFind Can not find inquired product, it may not exist. 400 The error message returned when the specified product is invalid.

Sample requests

  1. https://business.ap-southeast-1.aliyuncs.com/?Action=GetSubscriptionPrice
  2. &ModuleList. 1. ModuleCode=ExtBandwidth
  3. &ModuleList. 1. Config=ExtBandwidth%3A50
  4. &ModuleList. 2. ModuleCode=PackageCode
  5. &ModuleList. 2. Config=PackageCode3Aversion_1
  6. &OrderType=NewOrder
  7. &ProductCode=waf
  8. &Quantity=1
  9. &Region=cn
  10. &ServicePeriodQuantity=1
  11. &ServicePeriodUnit=Month
  12. &SubscriptionType=Subscription

Sample responses

  1. "Data": {
  2. "Quantity": 1,
  3. "DiscountPrice": 900,
  4. "ModuleDetails": {
  5. "ModuleDetail": [
  6. {
  7. "ModuleCode": "ExtBandwidth",
  8. "UnitPrice": 0,
  9. "CostAfterDiscount": 0,
  10. "OriginalCost": 800,
  11. "InvoiceDiscount": 800
  12. },
  13. {
  14. "ModuleCode": "PackageCode",
  15. "UnitPrice": 0,
  16. "CostAfterDiscount": 0,
  17. "OriginalCost": 100,
  18. "InvoiceDiscount": 100
  19. }
  20. ]
  21. },
  22. "PromotionDetails": {
  23. "PromotionDetail": [
  24. {
  25. "PromotionId": 1001199213,
  26. "PromotionName": "Internal settlement does not incur fees"
  27. }
  28. ]
  29. },
  30. "OriginalPrice": 900,
  31. "TradePrice": 0,
  32. "Currency": "CNY"

Data dictionary

ModuleDetailModuleDetail

Name Type Description
ModuleCode String The ModuleCode of the ModuleList.
UnitPrice Double The unit price of the specified product.
OriginalCost Double The price of the specified product.
InvoiceDiscount Double The discount of the specified product.
CostAfterDiscount Double The discounted price of the specified product.

PromotionDetailPromotionDetail

Name Type Description
PromotionName String The name of the specified promotion.
PromotionDesc Double The description of the specified promotion.
PromotionId Long The ID of the specified promotion.

Note: For ECS price, you could use in option the API DescribePrice to get the updated price and DescribeRenewalPrice to get the subscription renewal price.