文档中心 > API类目 > 五道口营销域

alibaba.wdk.marketing.expire.promotion.create (短保优惠创建)

过期优惠优惠信息录入

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param0 ExpirePromotionBo 必须 创建短保优惠
  • period_infos
  • ExpirePeriodInfo []
  • 必须
  • ""
  • 短保时间段信息
  • └ promotion_value
  • Number
  • 必须
  • 1000
  • 优惠具体折扣,1到1000
  • └ end_hour
  • Number
  • 必须
  • 24
  • 0到24,小时数值
  • └ start_hour
  • Number
  • 必须
  • 0
  • 0到24,小时数值
  • └ out_id
  • Number
  • 必须
  • 1
  • 外部商家id
  • └ shop_ids
  • String []
  • 必须
  • 123456,2345
  • 门店id
  • └ sku_code
  • String
  • 必须
  • 123456
  • 商品skucode

响应参数

名称 类型 示例值 描述
message String 请求参数非法 message
datas T [] 123456 data
  • └ merchant_code
  • String
  • HM
  • 商家code
  • └ sku_code
  • String
  • 1
  • 商品skucode
  • └ item_id
  • Number
  • 2
  • 商品itemId
  • └ shop_id
  • String
  • 1
  • 门店id
  • └ error_code
  • String
  • REQUEST_PARAM_ERROR
  • 错误码
  • └ success
  • Boolean
  • true
  • success
  • └ error_msg
  • String
  • 失败
  • 错误信息
fail_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);
AlibabaWdkMarketingExpirePromotionCreateRequest req = new AlibabaWdkMarketingExpirePromotionCreateRequest();
AlibabaWdkMarketingExpirePromotionCreateRequest.ExpirePromotionBo obj1 = new AlibabaWdkMarketingExpirePromotionCreateRequest.ExpirePromotionBo();
List<AlibabaWdkMarketingExpirePromotionCreateRequest.ExpirePeriodInfo> list3 = new ArrayList<AlibabaWdkMarketingExpirePromotionCreateRequest.ExpirePeriodInfo>();
AlibabaWdkMarketingExpirePromotionCreateRequest.ExpirePeriodInfo obj4 = new AlibabaWdkMarketingExpirePromotionCreateRequest.ExpirePeriodInfo();
list3.add(obj4);
obj4.setPromotionValue(1000L);
obj4.setEndHour(24L);
obj4.setStartHour(0L);
obj4.setOutId(1L);
obj1.setPeriodInfos(list3);
obj1.setShopIds("123456,2345");
obj1.setSkuCode("123456");
req.setParam0(obj1);
AlibabaWdkMarketingExpirePromotionCreateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_wdk_marketing_expire_promotion_create_response>
    <message>请求参数非法</message>
    <datas>
        <t>
            <merchant_code>HM</merchant_code>
            <sku_code>1</sku_code>
            <item_id>2</item_id>
            <shop_id>1</shop_id>
            <error_code>REQUEST_PARAM_ERROR</error_code>
            <success>true</success>
            <error_msg>失败</error_msg>
        </t>
    </datas>
    <fail_code>REQUEST_PARAM_ERROR</fail_code>
    <is_success>true</is_success>
</alibaba_wdk_marketing_expire_promotion_create_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

返回
顶部