文档中心 > API类目 > 淘宝买菜次日达-快递送达

alibaba.tbmc.inventory.publish (商家库存更新服务)

供应商库存更新服务

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
inventory_publish_request InventoryPublishRequest 必须 库存发布结果查询对象
  • └ supplier_no
  • String
  • 必须
  • 2898876679
  • 二级供应商编码
  • └ remark
  • String
  • 可选
  • 备注
  • 备注
  • details
  • InventoryPublishDTO []
  • 可选
  • 明细行
  • 明细行
  • └ quantity
  • BigDecimal
  • 必须
  • 12.3
  • 需要发布的库存量(必传)(如果库存行不存在,则新增,如果存在,会使用出入值覆盖现有库存行的总库存量)
  • └ remark
  • String
  • 可选
  • 备注
  • 备注
  • └ sku_code
  • String
  • 必须
  • 527787
  • 商品编码
  • └ warehouse_code
  • String
  • 必须
  • 001
  • 仓库编码
  • └ operator
  • String
  • 可选
  • 小明
  • 操作人
  • └ platform_merchant_code
  • String
  • 可选
  • CSMMC
  • 租户编码

响应参数

名称 类型 示例值 描述
result TopBaseResult 库存发布结果对象
  • └ return_code
  • String
  • system_error
  • 错误编码
  • └ return_msg
  • String
  • 系统错误
  • 错误信息
  • └ success
  • Boolean
  • true
  • 是否成功
  • model
  • InventoryPublishResultDTO []
  • 数据
  • └ sku_code
  • String
  • 987656
  • 商品编码
  • └ warehouse_code
  • String
  • ware001
  • 仓库编码
  • └ success
  • Boolean
  • true
  • 是否处理成功(true标识成功,false标识失败)
  • └ error_code
  • String
  • system
  • 错误编码
  • └ error_message
  • String
  • 系统错误
  • 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaTbmcInventoryPublishRequest req = new AlibabaTbmcInventoryPublishRequest();
AlibabaTbmcInventoryPublishRequest.InventoryPublishRequest obj1 = new AlibabaTbmcInventoryPublishRequest.InventoryPublishRequest();
obj1.setSupplierNo("2898876679");
obj1.setRemark("备注");
List<AlibabaTbmcInventoryPublishRequest.InventoryPublishDTO> list3 = new ArrayList<AlibabaTbmcInventoryPublishRequest.InventoryPublishDTO>();
AlibabaTbmcInventoryPublishRequest.InventoryPublishDTO obj4 = new AlibabaTbmcInventoryPublishRequest.InventoryPublishDTO();
list3.add(obj4);
obj4.setQuantity("12.3");
obj4.setRemark("备注");
obj4.setSkuCode("527787");
obj4.setWarehouseCode("001");
obj1.setDetails(list3);
obj1.setOperator("小明");
obj1.setPlatformMerchantCode("CSMMC");
req.setInventoryPublishRequest(obj1);
AlibabaTbmcInventoryPublishResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_tbmc_inventory_publish_response>
    <result>
        <return_code>system_error</return_code>
        <return_msg>系统错误</return_msg>
        <success>true</success>
        <model>
            <inventory_publish_result_d_t_o>
                <sku_code>987656</sku_code>
                <warehouse_code>ware001</warehouse_code>
                <success>true</success>
                <error_code>system</error_code>
                <error_message>系统错误</error_message>
            </inventory_publish_result_d_t_o>
        </model>
    </result>
</alibaba_tbmc_inventory_publish_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

返回
顶部