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

cainiao.cntec.supplier.item.savesubitem (保存子商品信息)

创建或更新货品池子商品信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
sub_item_sync SubItemSyncDto 必须 请求参数
  • └ supplier_code
  • String
  • 可选
  • DRF
  • 供应商编码
  • └ out_item_id
  • String
  • 必须
  • 123123
  • 外部商品id
  • └ out_store_id
  • String
  • 必须
  • 1001
  • 外部供应商门店ID
  • └ supplier_status
  • String
  • 必须
  • 0
  • 供应商商品状态
  • └ supplier_price
  • Number
  • 必须
  • 1100
  • 商品价格,门店商品原价(单位分)
  • └ promote_price
  • Number
  • 可选
  • 1200
  • 商品促销价,门店促销价(单位分)
  • └ first_production_area
  • String
  • 可选
  • 中国
  • 产地一级
  • └ second_production_area
  • String
  • 可选
  • 黑龙江
  • 产地二级
  • └ feature
  • String
  • 可选
  • {"product_item":"商品名称","product_quantity":"商品数量"}
  • 扩展字段 json格式
  • └ modified_time
  • Number
  • 必须
  • 1619682070
  • 更新时间

响应参数

名称 类型 示例值 描述
result Result 接口返回model
  • └ error_msg
  • String
  • "参数错误"
  • 错误信息
  • └ model
  • String
  • true
  • 请求结果信息
  • └ err_code
  • String
  • 001
  • 错误码
  • └ success
  • String
  • true
  • 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoCntecSupplierItemSavesubitemRequest req = new CainiaoCntecSupplierItemSavesubitemRequest();
CainiaoCntecSupplierItemSavesubitemRequest.SubItemSyncDto obj1 = new CainiaoCntecSupplierItemSavesubitemRequest.SubItemSyncDto();
obj1.setSupplierCode("DRF");
obj1.setOutItemId("123123");
obj1.setOutStoreId("1001");
obj1.setSupplierStatus("0");
obj1.setSupplierPrice(1100L);
obj1.setPromotePrice(1200L);
obj1.setFirstProductionArea("中国");
obj1.setSecondProductionArea("黑龙江");
obj1.setFeature("{\"product_item\":\"商品名称\",\"product_quantity\":\"商品数量\"}");
obj1.setModifiedTime(1619682070L);
req.setSubItemSync(obj1);
CainiaoCntecSupplierItemSavesubitemResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<cainiao_cntec_supplier_item_savesubitem_response>
    <result>
        <error_msg>&quot;参数错误&quot;</error_msg>
        <model>true</model>
        <err_code>001</err_code>
        <success>true</success>
    </result>
</cainiao_cntec_supplier_item_savesubitem_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

返回
顶部