【新增入库通知单】接口

一、说明

主要用于第三方系统将其相关入库的申请单,通过调用AI-WMS PLUS的【新增入库通知单】接口,从而生成AI-WMS PLUS系统的【入库通知单】。

注:如果同一张来源申请单表身货品的仓库不同,则须按仓库分开产生多张【入库通知单】,即分多次调【新增入库通知单】接口。

二、参数说明

1、请求方式

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

2、header参数

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

3、请求参数

  字段 字段名 字段类型 长度 必填 说明
表头
oth_task_id 第三方任务单号 string 100 唯一ID
ref_id 第三方系统标识 string 20 自定义一个系统标识,如T8
entry_order_date 通知单日期 datatime 单据日期,精确到日
request_id 申请单ID string 10 申请单单据别,如无,则可不填;
request_code 申请单号 string 100 唯一单号
warehouse_code 仓库编码 string 30 仓库代号
owner_code 货主编码 string 30 未启用货主编码时,则固定传入OWNER;
order_type 业务类型 string 10 提供类型如下:
01=进货入库,02=暂估入库,03=销货退回入库,04=自制产品入库,05=托外加工入库,06=生产退料入库,07=托工退料入库,08=库存调拨入库,09=非生产退料入库,10=报废入库,11=其他入库;
expect_start_time 预期到货时间 datatime 即预交日期,精确到日
department 部门 string 30
bill_type 单据类别 string 10
supplier_code 供应商代号 string 30 厂商代号
supplier_name 供应商名称 string 100 厂商名称
operate_time 操作时间 datatime 制单时间,精确到秒
operator_code 操作员编码 string 30 制单人
last_modified_date 最近修改时间 datatime
remark 备注 string
totalorder_lines 单据总行数 int
extend_props 扩展属性
表身
item_code 货品代号 string 50 货品代号
item_name 货品名称 string 160 货品名称
sku_property 特征 string 255 货品特征值
batch_code 批号 string 40 批号
qty 数量 float 数量
qty1 数量(副) float 数量(副)
rem 备注 string
request_id 申请单ID string 10 即ERP申请单ID,如无,可不填;
request_code 申请单号 string 100 即ERP申请单号,与表头必须一致;
request_itm 申请单项次 String 100 即ERP申请单的转单唯一项次;
source_bilid 业务单 ID string 10 即申请单的来源单ID
source_bilno 业务单号 string 100 即申请单的来源单号;
source_bilitm 业务单项次 String 100 即申请单对应来源单的项次
extend_props 扩展属性

4、返回参数

  字段 字段名 字段类型 长度 说明
code 成功标识 string 10 返回0则表示成功,其他则为失败
message 返回信息 string 200
oth_task_id 第三方任务ID string 100
request_id 来源申请ID string 10
request_code 来源申请单号 string 100
warehouse_code 来源单仓库代号 string 30
entry_order_code WMS入库通知单号 string 100

三、请求JSON范例

{
    "entry_order":
    {
        "oth_task_id":"{{$guid}}",    //必填,第三方任务单号
        "ref_id":"SUNLIKE ERP",     //必填,第三方系统标识
        "entry_order_date":"2023-03-01",     //必填,通知单日期
        "request_id":"TI",        //申请单 ID
        "request_code":"TI33010001",        //必填,申请单号
        "warehouse_code":"A",      //必填,仓库编码
        "owner_code":"OWNER",      //必填,货主编码
        "order_type":"01",       //必填,业务类型
        "expect_start_time":"2023-03-02",       //必填,预期到货时间
        "department":"00000000",       //必填,部门
        "bill_type":"",       //单据类别
        "supplier_code":"SUP01",       //供应商代号
        "supplier_name":"厂商SUP01",       //供应商名称
        "operate_time":"2023/03/01 15:45:32",       //操作时间
        "operator_code":"ADMIN",       //操作员编码
        "last_modified_date":"2023/03/01 15:45:32",       //最近修改时间
        "remark":"",       //备注
        "totalorder_lines":"",       //单据总行数
        "extend_props":{}       //扩展属性
}, 
"order_lines":
[
    {
    "item_code":"P001",        //必填,货品代号
    "item_name":"P001货品P",        //必填,货品名称
    "sku_property":"",        //货品特征值
    "batch_code":"23010101",        //批号
    "qty":100,        //必填,数量
    "qty1":0,        //数量(副)
    "rem":"",        //备注
    "request_id":"TI",        //必填,申请单ID
    "request_code":"TI33010001",        //必填,申请单号
    "request_itm":"1",        //必填,申请单项次
    "source_bilid":"PO",        //业务单ID
    "source_bilno":"PO33010001",        //业务单号
    "source_bilitm":"1",        //业务单项次
    "extend_props":{}        //扩展属性
     }
]
}

四、返回JSON范例

{
"code": 0,
"message": "新增成功",
"oth_task_id": "8042cc34-2243-4156-8bef-54252c9b89d6",
"request_id": "TI",
"request_code": "TI33010001",
"warehouse_code": "A",
"entry_order_code": "UO230301000001"
}

分类目录