文档中心 > API类目 > 天猫精灵供应链网关API

alibaba.gsc.inventory.costprice.sync (天猫精灵供应链SAP库存成本同步)

天猫精灵供应链SAP库存成本同步

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
inventory_material_cost_price_sync_dto InventoryMaterialCostPriceSyncDTO 必须 库存成本同步
  • inventory_material_cost_price_list
  • InventoryMaterialCostPriceDTO []
  • 必须
  • 库存成本价列表
  • └ currency_type
  • String
  • 必须
  • CNY
  • 币种
  • └ item_name
  • String
  • 必须
  • 天猫精灵红色
  • 物料名称
  • └ ou
  • String
  • 必须
  • 8000
  • OU
  • └ item_code
  • String
  • 必须
  • 1X100983H
  • 物料编码
  • └ cost_purchase_price
  • String
  • 必须
  • 12.34
  • 库存成本
  • └ client
  • String
  • 必须
  • gsc800
  • client

响应参数

名称 类型 示例值 描述
result DataResult 返回对象封装
  • └ result_msg
  • String
  • 成功
  • 返回结果描述
  • └ trace_id
  • String
  • 111111111
  • 请求唯一ID
  • └ total
  • Number
  • 0
  • 数量
  • └ result_code
  • String
  • 00000000
  • 结果code
  • └ data
  • Boolean
  • true
  • 数据

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaGscInventoryCostpriceSyncRequest req = new AlibabaGscInventoryCostpriceSyncRequest();
AlibabaGscInventoryCostpriceSyncRequest.InventoryMaterialCostPriceSyncDTO obj1 = new AlibabaGscInventoryCostpriceSyncRequest.InventoryMaterialCostPriceSyncDTO();
List<AlibabaGscInventoryCostpriceSyncRequest.InventoryMaterialCostPriceDTO> list3 = new ArrayList<AlibabaGscInventoryCostpriceSyncRequest.InventoryMaterialCostPriceDTO>();
AlibabaGscInventoryCostpriceSyncRequest.InventoryMaterialCostPriceDTO obj4 = new AlibabaGscInventoryCostpriceSyncRequest.InventoryMaterialCostPriceDTO();
list3.add(obj4);
obj4.setCurrencyType("CNY");
obj4.setItemName("天猫精灵红色");
obj4.setOu("8000");
obj4.setItemCode("1X100983H");
obj4.setCostPurchasePrice("12.34");
obj1.setInventoryMaterialCostPriceList(list3);
obj1.setClient("gsc800");
req.setInventoryMaterialCostPriceSyncDto(obj1);
AlibabaGscInventoryCostpriceSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_gsc_inventory_costprice_sync_response>
    <result>
        <result_msg>成功</result_msg>
        <trace_id>111111111</trace_id>
        <total>0</total>
        <result_code>00000000</result_code>
        <data>true</data>
    </result>
</alibaba_gsc_inventory_costprice_sync_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

返回
顶部