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

alibaba.gsc.openapi.shark.price.save (shark保存sap回传成本)

shark保存sap回传成本

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
cost_request CostRequest 可选 成本回写请求
  • item_list
  • StockCostItem []
  • 可选
  • item_list
  • 物料列表
  • └ item_code
  • String
  • 可选
  • 1xeeww
  • 物料编码
  • └ material_doc_num
  • String
  • 可选
  • 1212
  • 物料凭证编号
  • └ material_doc_year
  • String
  • 可选
  • 121212
  • 物料凭证年份
  • └ price
  • String
  • 可选
  • 0.01
  • 成本
  • └ gu_id
  • String
  • 可选
  • 1
  • 聚合包唯一键
  • └ key
  • String
  • 可选
  • 1
  • 业务流水码
  • └ tenant
  • String
  • 可选
  • gsc202
  • 租户

响应参数

名称 类型 示例值 描述
cost_code String 200 返回code
cost_msg String 成功 返回信息
cost_data Boolean true 返回内容

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaGscOpenapiSharkPriceSaveRequest req = new AlibabaGscOpenapiSharkPriceSaveRequest();
AlibabaGscOpenapiSharkPriceSaveRequest.CostRequest obj1 = new AlibabaGscOpenapiSharkPriceSaveRequest.CostRequest();
List<AlibabaGscOpenapiSharkPriceSaveRequest.StockCostItem> list3 = new ArrayList<AlibabaGscOpenapiSharkPriceSaveRequest.StockCostItem>();
AlibabaGscOpenapiSharkPriceSaveRequest.StockCostItem obj4 = new AlibabaGscOpenapiSharkPriceSaveRequest.StockCostItem();
list3.add(obj4);
obj4.setItemCode("1xeeww");
obj4.setMaterialDocNum("1212");
obj4.setMaterialDocYear("121212");
obj4.setPrice("0.01");
obj4.setGuId("1");
obj1.setItemList(list3);
obj1.setKey("1");
obj1.setTenant("gsc202");
req.setCostRequest(obj1);
AlibabaGscOpenapiSharkPriceSaveResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_gsc_openapi_shark_price_save_response>
    <cost_code>200</cost_code>
    <cost_msg>成功</cost_msg>
    <cost_data>true</cost_data>
</alibaba_gsc_openapi_shark_price_save_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

返回
顶部