# 基础数据-产品 api
# 创建产品
接口描述: 创建产品
接口地址:/api/metadata-flow/trigger/webhook/9e8db5c4-6374-489c-abf3-5382cfc6d33d
请求方式:POST
consumes:["application/json"]
produces:["*/*"]
请求示例:
{
"productCode": "B-20221202-001",
"productName": "新核云CorePaas",
"category": "分类编号",
"spec": "规格编号",
"defaultSalesPrice": 200.88,
"basicUnit": "单位编号",
"supplier": "供应商编号",
"productType": "半成品",
"maxStock": 100,
"minStock": 100,
"safeStock": 100,
"currentStock": 100,
"businessScope": [
"销售",
"采购"
],
"exwarehousePrice": 120.88,
"exwarehouseCount": 100,
"exwarehouseMoney": 120.88,
"inwarehouseCount": 100,
"inwarehouseMoney": 120.88,
"boundProduct": "6385e65b7ec61f4ef9853bf7",
"specContent": "规格文本字段",
"unitContent": "单位文本字段",
"warehouseMoney": 120.88,
"inwarehousePrice": 120.88,
"defaultWarehouse": "仓库编号"
}
请求参数:
参数名称 | 参数说明 | 是否必须 | 数据类型 | 参考值 |
---|---|---|---|---|
productCode | 产品编号 | true | string | B-20221202-001 |
productName | 产品名称 | true | string | 新核云CorePaas |
category | 分类(关联分类的编号) | true | string | |
spec | 规格(关联规格的编号) | true | string | |
defaultSalesPrice | 默认销售价格 | false | number | 120.88 |
basicUnit | 基本单位(关联单位的编号) | true | string | |
supplier | 供应商(关联供应商的编号) | false | string | |
productType | 产品类别,可选值 产品/半成品/原料 | true | string | 半成品 |
maxStock | 最大库存 | false | number | 120.88 |
minStock | 最小库存 | false | number | 120.88 |
safeStock | 安全库存 | false | number | 120.88 |
currentStock | 当前库存 | false | number | 120.88 |
businessScope | 业务范围,可选值 销售/采购/生产 | true | array[string] | |
exwarehousePrice | 出库单位价 | false | number | 120.88 |
exwarehouseCount | 出库总数 | false | number | 120.88 |
exwarehouseMoney | 出库总价 | false | number | 120.88 |
inwarehouseCount | 入库总数 | false | number | 120.88 |
inwarehouseMoney | 入库总价 | false | number | 120.88 |
specContent | 规格文本字段 | false | string | |
unitContent | 单位文本字段 | false | string | |
warehouseMoney | 库存总价 | false | number | 120.88 |
inwarehousePrice | 入库单价 | false | number | 120.88 |
defaultWarehouse | 默认仓库(关联仓库的编号) | false | string |
响应示例:
{
"code": 200,
"cpsErrorCode": "",
"message": ""
}
响应参数:
参数名称 | 参数说明 | 类型 |
---|---|---|
code | 响应码 | integer |
cpsErrorCode | CPS错误码 | string |
message | 错误信息 | string |
响应状态:
状态码 | 说明 |
---|---|
200 | success |
其他 | error |