文档中心 > API类目 > 五道口API

alibaba.hm.marketing.expire.promotion.query (短保优惠查询)

短保优惠查询

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
shop_id String 必须 123456 店铺id
sku_code String 必须 121212 商品skucode

响应参数

名称 类型 示例值 描述
result MarketResult result
  • └ message
  • String
  • 请求参数非法
  • message
  • data
  • ExpirePromotionBo
  • data
  • period_infos
  • ExpirePeriodInfo []
  • 优惠详情
  • └ promotion_value
  • Number
  • 1
  • 优惠值
  • └ end_hour
  • Number
  • 1
  • 优惠结束时间(距离过期时间)
  • └ start_hour
  • Number
  • 2
  • 优惠开始时间(距离过期时间)
  • └ out_id
  • Number
  • 2
  • 外部优惠id
  • └ sku_code
  • String
  • 123456
  • 商品
  • └ shop_ids
  • String []
  • 123456
  • 门店
  • └ merchant_code
  • String
  • HM
  • 商家code
  • └ error_code
  • String
  • REQUEST_PARAM_ERROR
  • errorCode
  • └ is_success
  • Boolean
  • true
  • success

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaHmMarketingExpirePromotionQueryRequest req = new AlibabaHmMarketingExpirePromotionQueryRequest();
req.setShopId("123456");
req.setSkuCode("121212");
AlibabaHmMarketingExpirePromotionQueryResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_hm_marketing_expire_promotion_query_response>
    <result>
        <message>请求参数非法</message>
        <data>
            <period_infos>
                <expire_period_info>
                    <promotion_value>1</promotion_value>
                    <end_hour>1</end_hour>
                    <start_hour>2</start_hour>
                    <out_id>2</out_id>
                </expire_period_info>
            </period_infos>
            <sku_code>123456</sku_code>
            <shop_ids>
                <string>123456</string>
            </shop_ids>
            <merchant_code>HM</merchant_code>
        </data>
        <error_code>REQUEST_PARAM_ERROR</error_code>
        <is_success>true</is_success>
    </result>
</alibaba_hm_marketing_expire_promotion_query_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部