文档中心 > API类目 > 淘宝定制行业API

taobao.industry.applestore.restriction.create (创建限购计划)

创建限购计划

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
restriction_plan_dto RestrictionPlanDTO 可选 保存入参
  • └ period_type
  • String
  • 必须
  • D
  • 周期类别
  • restriction_rule_list
  • RestrictionRuleDTO []
  • 可选
  • null
  • 规则入参
  • └ restriction_ids
  • String
  • 必须
  • 656851744680
  • 限购outerId
  • └ restriction_type
  • Number
  • 必须
  • 2
  • 类别
  • └ rule_type
  • Number
  • 可选
  • 0
  • 规则类别
  • └ quota
  • Number
  • 必须
  • 1
  • 限购数量
  • └ channel
  • String
  • 可选
  • PC
  • 渠道
  • └ business_type
  • String
  • 可选
  • CE_APPLE
  • 业务
  • └ channel
  • String
  • 可选
  • PC
  • 渠道
  • └ periods
  • Number
  • 必须
  • 1
  • 默认为1
  • └ start_time_date
  • Date
  • 必须
  • 2023-05-11 00:00:00
  • 开始时间
  • └ business_type
  • String
  • 可选
  • CE_APPLE
  • 业务
  • └ restriction_days
  • Number
  • 必须
  • 2
  • 限购天数
  • └ plan_name
  • String
  • 必须
  • 创建测试
  • 限购计划名称

响应参数

名称 类型 示例值 描述
data String { "656851744680": 587 } restrictionId和planItemId的配对
error_message String error 失败信息
fail Boolean false 是否失败

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
IndustryApplestoreRestrictionCreateRequest req = new IndustryApplestoreRestrictionCreateRequest();
IndustryApplestoreRestrictionCreateRequest.RestrictionPlanDTO obj1 = new IndustryApplestoreRestrictionCreateRequest.RestrictionPlanDTO();
obj1.setPeriodType("D");
List<IndustryApplestoreRestrictionCreateRequest.RestrictionRuleDTO> list3 = new ArrayList<IndustryApplestoreRestrictionCreateRequest.RestrictionRuleDTO>();
IndustryApplestoreRestrictionCreateRequest.RestrictionRuleDTO obj4 = new IndustryApplestoreRestrictionCreateRequest.RestrictionRuleDTO();
list3.add(obj4);
obj4.setRestrictionIds("656851744680");
obj4.setRestrictionType(2L);
obj4.setRuleType(0L);
obj4.setQuota(1L);
obj4.setChannel("PC");
obj4.setBusinessType("CE_APPLE");
obj1.setRestrictionRuleList(list3);
obj1.setChannel("PC");
obj1.setPeriods(1L);
obj1.setStartTimeDate(StringUtils.parseDateTime("2023-05-11 00:00:00"));
obj1.setBusinessType("CE_APPLE");
obj1.setRestrictionDays(2L);
obj1.setPlanName("创建测试");
req.setRestrictionPlanDto(obj1);
IndustryApplestoreRestrictionCreateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<industry_applestore_restriction_create_response>
    <data>{     &quot;656851744680&quot;: 587   }</data>
    <error_message>error</error_message>
    <fail>false</fail>
</industry_applestore_restriction_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

返回
顶部