编辑 | blame | 历史 | 原始文档

添加物料信息

  • 接口说明: 添加物料信息
  • 接口地址: /api/createMat

请求参数

参数名称 类型 出现要求 描述
Header   必填 请求报文头
 appkey string 必填 密钥管理中生成appkey
Body   必填  
 mats array
  matnr string 必填 物料编号
  maktx string 可选 物料名称
  firstTag string 可选 一级分类
  secondTag string 可选 二级分类
  name string 可选 物料别名
  specs string 可选 规格
  status int 可选 状态{0:禁用,1:正常}
  memo string 可选 备注
  mainHost string 可选 主要仓库
  mainSource string 可选 主要来源
  barcode string 可选 条码
  cyclePickCode string 可选 循环盘点码
  locationStock string 可选 存放位置
  material string 可选 材质
  model double 可选 机型
  decrees string 可选 制令
  weight string 可选 重量
  imgNum string 可选 图号
  purchasingUnits string 可选 采购单位
  processNumber string 可选 工艺编号
  bom string 可选 指定bom
  safeNum string 可选 安全存量
  miniCount string 可选 最低补量
  replenishmentNum string 可选 补货倍量
  tmp1 string 可选 自定义1
  tmp2 string 可选 自定义2
  tmp3 string 可选 自定义3
  restockDemand string 可选 按需求补货
  lapse string 可选 失效
  shortcuts string 可选 快捷码
  units string 可选 计量单位
  length string 可选 长度
  width string 可选 宽度
  height string 可选 高度
  accountingClass string 可选 会计分类
  batch string 可选 批号管理
  inventoryAccount string 可选 存货核算
  shopCategory string 可选 商品分类
 sign string 可选 签名

请求示例:

{
    "Header":{
        "appkey":"6cfb9f11935b4d0e1740f41598970c97",
    },
    "Body":{
	    "mats": [
	        {
	            "firstTag": "测试二级分类1",
	            "secondTag": "测试三级分类1",
	            "matnr": "test001",
	            "maktx": "测试物料1",
	            "name": "",
	            "specs": "",
	            "model": "",
	            "color": "",
	            "brand": "",
	            "unit": "",
	            "price": "",
	            "sku": "",
	            "units": "",
	            "barcode": "",
	            "origin": "",
	            "manu": "",
	            "manuDate": "",
	            "itemNum": "",
	            "weight": "",
	            "length": "",
	            "volume": "",
	            "threeCode": "",
	            "supp": "",
	            "suppCode": "",
	            "deadTime": "",
	            "status": 1,
	            "memo": ""
	        },
	        {
	            "firstTag": "测试二级分类1",
	            "secondTag": "测试三级分类1",
	            "matnr": "test002",
	            "maktx": "测试物料2",
	            "name": "",
	            "specs": "",
	            "model": "",
	            "color": "",
	            "brand": "",
	            "unit": "",
	            "price": "",
	            "sku": "",
	            "units": "",
	            "barcode": "",
	            "origin": "",
	            "manu": "",
	            "manuDate": "",
	            "itemNum": "",
	            "weight": "",
	            "length": "",
	            "volume": "",
	            "threeCode": "",
	            "supp": "",
	            "suppCode": "",
	            "deadTime": "",
	            "status": 1,
	            "memo": ""
	        }
	    ],
	    "sign": "8a7036cfe218e12f50f9107e9eb4a437"
    }
}

返回结果

参数名称 类型 出现要求 描述
code int 必填 响应码,代码定义请见“附录A 响应吗说明”
msg string 必填  
data object 可选 返回添加成功的物料数量

示例:

{
    "msg": "操作成功",
    "code": 200,
    "data": 2
}

附录A 响应码说明

响应码 说明
200 处理成功
500 系统内部错误