【新增储位上架单】接口

一、说明

主要用于第三方系统将其相关上架储位的数据推送给AI-WMS PLUS,因此可通过调用AI-WMS PLUS的【新增储位上架单】接口,从而生成AI-WMS PLUS系统的【储位上架单】。

支持按货品信息生成,或按模拟扫描条码生成。

二、参数说明

1、请求方式

请求方式 POST
接口地址 http://服务器IP或机器名或域名/WMS/API/SYS/CreateStorageUpShelf
格式 JSON
编码类型 UTF-8

2、header参数

KEY VALUE
Content-Type application/json
Authorization token值 说明:授权接口所获取的值

3、请求参数

字段代号 字段名称 字段类型 长度 必填 备注
inventory_profit<表头>
ref_id 第三方系统标识 String 20 是 自定义一个系统标识,如MES
oth_task_id 第三方任务单号 String 100 是 任务唯一ID
generate_mode 生成单据方式 String 10 是 1.按货品信息生成
2.模拟条码扫码生成
owner_code 货主编码 String 30   未启用货主编码时,则固定传入OWNER
bill_date 单据日期 Datatime   是 单据日期,精确到日
warehouse_code 仓库编码 String 30 是  
department 部门代号 String 30 是  
operator_code 制单人 String 30 是  
operate_time 制单时间 Datatime   是 制单时间,精确到秒
remark 备注 String      
total_order_lines 单据总行数 int      
extend_props 扩展属性 String      
order_lines<表身明细,当“生成单据方式”=1按货品信息生成,则按下面参数赋值>
item_code 货品代号 String 50 是  
item_name 货品名称 String 160 是  
sku_property 货品特征 String 255    
batch_code 批号 String 40    
storage_code 储位代号 String 60 是  
qty 数量 Float   是  
qty1 数量(副) Float      
remark 备注 String      
extend_props 扩展属性 String      
order_lines<表身明细,当“生成单据方式”=2模拟条码扫码生成,则按下面参数赋值>
barcode 条码 String 80 是 需带前缀
storage_code 储位代号 String 60 是  
qty 数量 Float   是  
qty1 数量(副) Float      

4、返回参数

字段代号 字段名称 字段类型 长度 备注
code 处理结果 String 10 0视为成功,其他视为失败
message 处理说明 String 200  
oth_task_id 第三方任务 ID String 100  
inventory_profit_code WMS储位上架单号 String 100  

三、请求JSON范例

范例一:按货品信息生成

{
    “inventory_profit”: {
        “ref_id”: “SKE”, //第三方系统标识,必填
        “oth_task_id”: “{{$guid}}“, //第三方任务单号,唯一值,必填
        “generate_mode”: “1”,  //产生方式:1.货品信息,2.条码方式
        “bill_date”: “{{YMD}}“, //单据日期,必填
        “owner_code”: “OWNER”, //货主编码
        “warehouse_code”: “SKE-P1”, //仓库编码,必填
        “department”: “00000000”, //部门,必填
        “operator_code”: “1001”, //制单人,必填
        “operate_time”: “{{DATA}}“, //制单时间,必填
        “remark”: “表头备注信息栏位”, //备注
        “total_order_lines”: “2”, //单据总行数
        “extend_props”: {} //扩展属性
    },
    “order_lines”: [
        {
            “item_code”: “2001”, //货品代号,必填
            “item_name”: “货品2001”, //货品名称,必填
            “sku_property”: “”, //货品特征
            “batch_code”: “”, //批号
            “storage_code”: “SKE-P1-01-01-01”,   //储位代号
            “qty”: 10, //数量,必填
            “qty1”: 0, //数量(副)
            “remark”: “test”, //备注
            “extend_props”: {} //扩展属性
        },
        {
            “item_code”: “2002”, //货品代号,必填
            “item_name”: “货品2002”, //货品名称,必填
            “sku_property”: “”, //货品特征
            “batch_code”: “”, //批号
            “storage_code”: “SKE-P1-01-01-02”,    //储位代号
            “qty”: 30, //数量,必填
            “qty1”: 0, //数量(副)
            “remark”: “test”, //备注
            “extend_props”: {} //扩展属性
        }
    ]
}

范例二:按模拟扫描条码生成

{
    “inventory_profit”: {
        “ref_id”: “SKE”, //第三方系统标识,必填
        “oth_task_id”: “{{$guid}}“, //第三方任务单号,唯一值,必填
        “generate_mode”: “2”,  //产生方式:1.货品信息,2.条码方式
        “bill_date”: “{{YMD}}“, //单据日期,必填
        “owner_code”: “OWNER”, //货主编码
        “warehouse_code”: “SKE-P1”, //仓库编码,必填
        “department”: “00000000”, //部门,必填
        “operator_code”: “1001”, //制单人,必填
        “operate_time”: “{{DATA}}“, //制单时间,必填
        “remark”: “表头备注信息栏位”, //备注
        “total_order_lines”: “2”, //单据总行数
        “extend_props”: {} //扩展属性
    },
    “order_lines”: [
        {
            “barcode”: “@BB100125082901001”, //条码,需要带前缀
            “storage_code”: “SKE-P1-01-01-01”,   //储位代号
            “qty”: 10, //数量,必填
            “qty1”: 0 //数量(副)
        },
        {
            “barcode”: “@BB100125082901002”, //条码,需要带前缀
            “storage_code”: “SKE-P1-01-01-01”,   //储位代号
            “qty”: 10, //数量,必填
            “qty1”: 0 //数量(副)
        }
    ]
}

四、返回JSON范例

{
    “inventory_profit_code”: “WU250829000001”,
    “code”: 0,
    “message”: “新增成功”,
    “oth_task_id”: “6494afc5-d0ee-4d5b-9897-56397d9789f2”
}