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

alibaba.gsc.eel.stockout.create (出库单创建接口)

仓储出库单创建

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
stockout_create_request StockoutCreateRequestExt 必须 出库创建实例
  • delivery_order
  • DeliveryOrder
  • 必须
  • complex
  • 出库单详情
  • └ total_order_lines
  • String
  • 可选
  • 20
  • 行数
  • └ delivery_order_code
  • String
  • 必须
  • SAP00001
  • 出库流水号
  • └ order_type
  • String
  • 可选
  • JTCK
  • 出库类型
  • └ order_source_type
  • String
  • 可选
  • PTCK
  • 出库原始类型
  • └ warehouse_code
  • String
  • 必须
  • 1001
  • 仓库编码
  • └ create_time
  • String
  • 必须
  • 2019-11-11
  • 创建时间
  • └ schedule_date
  • String
  • 可选
  • 2019-11-11
  • 调度时间
  • └ logistics_code
  • String
  • 可选
  • SF
  • 物流编码
  • └ logistics_name
  • String
  • 可选
  • 顺丰
  • 物流名称
  • └ transport_mode
  • String
  • 可选
  • Trunk
  • 发运类型
  • └ remark
  • String
  • 可选
  • 备注
  • 备注
  • sender_info
  • SenderInfo
  • 可选
  • 发运人信息
  • └ company
  • String
  • 可选
  • 天猫供应链
  • 公司
  • └ name
  • String
  • 可选
  • 刘二
  • 发运人姓名
  • └ zip_code
  • String
  • 可选
  • 310000
  • 邮政编码
  • └ tel
  • String
  • 可选
  • 6512727
  • 电话号码
  • └ mobile
  • String
  • 可选
  • 13900001111
  • 手机号码
  • └ email
  • String
  • 可选
  • 11111@126.com
  • 邮箱
  • └ country_code
  • String
  • 可选
  • 中国
  • 国家
  • └ province
  • String
  • 可选
  • 安徽
  • 省份
  • └ city
  • String
  • 可选
  • 合肥
  • 城市
  • └ area
  • String
  • 可选
  • 淮河区
  • └ town
  • String
  • 可选
  • 农村
  • 村镇
  • └ detail_address
  • String
  • 可选
  • xx街道xx户
  • 详细地址
  • └ id
  • String
  • 可选
  • 31111111111111
  • 身份证号
  • receiver_info
  • ReceiverInfo
  • 可选
  • 收件人信息
  • └ company
  • String
  • 可选
  • 天猫供应链
  • 公司
  • └ name
  • String
  • 可选
  • 刘二
  • 发运人姓名
  • └ zip_code
  • String
  • 可选
  • 310000
  • 邮政编码
  • └ tel
  • String
  • 可选
  • 6512727
  • 电话号码
  • └ mobile
  • String
  • 可选
  • 13900001111
  • 手机号码
  • └ email
  • String
  • 可选
  • 11111@126.com
  • 邮箱
  • └ country_code
  • String
  • 可选
  • 中国
  • 国家
  • └ province
  • String
  • 可选
  • 安徽
  • 省份
  • └ city
  • String
  • 可选
  • 合肥
  • 城市
  • └ area
  • String
  • 可选
  • 淮河区
  • └ town
  • String
  • 可选
  • 农村
  • 村镇
  • └ detail_address
  • String
  • 可选
  • xx街道xx户
  • 详细地址
  • └ id
  • String
  • 可选
  • 31111111111111
  • 身份证号
  • picker_info
  • PickerInfo
  • 可选
  • 揽件人信息
  • └ company
  • String
  • 可选
  • 天猫供应链
  • 公司
  • └ name
  • String
  • 可选
  • 刘二
  • 发运人姓名
  • └ tel
  • String
  • 可选
  • 6512727
  • 电话号码
  • └ mobile
  • String
  • 可选
  • 13900001111
  • 手机号码
  • └ car_no
  • String
  • 可选
  • 浙A 11111
  • 车牌号
  • └ id
  • String
  • 可选
  • 31111111111111
  • 身份证号
  • └ shop_code
  • String
  • 可选
  • B002
  • 店铺编码
  • └ partner_code
  • String
  • 可选
  • BP3123
  • 客户编码
  • order_lines
  • OrderLine []
  • 必须
  • complex
  • 物料行
  • └ out_biz_code
  • String
  • 可选
  • abc
  • 业务流水号
  • └ order_line_no
  • String
  • 可选
  • 0
  • 行号
  • └ owner_code
  • String
  • 可选
  • 31323000
  • 货主
  • └ item_id
  • String
  • 可选
  • 600011111
  • 物料ID
  • └ item_name
  • String
  • 可选
  • abc
  • 物料名称
  • └ item_code
  • String
  • 可选
  • SP11000
  • 物料编码
  • └ inventory_type
  • String
  • 可选
  • ZP
  • 库存类型
  • └ plan_qty
  • String
  • 可选
  • 0
  • 计划数量
  • └ product_date
  • String
  • 可选
  • 2019-11-11
  • 产品日期
  • └ expire_date
  • String
  • 可选
  • 2019-11-11
  • 退市日期
  • └ batch_code
  • String
  • 可选
  • 2019-11-11
  • 批次编码
  • └ produce_code
  • String
  • 可选
  • 2019-11-11
  • 生产批次
  • └ key
  • String
  • 必须
  • 123456789
  • 业务流水码
  • └ client
  • String
  • 可选
  • 1
  • 租户编码

响应参数

名称 类型 示例值 描述
stockout_create_response StockoutCreateResponse COMPLEX 创建结果
  • └ code
  • String
  • 0
  • 错误码
  • └ message
  • String
  • abc
  • 错误信息
  • └ flag
  • String
  • success
  • 返回标识
  • └ delivery_order_id
  • String
  • LBX0128153767249504
  • 订单号

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaGscEelStockoutCreateRequest req = new AlibabaGscEelStockoutCreateRequest();
AlibabaGscEelStockoutCreateRequest.StockoutCreateRequestExt obj1 = new AlibabaGscEelStockoutCreateRequest.StockoutCreateRequestExt();
AlibabaGscEelStockoutCreateRequest.DeliveryOrder obj2 = new AlibabaGscEelStockoutCreateRequest.DeliveryOrder();
obj2.setTotalOrderLines("20");
obj2.setDeliveryOrderCode("SAP00001");
obj2.setOrderType("JTCK");
obj2.setOrderSourceType("PTCK");
obj2.setWarehouseCode("1001");
obj2.setCreateTime("2019-11-11");
obj2.setScheduleDate("2019-11-11");
obj2.setLogisticsCode("SF");
obj2.setLogisticsName("顺丰");
obj2.setTransportMode("Trunk");
obj2.setRemark("备注");
AlibabaGscEelStockoutCreateRequest.SenderInfo obj3 = new AlibabaGscEelStockoutCreateRequest.SenderInfo();
obj3.setCompany("天猫供应链");
obj3.setName("刘二");
obj3.setZipCode("310000");
obj3.setTel("6512727");
obj3.setMobile("13900001111");
obj3.setEmail("11111@126.com");
obj3.setCountryCode("中国");
obj3.setProvince("安徽");
obj3.setCity("合肥");
obj3.setArea("淮河区");
obj3.setTown("农村");
obj3.setDetailAddress("xx街道xx户");
obj3.setId("31111111111111");
obj2.setSenderInfo(obj3);
AlibabaGscEelStockoutCreateRequest.ReceiverInfo obj4 = new AlibabaGscEelStockoutCreateRequest.ReceiverInfo();
obj4.setCompany("天猫供应链");
obj4.setName("刘二");
obj4.setZipCode("310000");
obj4.setTel("6512727");
obj4.setMobile("13900001111");
obj4.setEmail("11111@126.com");
obj4.setCountryCode("中国");
obj4.setProvince("安徽");
obj4.setCity("合肥");
obj4.setArea("淮河区");
obj4.setTown("农村");
obj4.setDetailAddress("xx街道xx户");
obj4.setId("31111111111111");
obj2.setReceiverInfo(obj4);
AlibabaGscEelStockoutCreateRequest.PickerInfo obj5 = new AlibabaGscEelStockoutCreateRequest.PickerInfo();
obj5.setCompany("天猫供应链");
obj5.setName("刘二");
obj5.setTel("6512727");
obj5.setMobile("13900001111");
obj5.setCarNo("浙A 11111");
obj5.setId("31111111111111");
obj2.setPickerInfo(obj5);
obj2.setShopCode("B002");
obj2.setPartnerCode("BP3123");
obj1.setDeliveryOrder(obj2);
List<AlibabaGscEelStockoutCreateRequest.OrderLine> list7 = new ArrayList<AlibabaGscEelStockoutCreateRequest.OrderLine>();
AlibabaGscEelStockoutCreateRequest.OrderLine obj8 = new AlibabaGscEelStockoutCreateRequest.OrderLine();
list7.add(obj8);
obj8.setOutBizCode("abc");
obj8.setOrderLineNo("0");
obj8.setOwnerCode("31323000");
obj8.setItemId("600011111");
obj8.setItemName("abc");
obj8.setItemCode("SP11000");
obj8.setInventoryType("ZP");
obj8.setPlanQty("0");
obj8.setProductDate("2019-11-11");
obj8.setExpireDate("2019-11-11");
obj8.setBatchCode("2019-11-11");
obj8.setProduceCode("2019-11-11");
obj1.setOrderLines(list7);
obj1.setKey("123456789");
obj1.setClient("1");
req.setStockoutCreateRequest(obj1);
AlibabaGscEelStockoutCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_gsc_eel_stockout_create_response>
    <stockout_create_response>
        <code>0</code>
        <message>abc</message>
        <flag>success</flag>
        <delivery_order_id>LBX0128153767249504</delivery_order_id>
    </stockout_create_response>
</alibaba_gsc_eel_stockout_create_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

返回
顶部