文档中心 > API类目 > 菜鸟末端商业

cainiao.cntec.supplier.promotion.synpromotion (营销活动同步)

RT活动

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
promotion_syn_request CreatePromotionRequest 可选 活动同步入参数
  • └ discounts
  • String
  • 可选
  • 8.8
  • 满折扣
  • └ arrival_time
  • Date
  • 可选
  • 2021-05-15 12:00:00
  • 到货时间
  • └ name
  • String
  • 必须
  • 秒杀活动5.15(14~15)
  • 活动名称
  • └ outer_store_ids
  • String []
  • 必须
  • ["1001"]
  • 外部门店id
  • └ outer_id
  • String
  • 必须
  • 1
  • 外部活动id
  • └ start_time
  • Date
  • 必须
  • 2021-05-10 12:00:00
  • 活动开始时间
  • └ threshold
  • Number
  • 可选
  • 3
  • 满折扣门槛
  • └ end_time
  • Date
  • 必须
  • 2021-05-14 12:00:00
  • 活动结束时间
  • └ attribute
  • String
  • 可选
  • {}
  • 扩展字段
  • └ type
  • String
  • 必须
  • SECKILL
  • 活动类型

响应参数

名称 类型 示例值 描述
result Result {} 接口返回model
  • └ success
  • Boolean
  • false
  • 是否成功
  • └ err_code
  • String
  • 12312312
  • 错误码
  • model
  • Model
  • 134523^4351232
  • model
  • promotion
  • PromotionDto
  • 创建活动对象
  • └ type
  • String
  • SECKILL
  • 活动类型
  • └ outer_promotion_id
  • String
  • 30
  • 外部活动id
  • └ store_ids
  • String
  • ["1001"]
  • 外部门店id
  • └ name
  • String
  • 秒杀活动5.15(14~15)
  • 活动名称
  • └ attributes
  • String
  • 扩展字段
  • └ start_time
  • Date
  • 1621051200000
  • 活动开始时间
  • └ id
  • Number
  • 51
  • 供应商活动id
  • └ end_time
  • Date
  • 1621137599000
  • 活动结束时间
  • error_messages
  • ErrorMessages []
  • 部分错误数据
  • └ error_message
  • String
  • 门店团期不匹配
  • 错误信息
  • └ error_outer_store_ids
  • String []
  • 错误门店id
  • └ has_error_outer_store_ids
  • Boolean
  • true
  • 是否有错误门店信息
  • └ error_msg
  • String
  • "参数错误"
  • 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoCntecSupplierPromotionSynpromotionRequest req = new CainiaoCntecSupplierPromotionSynpromotionRequest();
CainiaoCntecSupplierPromotionSynpromotionRequest.CreatePromotionRequest obj1 = new CainiaoCntecSupplierPromotionSynpromotionRequest.CreatePromotionRequest();
obj1.setDiscounts("8.8");
obj1.setArrivalTime(StringUtils.parseDateTime("2021-05-15 12:00:00"));
obj1.setName("秒杀活动5.15(14~15)");
obj1.setOuterStoreIds(""1001"");
obj1.setOuterId("1");
obj1.setStartTime(StringUtils.parseDateTime("2021-05-10 12:00:00"));
obj1.setThreshold(3L);
obj1.setEndTime(StringUtils.parseDateTime("2021-05-14 12:00:00"));
obj1.setAttribute("{}");
obj1.setType("SECKILL");
req.setPromotionSynRequest(obj1);
CainiaoCntecSupplierPromotionSynpromotionResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<cainiao_cntec_supplier_promotion_synpromotion_response>
    <result>
        <success>false</success>
        <err_code>12312312</err_code>
        <model>
            <promotion>
                <type>SECKILL</type>
                <outer_promotion_id>30</outer_promotion_id>
                <store_ids>[&quot;1001&quot;]</store_ids>
                <name>秒杀活动5.15(14~15)</name>
                <attributes></attributes>
                <start_time>1621051200000</start_time>
                <id>51</id>
                <end_time>1621137599000</end_time>
            </promotion>
            <error_messages>
                <error_messages>
                    <error_message>门店团期不匹配</error_message>
                    <error_outer_store_ids>
                        <string></string>
                    </error_outer_store_ids>
                </error_messages>
            </error_messages>
            <has_error_outer_store_ids>true</has_error_outer_store_ids>
        </model>
        <error_msg>&quot;参数错误&quot;</error_msg>
    </result>
</cainiao_cntec_supplier_promotion_synpromotion_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

返回
顶部