文档中心 > API类目 > 新零售供应链API

alibaba.ascp.channel.supplier.product.auth (供应商授权渠道产品到市场或分销商)

供应商授权渠道产品到市场或分销商

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
channel_product_auth_request ChannelProductAuthRequest 必须 请求参数
  • └ dimension_type
  • Number
  • 必须
  • 6
  • 授权纬度,5:经营模式 + 指定用户/6:经营模式 + 指定渠道
  • └ product_id
  • Number
  • 必须
  • 123
  • 渠道产品id
  • └ distributor_nick
  • String
  • 可选
  • 名称
  • 分销商名称,指定用户传值
  • └ sub_channel_code
  • String
  • 必须
  • taofxMarket_taobao
  • 二级渠道编码
  • └ channel_code
  • String
  • 必须
  • taofxMarket
  • 渠道编码

响应参数

名称 类型 示例值 描述
result ResultWrapper 返回值包装
  • └ success
  • Boolean
  • true
  • 执行结果
  • └ data
  • Boolean
  • true
  • 执行结果
  • └ error_message
  • String
  • 0
  • 错误码
  • └ error_code
  • String
  • 0
  • 错误码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAscpChannelSupplierProductAuthRequest req = new AlibabaAscpChannelSupplierProductAuthRequest();
AlibabaAscpChannelSupplierProductAuthRequest.ChannelProductAuthRequest obj1 = new AlibabaAscpChannelSupplierProductAuthRequest.ChannelProductAuthRequest();
obj1.setDimensionType(6L);
obj1.setProductId(123L);
obj1.setDistributorNick("名称");
obj1.setSubChannelCode("taofxMarket_taobao");
obj1.setChannelCode("taofxMarket");
req.setChannelProductAuthRequest(obj1);
AlibabaAscpChannelSupplierProductAuthResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_ascp_channel_supplier_product_auth_response>
    <result>
        <success>true</success>
        <data>true</data>
        <error_message>0</error_message>
        <error_code>0</error_code>
    </result>
</alibaba_ascp_channel_supplier_product_auth_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

返回
顶部