文档中心 > API类目 > 淘分销API

taobao.tfx.product.price.set (渠道产品价格设置)

渠道产品价格设置

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
hwzg_prodcut_opt_price_req HwzgProdcutOptPriceReq 必须 设置价格参数请求类
  • └ seller_id
  • Number
  • 必须
  • 274736112
  • 淘分销供应商id
  • └ channel_code
  • String
  • 必须
  • taofxMarket
  • 渠道code
  • └ sub_channel_code
  • String
  • 必须
  • taofxMarket_taobao
  • 二级渠道code
  • └ product_id
  • Number
  • 必须
  • 677762926412
  • 渠道产品id
  • └ cost_price
  • BigDecimal
  • 必须
  • 9.99
  • 采购成本价
  • └ price_ratio
  • BigDecimal
  • 必须
  • 1.1
  • 价格系数
  • sku_price_info
  • HwzgProdcutSkuOptPrice []
  • 必须
  • [{"skuId":"1","outerSkuId":"a","priceRatio":"0.02","costPrice":"1"},{"skuId":"2","outerSkuId":"b","priceRatio":"0.02","costPrice":"2"},{"skuId":"3","outerSkuId":"c","priceRatio":"0.03","costPrice":"3"}]
  • SKU维度价格设置
  • └ sku_id
  • Number
  • 必须
  • 5222217587024
  • skuId
  • └ outer_sku_id
  • String
  • 必须
  • D25-3680012
  • 外部skuid
  • └ price_ratio
  • BigDecimal
  • 必须
  • 1.1
  • 价格系数
  • └ cost_price
  • BigDecimal
  • 必须
  • 9.99
  • 采购成本价

响应参数

名称 类型 示例值 描述
data Boolean true 执行结果
result_msg String 入参错误 错误信息
result_code Number 501 错误码
is_success Boolean true 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TfxProductPriceSetRequest req = new TfxProductPriceSetRequest();
TfxProductPriceSetRequest.HwzgProdcutOptPriceReq obj1 = new TfxProductPriceSetRequest.HwzgProdcutOptPriceReq();
obj1.setSellerId(274736112L);
obj1.setChannelCode("taofxMarket");
obj1.setSubChannelCode("taofxMarket_taobao");
obj1.setProductId(677762926412L);
obj1.setCostPrice("9.99");
obj1.setPriceRatio("1.1");
List<TfxProductPriceSetRequest.HwzgProdcutSkuOptPrice> list3 = new ArrayList<TfxProductPriceSetRequest.HwzgProdcutSkuOptPrice>();
TfxProductPriceSetRequest.HwzgProdcutSkuOptPrice obj4 = new TfxProductPriceSetRequest.HwzgProdcutSkuOptPrice();
list3.add(obj4);
obj4.setSkuId(5222217587024L);
obj4.setOuterSkuId("D25-3680012");
obj4.setPriceRatio("1.1");
obj4.setCostPrice("9.99");
obj1.setSkuPriceInfo(list3);
req.setHwzgProdcutOptPriceReq(obj1);
TfxProductPriceSetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tfx_product_price_set_response>
    <data>true</data>
    <result_msg>入参错误</result_msg>
    <result_code>501</result_code>
    <is_success>true</is_success>
</tfx_product_price_set_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

返回
顶部