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

cainiao.cntec.supplier.promotion.goodssyn (营销品同步)

RT营销品同步

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
goods_syn_req CreatePromotionGoodsRequest 可选 商品同步参数
  • └ group_count
  • Number
  • 可选
  • 1
  • 成团条件
  • └ promotion_price
  • Number
  • 可选
  • 800
  • 营销价单位分)
  • └ limit_count
  • Number
  • 可选
  • 10
  • 限购数量
  • └ outer_store_ids
  • String []
  • 必须
  • ["1001"]
  • 外部门店id
  • └ attribute
  • String
  • 可选
  • 扩展字段
  • └ barcode
  • String
  • 必须
  • 12334
  • 外部商品id
  • └ outer_promotion_id
  • String
  • 必须
  • 11
  • 外部活动id
  • └ promotion_supplier_price
  • Number
  • 必须
  • 600
  • 营销供货价

响应参数

名称 类型 示例值 描述
result Result {} 接口返回model
  • └ err_code
  • String
  • 门店不存在
  • 错误码
  • └ success
  • Boolean
  • false
  • 是否成功
  • model
  • Model
  • 134523^4351232
  • model
  • └ has_error_goods
  • Boolean
  • false
  • 是否有错误门店商品
  • error_goods_messages
  • ErrorGoodsMessages []
  • 错误信息
  • └ error_message
  • String
  • 活动中(id:22)不存在门店id
  • 错误信息
  • └ error_outer_store_ids
  • String []
  • 错误门店
  • └ success_outer_store_ids
  • String []
  • 成功门店
  • └ error_msg
  • String
  • "参数错误"
  • 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoCntecSupplierPromotionGoodssynRequest req = new CainiaoCntecSupplierPromotionGoodssynRequest();
CainiaoCntecSupplierPromotionGoodssynRequest.CreatePromotionGoodsRequest obj1 = new CainiaoCntecSupplierPromotionGoodssynRequest.CreatePromotionGoodsRequest();
obj1.setGroupCount(1L);
obj1.setPromotionPrice(800L);
obj1.setLimitCount(10L);
obj1.setOuterStoreIds(""1001"");
obj1.setAttribute("");
obj1.setBarcode("12334");
obj1.setOuterPromotionId("11");
obj1.setPromotionSupplierPrice(600L);
req.setGoodsSynReq(obj1);
CainiaoCntecSupplierPromotionGoodssynResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<cainiao_cntec_supplier_promotion_goodssyn_response>
    <result>
        <err_code>门店不存在</err_code>
        <success>false</success>
        <model>
            <has_error_goods>false</has_error_goods>
            <error_goods_messages>
                <error_goods_messages>
                    <error_message>活动中(id:22)不存在门店id</error_message>
                    <error_outer_store_ids>
                        <string></string>
                    </error_outer_store_ids>
                </error_goods_messages>
            </error_goods_messages>
            <success_outer_store_ids>
                <string></string>
            </success_outer_store_ids>
        </model>
        <error_msg>&quot;参数错误&quot;</error_msg>
    </result>
</cainiao_cntec_supplier_promotion_goodssyn_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

返回
顶部