文档中心 > API文档

taobao.jst.astrolabe.storeinventory.iteminitial (库存初始化接口)

ERP调用奇门的接口,对门店的库存进行初始化

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
stores Store [] 可选
  • 最大列表长度:20
  • 门店列表
    • └ warehouse_type
    • String
    • 必须
    • WAREHOUSE
    • 库存来源的类型
    • └ warehouse_id
    • String
    • 必须
    • toptest_015_warehouse01
    • 门店ID(商户中心)或 电商仓ID
    • store_inventories
    • StoreInventory []
    • 可选
    • 门店库存列表
    • └ bill_num
    • String
    • 必须
    • 1461150596019
    • 单据流水号,用于幂等操作
    • └ item_id
    • String
    • 必须
    • 2100764276403
    • 淘宝前端商品id
    • └ outer_id
    • String
    • 必须
    • 8235210076427640306
    • ISV系统中商品编码
    • └ sku_id
    • String
    • 可选
    • 31154330882
    • 商品的SKU编码
    • └ inventory_type
    • String
    • 必须
    • CERTAINTY
    • 库存类型
    • └ quantity
    • String
    • 必须
    • 100
    • 对应类型的库存数量(正数)
    operation_time String 必须 2016-03-01 10:10:10 操作时间

    响应参数

    名称 类型 示例值 描述
    flag String failure 响应标示
    qimen_code String 200 响应标签
    message String 响应信息 响应信息
    error_descriptions Error [] 错误信息列表 错误信息列表
    • └ descrpition
    • String
    • 错误描述
    • 错误描述
    • └ failed_bill_num
    • String
    • 1461150596019
    • 处理失败的流水号(有多个时,用逗号分隔)

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    JstAstrolabeStoreinventoryIteminitialRequest req = new JstAstrolabeStoreinventoryIteminitialRequest();
    List<JstAstrolabeStoreinventoryIteminitialRequest.Store> list2 = new ArrayList<JstAstrolabeStoreinventoryIteminitialRequest.Store>();
    JstAstrolabeStoreinventoryIteminitialRequest.Store obj3 = new JstAstrolabeStoreinventoryIteminitialRequest.Store();
    list2.add(obj3);
    obj3.setWarehouseType("WAREHOUSE");
    obj3.setWarehouseId("toptest_015_warehouse01");
    List<JstAstrolabeStoreinventoryIteminitialRequest.StoreInventory> list6 = new ArrayList<JstAstrolabeStoreinventoryIteminitialRequest.StoreInventory>();
    JstAstrolabeStoreinventoryIteminitialRequest.StoreInventory obj7 = new JstAstrolabeStoreinventoryIteminitialRequest.StoreInventory();
    list6.add(obj7);
    obj7.setBillNum("1461150596019");
    obj7.setItemId("2100764276403");
    obj7.setOuterId("8235210076427640306");
    obj7.setSkuId("31154330882");
    obj7.setInventoryType("CERTAINTY");
    obj7.setQuantity("100");
    list4.setStoreInventories(list6);
    req.setStores(list2);
    req.setOperationTime("2016-03-01 10:10:10");
    JstAstrolabeStoreinventoryIteminitialResponse rsp = client.execute(req, sessionKey);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <jst_astrolabe_storeinventory_iteminitial_response>
        <flag>failure</flag>
        <qimen_code>200</qimen_code>
        <message>响应信息</message>
        <error_descriptions>
            <error>
                <descrpition>错误描述</descrpition>
                <failed_bill_num>1461150596019</failed_bill_num>
            </error>
        </error_descriptions>
    </jst_astrolabe_storeinventory_iteminitial_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

    返回
    顶部