调用 DescribePrice 查询对应商品的价格信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribePrice |
系统规定参数。取值:DescribePrice。 |
OrderType | String | 是 | INSTANCE_BUY |
订单类型。取值: INSTANCE_BUY:商品购买 INSTANCE_RENEW:实例续费 INSTANCE_UPGRADE:实例升级 说明:对于续费类型的询价,需要在 Commodity 中传入 InstanceId。 |
Commodity | String | 是 | {"components":{"package_version":"yuncode12928000016"},"duration":1,"pricingCycle":"YEAR","productCode":"cmgj01**28","quantity":1,"skuCode":"prepay"} |
根据指定的 OrderType,使用对应的配件并序列化。 不同 OrderType 分别对应的 CommodityType 如下所示: INSTANCE_BUY:InstanceBuyCommodity INSTANCE_RENEW:InstanceRenewCommodity INSTANCE_UPGRADE:InstanceUpgradeCommodity 示例中的参数说明如下: productCode:商品 Code。 skuCode:商品规格 Code。非镜像商品:预付费固定为 prepay,后付费固定为 postpay;镜像商品:按量为ECS,包年包月为Package components:规格模块。其中版本 package_version 必传,其他模块根据商品的设置来传。 duration:周期数量 1,2,3...。 pricingCycle: 周期单位。Day(日),Month(月),Year(年)。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ExpressionCode | String | ORDER.NO_REAL_NAME_AUTHENTICATION |
限购编码 |
Cuxiao | Boolean | true |
是否有促销 |
DiscountPrice | Float | 178.20 |
优惠的价格(原价-实际价格),单位:元 |
Cycle | String | MONTH |
周期单位 DAY:日 MONTH:月 YEAR:年 |
TradePrice | Float | 19.80 |
实际价格,单位:元 |
OriginalPrice | Float | 198.00 |
原价,单位:元 |
Duration | Integer | 1 |
周期数, 1,2,3... |
Currency | String | CNY |
币种 CNY: 人民币 USD: 美元 JPY:日元 |
ExpressionMessage | String | 企业用户才能购买 |
限购描述 |
InfoTitle | String | 新年特惠 |
活动名称 |
ProductCode | String | cmgj01**** |
商品 Code |
PromotionRules | Array of PromotionRule |
优惠信息 |
|
PromotionRule | |||
Title | String | 展示型首年19.8元 |
优惠标题 |
Name | String | 展示型首年19.8元 |
优惠内容 |
RuleId | String | 102112 |
优惠ID |
Coupons | Array of Coupon |
优惠券信息 |
|
Coupon | |||
CouponOptionCode | String | ActiveCoupon |
优惠券类型 |
CouponOptionNo | String | 3874923111 |
优惠券编号 |
CouponName | String | 促销 |
优惠券名称 |
CouponDesc | String | 促销 |
优惠券描述 |
IsSelected | Boolean | false |
是否选中 |
CanPromFee | Float | 100.00 |
可优惠价格 |
示例
请求示例
https://market.aliyuncs.com/?Action=DescribePrice
&Commodity={"components":{"package_version":"yuncode12928000016"},"duration":1,"pricingCycle":"YEAR","productCode":"cmgj01**28","properties":{},"quantity":1,"skuCode":"prepay"}
&OrderType=INSTANCE_BUY
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribePriceResponse>
<Cuxiao>false</Cuxiao>
<Cycle>Month</Cycle>
<DiscountPrice>0</DiscountPrice>
<Duration>1</Duration>
<OriginalPrice>0</OriginalPrice>
<ProductCode>cmgj01****</ProductCode>
<TradePrice>0</TradePrice>
</DescribePriceResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"Coupons" : [ ],
"Cuxiao" : false,
"Cycle" : "Month",
"DiscountPrice" : 0.0,
"Duration" : 1,
"OriginalPrice" : 0.0,
"ProductCode" : "cmgj01****",
"PromotionRules" : [ ],
"TradePrice" : 0.0
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
999999 | IgnoreError | The specified parameter is invalid. | 参数错误 |
500 | UnknownError | An error occurred while processing your request. | 未知错误 |
501 | DownstreamError | An error occurred while processing your request. | 内部调用失败 |
502 | ReturnNull | No results found. | 没有返回结果 |
访问错误中心查看更多错误码。
访问错误中心查看更多错误码。