调用 DescribePrice 查询对应商品的价格信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribePrice |
系统规定参数。取值:DescribePrice。 |
Commodity | String | 是 | {"components":{"package_version":"yuncode12928000016"},"duration":1,"pricingCycle":"YEAR","productCode":"cmgj01**28","quantity":1,"skuCode":"prepay"} |
根据指定的 OrderType,使用对应的配件并序列化。 不同 OrderType 分别对应的 CommodityType 如下所示:
示例中的参数说明如下:
|
OrderType | String | 是 | INSTANCE_BUY |
订单类型。取值:
说明:对于续费类型的询价,需要在 Commodity 中传入 InstanceId。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ProductCode | String | cmgj01**** |
商品 Code |
OriginalPrice | Float | 198.0 |
原价 |
TradePrice | Float | 19.8 |
实际价格 |
DiscountPrice | Float | 178.2 |
优惠的价格(原价-实际价格) |
Cuxiao | Boolean | true |
是否有促销 |
Duration | Integer | 1 |
周期数, 1,2,3... |
Cycle | String | MONTH |
周期单位
|
InfoTitle | String | 新年特惠 |
活动名称 |
ExpressionCode | String | ORDER.NO_REAL_NAME_AUTHENTICATION |
限购编码 |
Currency | String | CNY |
币种
|
ExpressionMessage | String | 企业用户才能购买 |
限购描述 |
PromotionRules | Array |
优惠信息 |
|
RuleId | String | 102112 |
优惠 ID |
Name | String | 展示型首年19.8元 |
优惠内容 |
Title | String | 展示型首年19.8元 |
优惠标题 |
Coupons | Array |
优惠券信息 |
|
CouponOptionCode | String | ActiveCoupon |
优惠券类型 |
CouponOptionNo | String | 3874923111 |
优惠券编号 |
CouponName | String | 促销 |
优惠券名称 |
CouponDesc | String | 促销 |
优惠券描述 |
CanPromFee | Float | 100.00 |
可优惠的价格 |
IsSelected | Boolean | false |
是否选中 |
示例
请求示例
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
格式
<DescribePriceResponse>
<Cuxiao>false</Cuxiao>
<Cycle>Month</Cycle>
<DiscountPrice>0</DiscountPrice>
<Duration>1</Duration>
<OriginalPrice>0</OriginalPrice>
<ProductCode>cmgj01****</ProductCode>
<TradePrice>0</TradePrice>
</DescribePriceResponse>
JSON
格式
{
"Coupons": [],
"Cuxiao": false,
"Cycle": "Month",
"DiscountPrice": 0.0,
"Duration": 1,
"OriginalPrice": 0.0,
"ProductCode": "cmgj01****",
"PromotionRules": [],
"TradePrice": 0.0
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
500 | UnknownError | An error occurred while processing your request. | 未知错误 |
501 | DownstreamError | An error occurred while processing your request. | 内部调用失败 |
502 | ReturnNull | No results found. | 没有返回结果 |
999999 | IgnoreError | The specified parameter is invalid. | 参数错误 |
访问错误中心查看更多错误码。
在文档使用中是否遇到以下问题
更多建议
匿名提交