文档中心 > API类目 > 阿里健康药API

alibaba.alihealth.nrmop.item.insertbychannel (从渠道新增店铺商品)

从渠道新增店铺商品

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
seller_custom_item_dto SellerCustomItemDTO 可选 新增商品DTO
  • └ custom_category_code
  • String
  • 可选
  • 1111
  • 自定渠道类目编码
  • └ title
  • String
  • 必须
  • 1111
  • 商品名称
  • └ spec
  • String
  • 可选
  • 1111
  • 规格
  • └ custom_item_id
  • String
  • 可选
  • 1111
  • 线上编号
  • └ out_id
  • String
  • 必须
  • 1111
  • 药店药品编码(ERP编码)
  • └ channel_id
  • Number
  • 必须
  • 8
  • 渠道ID,一树小鹿O2O:8,一树小鹿B2C:7
  • └ is_rx
  • Number
  • 可选
  • 0
  • 是否为处方药 0-非处方药 1-处方药
  • └ channel_shop_code
  • String
  • 必须
  • 1111
  • 渠道店铺编码 = 门店在渠道入驻时填写的编码 = 门店入驻OMS时填写的渠道门店编码

响应参数

名称 类型 示例值 描述
result ResponseResult 新增结果对象
  • └ result
  • Boolean
  • true
  • 更新结果
  • └ success
  • Boolean
  • true
  • 执行是否成功
  • └ error_code
  • String
  • PARAM_INVALID
  • 错误码
  • └ error_msg
  • String
  • 传入参数无效或为空
  • 错误描述

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthNrmopItemInsertbychannelRequest req = new AlibabaAlihealthNrmopItemInsertbychannelRequest();
AlibabaAlihealthNrmopItemInsertbychannelRequest.SellerCustomItemDTO obj1 = new AlibabaAlihealthNrmopItemInsertbychannelRequest.SellerCustomItemDTO();
obj1.setCustomCategoryCode("1111");
obj1.setTitle("1111");
obj1.setSpec("1111");
obj1.setCustomItemId("1111");
obj1.setOutId("1111");
obj1.setChannelId(8L);
obj1.setIsRx(0L);
obj1.setChannelShopCode("1111");
req.setSellerCustomItemDto(obj1);
AlibabaAlihealthNrmopItemInsertbychannelResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_nrmop_item_insertbychannel_response>
    <result>
        <result>true</result>
        <success>true</success>
        <error_code>PARAM_INVALID</error_code>
        <error_msg>传入参数无效或为空</error_msg>
    </result>
</alibaba_alihealth_nrmop_item_insertbychannel_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

返回
顶部