文档中心 > API类目 > 天猫供应链

alibaba.dchain.aoxiang.item.distribution.update (更新商品分销内容)

更新商品分销内容

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
update_item_distribution_request UpdateItemDistributionRequest 必须 更新商品分销入参
  • └ request_id
  • String
  • 必须
  • xxx
  • 业务请求ID,用于幂等
  • └ request_time
  • Number
  • 必须
  • 1639205668000
  • 业务请求时间。时间戳。 毫秒
  • └ item_id
  • String
  • 必须
  • 123456
  • 【必传】要选择进行铺货的店铺宝贝 itemId
  • └ sku_id
  • String
  • 可选
  • 123456
  • 要选择进行铺货的店铺宝贝 skuId, 如果没有sku就不传
  • └ logistics_cost_template_id
  • Number
  • 可选
  • 123456
  • 运费模板id,如果要修改则需要传
  • └ distribute_price
  • Number
  • 必须
  • 10
  • 通用分销价格,卖给分销商的价格, 单位 分。 如果需要修改则需要传
  • └ distribute_currency
  • String
  • 必须
  • CNY
  • 币种
  • └ retail_price
  • Number
  • 可选
  • 20
  • 建议零售价。 建议分销商卖给消费者的价格, 单位 分。 非必传
  • └ retail_currency
  • String
  • 可选
  • CNY
  • 币种
  • └ level1_price
  • Number
  • 可选
  • 10
  • 1级分销价格
  • └ level2_price
  • Number
  • 可选
  • 10
  • 2级分销价格
  • └ level3_price
  • Number
  • 可选
  • 10
  • 3级分销价格
  • └ level4_price
  • Number
  • 可选
  • 10
  • 4级分销价格
  • └ level5_price
  • Number
  • 可选
  • 10
  • 5级分销价格

响应参数

名称 类型 示例值 描述
update_item_distribution_response SaveItemDistributionResponse 返回结构体
  • └ code
  • String
  • xxxxxx
  • 返回信息码
  • data
  • DistributionResponse
  • true
  • 业务处理结果
  • └ success
  • Boolean
  • true
  • 执行结果
  • └ error_code
  • String
  • PARAM_ERROR
  • 错误编码
  • └ error_message
  • String
  • 错误描述
  • 错误描述
  • └ success
  • Boolean
  • true
  • 调用接口是否成功。调用成功之后,需要看data里面的success,才能知道业务处理是否成功
  • └ message
  • String
  • xxxxxx
  • 返回信息
  • └ trace_id
  • String
  • 1231
  • 操作码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaDchainAoxiangItemDistributionUpdateRequest req = new AlibabaDchainAoxiangItemDistributionUpdateRequest();
AlibabaDchainAoxiangItemDistributionUpdateRequest.UpdateItemDistributionRequest obj1 = new AlibabaDchainAoxiangItemDistributionUpdateRequest.UpdateItemDistributionRequest();
obj1.setRequestId("xxx");
obj1.setRequestTime(1639205668000L);
obj1.setItemId("123456");
obj1.setSkuId("123456");
obj1.setLogisticsCostTemplateId(123456L);
obj1.setDistributePrice(10L);
obj1.setDistributeCurrency("CNY");
obj1.setRetailPrice(20L);
obj1.setRetailCurrency("CNY");
obj1.setLevel1Price(10L);
obj1.setLevel2Price(10L);
obj1.setLevel3Price(10L);
obj1.setLevel4Price(10L);
obj1.setLevel5Price(10L);
req.setUpdateItemDistributionRequest(obj1);
AlibabaDchainAoxiangItemDistributionUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_dchain_aoxiang_item_distribution_update_response>
    <update_item_distribution_response>
        <code>xxxxxx</code>
        <data>
            <success>true</success>
            <error_code>PARAM_ERROR</error_code>
            <error_message>错误描述</error_message>
        </data>
        <success>true</success>
        <message>xxxxxx</message>
        <trace_id>1231</trace_id>
    </update_item_distribution_response>
</alibaba_dchain_aoxiang_item_distribution_update_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

返回
顶部