Skip to content

创建调拨单

Frequency
Real time

请求地址

  • API
环境URL
测试https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/csp/ali_inventory_transfer_order
正式https://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/csp/ali_inventory_transfer_order

请求参数

字段类型必填长度示例描述
source_systemStringY20LCFC数据来源系统
transaction_idStringY64Inspur101_Create_Transfer_20240603001幂等号,接⼝保证同⼀幂等号多次调⽤只会创建⼀次单据,并返回相同的响应值
source_numberStringY64Inspur101_Move_20240603001发起本次调拨的来源单据号
biz_scenesStringY64inventoryTransfer调拨场景,枚举值值列表为: rtReceipt (RT签收),opoTransfer (OPO调拨), inventoryTransfer (库存转移)
transfer_typeStringY64organization_transfer枚举值值列表: organization_transfer(组织调拨), sub_transfer(⼦库转移)
creator_nameStringY32Inspur创建单据的来源名称
expect_arrive_dateDateY2024-06-03期望到货⽇期,表明预期的到货时间
source_organizationStringY64Inspur101来源组织编码
source_sub_organizationStringY64INSPUR_CO01来源⼦组织编码
target_organizationStringY64Inspur102⽬的组织编码
target_sub_organizationStringY64INSPUR102_CO01⽬的⼦组织编码
auto_asnIntegerN0是否⾃动发货: 0⾮⾃动发货, 1⾃动发货
remarkStringN64调拨单备注备注信息
extends_mapMapN扩展信息
linesList<TransferLineCreateDTO>Y调拨⾏信息

TransferLineCreateDTO 结构

字段类型父类型必填长度示例描述
line_noStringTransferInventoryCreateDTOY641⾏号
mpnStringTransferInventoryCreateDTON128E5-2683V3MPNMPN/FixBom两个值⼆选⼀只能传递⼀个
fixBomStringTransferInventoryCreateDTON1287DH7002QCN-F78M2T1FixBomMPN/FixBom两个值⼆选⼀只能传递⼀个
quantityIntegerTransferInventoryCreateDTOY20调拨数量
extends_mapMapTransferInventoryCreateDTON扩展信息
ship_goods_listList<ShipGoodsCreateDTO>TransferInventoryCreateDTON调拨设备清单
from_warehouse_locationStringTransferLineCreateDTOY128original来源箱区枚举值: original (原箱区), mix (混箱区)
to_warehouse_locationStringTransferLineCreateDTOY128original⽬的箱区枚举值: original (原箱区), mix (混箱区)

ShipGoodsCreateDTO 结构

字段类型父类型必填长度示例描述
sku_typeStringTransferLineCreateDTOY64BOX设备类型枚举值列表: BOX (箱包), SN (SN)
sku_codeStringTransferLineCreateDTOY64CTN-91152845-000838箱包的编码或SN的编码全局唯⼀
warehouse_locationStringTransferLineCreateDTOY128original箱区枚举值: original (原箱区), mix (混箱区)
quantityIntegerTransferLineCreateDTOY1箱包数量或SN数量: 当SkuType为BOX时表示箱⼦的数量,箱包数量固定为1,当SkuType为SN时表示SN的数量,SN数量固定为1
specificationIntegerTransferLineCreateDTON20箱包的规格: 当SkuType为BOX时必填,表示⼀箱中有多少个
childrenShipGoodsCreateDTOShipGoodsCreateDTON⼦设备信息

响应参数

参数必填类型定义描述
codeYString状态码"0"代表成功,其他失败可参考返回码
msgNString提示消息非"0"时,会提示错误消息
resultNTransferCreateResultDTO数据体

TransferCreateResultDTO 结构

字段类型父类型必填长度示例描述
transfer_numberStringTransferCreateResultDTOY128TR202406030001调拨单号
plan_delivery_orderStringTransferCreateResultDTOY128PDO202406030001计划发货单号
atd_numberStringTransferCreateResultDTON128ATD20240603001实际发货单号: 当参数中auto_asn=1时,该值有返回

请求示例

json
{
  "batch_id": "90397",
  "batch_size": 1,
  "seq_id": "1",
  "seq_size": 1,
  "data": [
    {
        "source_system": "LCFC",
        "transaction_id": "Inspur101_Create_Transfer_20240603001",
        "source_number": "Inspur101_Move_20240603001",
        "biz_scenes": "inventoryTransfer",
        "transfer_type": "organization_transfer",
        "creator_name": "Inspur",
        "expect_arrive_date": "2024-06-03",
        "source_organization": "Inspur101",
        "source_sub_organization": "Inspur101_CO01",
        "target_organization": "Inspur102",
        "target_sub_organization": "Inspur102_CO01",
        "auto_asn": 1,
        "remark": "调拨单备注",
        "extends_map": {},
        "lines": [
          {
            "line_no": "1",
            "mpn": "8163A",
            "fixBom": "7DH7002QCN-F78M2T1",
            "quantity": "20",
            "extends_map": {},
            "from_warehouse_location": "original",
            "to_warehouse_location": "original",
            "ship_goods_list": [
              {
                "sku_type": "BOX",
                "sku_code": "IMAFQ0001",
                "quantity": 1,
                "warehouse_location": "original",
                "specification": 10
              }, 
              {
                "sku_type": "BOX",
                "sku_code": "IMAFQ0002",
                "quantity": 1,
                "warehouse_location": "original",
                "specification": 10
            }]
          },
          {
            "line_no": "2",
            "mpn": "8164B",
            "quantity": "3",
            "from_warehouse_location": "mix",
            "to_warehouse_location": "mix",
            "ship_goods_list": [{

                "sku_type": "BOX",
                "sku_code": "MIX20240810001",
                "quantity": 3,
                "warehouse_location": "mix",
                "children": [{
                    "sku_type": "SN",
                    "sku_code": "SN001",
                    "warehouse_location": "mix",
                    "quantity": 1
                }, {
                    "sku_type": "SN",
                    "sku_code": "SN002",
                    "warehouse_location": "mix",
                    "quantity": 1
                }, {
                    "sku_type": "SN",
                    "sku_code": "SN003",
                    "warehouse_location": "mix",
                    "quantity": 1
                }]
            }]
          }, 
          {
            "line_no": "3",
            "mpn": "8164B",
            "quantity": "2",
            "from_warehouse_location": "original",
            "to_warehouse_location": "mix",
            "ship_goods_list": [{
                "sku_type": "BOX",
                "sku_code": "IMAFQ0003",
                "quantity": 2,
                "warehouse_location": "original",
                "children": [{
                    "sku_type": "SN",
                    "sku_code": "SN004",
                    "warehouse_location": "mix",
                    "quantity": 1
                }, {
                    "sku_type": "SN",
                    "sku_code": "SN005",
                    "warehouse_location": "mix",
                    "quantity": 1
                }]

            }]
          },
          {
            "line_no": "4",
            "mpn": "8164B",
            "quantity": "2",
            "from_warehouse_location": "mix",
            "to_warehouse_location": "original",
            "ship_goods_list": [{
                "sku_type": "BOX",
                "sku_code": "IMAFQ0004",
                "quantity": 2,
                "warehouse_location": "original",
                "children": [{
                    "sku_type": "SN",
                    "sku_code": "SN006",
                    "warehouse_location": "mix",
                    "quantity": 1
                }, {
                    "sku_type": "SN",
                    "sku_code": "SN007",
                    "warehouse_location": "mix",
                    "quantity": 1
                }]
            }]
            }
        ]
    }
  ]
}

成功响应示例

json
{
  "code":"0",
  "msg":"request success",
  "result": {
    "transfer_number": "TR202406030001",
    "plan_delivery_order": "PDO202406030001",
    "atd_number": "ATD20240603001"
  }
}

异常响应示例

json
{
  "code": "-1",
  "msg": "system error!"
}