免费体验

核货宝供应链管理系统

演示平台 演示地址 账号密码
系统后台 http://b2b.hehuobao.net/admin 联系客服
电脑端 http://b2b.hehuobao.net 联系客服
移动端 客户专属价格,随时随地下单

新增普通商品(adminapi/goods/add)

请求参数

						{
						    "token":"apiKey-必填",
						    "goodsName": "商品名称-必填",
						    "brandId": "品牌id-可选",
						    "goodsImg": "商品主图相对路径,通过uploadImg接口获取-必填",
						    "goodsVideo": "商品视频-可选",
						    "goodsSn": "商品编号-必填",
						    "productNo": "产品货号-必填",
						    "marketPrice": "市场价-必填",
						    "goodsPrice": "商品价-必填",
						    "isPifa": "是否为批发商品 1:是 0:否 - 必填",
						    "pifaNum": "当isPifa=1时,该值表示添加的批发项目数",
						    "buyNum_0": "批发起始数量,当isPifa=1时,必填",
						    "rebate_0": "达到起始数量后立减的价格,当isPifa=1时,必填",
						    "goodsUnit": "商品单位-必填",
						    "minOrder": "起订量-必填,为0标表示不设置起订量",
						    "goodsWeight": "商品重量-必填",
						    "goodsVolume": "商品体积-必填",
						    "sysShippingFeeType": "运费计价方式-必填,1:按件 2:按重量 3:按体积",
						    "expDays": "保质期(天),商品分类类型为“快消品”时,该值不为空",
						    "goodsSeoKeywords": "seo关键字-可选",
						    "goodsSeoDesc": "seo描述-可选",
						    "goodsTips": "商品促销信息-可选",
						    "isSale": "系统是否上架 1:是 0:否 - 必填",
						    "isDepotSale": "仓库上架状态 1:默认上架 0:手动上架 - 必填",
						    "isRecom": "是否设置为推荐商品 1:是 0:否 - 可选",
						    "isBest": "是否设置为精品 1:是 0:否 - 可选",
						    "isNew": "是否设置为新品 1:是 0:否 - 可选",
						    "isHot": "是否设置为热销商品 1:是 0:否 - 可选",
						    "goodsDesc": "商品描述-必填",
						    "goodsCatId": "最后一级商品分类id-必填",
						    "gallery": "商品相册-可选"
						}
					

mock数据

						{
						    "goodsId": "0",
						    "goodsName": "新增普通商品",
						    "brandId": "",
						    "goodsImg": "upload/goods/2022-12/63aa4e7896e10.png",
						    "goodsVideo": "",
						    "goodsSn": "167210312695407",
						    "productNo": "167210312695407",
						    "marketPrice": "99",
						    "goodsPrice": "88",
						    "isPifa": "0",
						    "pifaNum": "0",
						    "goodsUnit": "台",
						    "minOrder": "0",
						    "goodsWeight": "7",
						    "goodsVolume": "7",
						    "sysShippingFeeType": "2",
						    "expDays": "10",
						    "goodsSeoKeywords": "SEO关键字",
						    "goodsSeoDesc": "SEO描述",
						    "goodsTips": "商品促销信息",
						    "isSale": "1",
						    "isDepotSale": "1",
						    "isRecom": "",
						    "isBest": "",
						    "isNew": "",
						    "isHot": "",
						    "goodsDesc": "商品描述内容商品描述内容商品描述内容商品描述内容商品描述内容",
						    "goodsCatId": "45",
						    "gallery": ""
						}
					

返回值

						{
						    "status": 1,
						    "msg": "新增成功",
						    "data": {
						        "id": "商品id"
						    }
						}
					

修改商品(adminapi/goods/edit)

请求参数

						{
						    "token":"apiKey-必填",
						    "goodsId":"商品id-必填",
						    "goodsName": "商品名称-必填",
						    "brandId": "品牌id-可选",
						    "goodsImg": "商品主图相对路径,通过uploadImg接口获取-必填",
						    "goodsVideo": "商品视频-可选",
						    "goodsSn": "商品编号-必填",
						    "productNo": "产品货号-必填",
						    "marketPrice": "市场价-必填",
						    "goodsPrice": "商品价-必填",
						    "isPifa": "是否为批发商品 1:是 0:否 - 必填",
						    "pifaNum": "当isPifa=1时,该值表示添加的批发项目数",
						    "buyNum_0": "批发起始数量,当isPifa=1时,必填",
						    "rebate_0": "达到起始数量后立减的价格,当isPifa=1时,必填",
						    "goodsUnit": "商品单位-必填",
						    "minOrder": "起订量-必填,为0标表示不设置起订量",
						    "goodsWeight": "商品重量-必填",
						    "goodsVolume": "商品体积-必填",
						    "sysShippingFeeType": "运费计价方式-必填,1:按件 2:按重量 3:按体积",
						    "expDays": "保质期(天),商品分类类型为“快消品”时,该值不为空",
						    "goodsSeoKeywords": "seo关键字-可选",
						    "goodsSeoDesc": "seo描述-可选",
						    "goodsTips": "商品促销信息-可选",
						    "isSale": "系统是否上架 1:是 0:否 - 必填",
						    "isDepotSale": "仓库上架状态 1:默认上架 0:手动上架 - 必填",
						    "isRecom": "是否设置为推荐商品 1:是 0:否 - 可选",
						    "isBest": "是否设置为精品 1:是 0:否 - 可选",
						    "isNew": "是否设置为新品 1:是 0:否 - 可选",
						    "isHot": "是否设置为热销商品 1:是 0:否 - 可选",
						    "goodsDesc": "商品描述-必填",
						    "goodsCatId": "最后一级商品分类id-必填",
						    "gallery": "商品相册-可选"
						}
					

返回值

						{
						    "status": 1,
						    "msg": "编辑成功",
						    "data": {
						        "id": "商品id"
						    }
						}
					

商品出库/入库(POST)(adminapi/goods/editStock)

销售规格id可以通过adminapi/goods/getById接口获取(返回值中的saleSpec数组下的id)

请求参数(多规格)

						{
						  "token":"apiKey-必填",
						  "goodsId": "商品id-必填",
						  "depotId":"仓库id-必填",
						  "stockType_xx": "出/入库类型-必填(xx为销售规格ID)(1:入库 -1出库)",
						  "stockQty_xx": "出/入库量数-必填(xx为销售规格ID)",
						  "manufactureDate_xx": "生产日期-(入库-必填)(xx为销售规格ID)"
						}
					

mock数据

						{
						  "token":"apiKey-必填",
						  "goodsId": "130",
						  "depotId":"63",
						  "stockType_226": "1",
						  "stockQty_226": "1",
						  "manufactureDate_226": "2022-12-27"
						}
					

请求参数(无规格)

						{
						  "goodsId": "商品id-必填",
						  "depotId":"仓库id-必填",
						  "stockType": "出/入库类型-必填(1:入库 -1出库)",
						  "stockQty": "出/入库量数-必填",
						  "manufactureDate": "生产日期-商品类型为快消品-必填,例如:2022-12-27"
						}
					

mock数据

						{
						    "goodsId": 131,
						    "depotId": 63,
						    "stockType": 1,
						    "manufactureDate": "2022-12-27",
						    "stockQty": 11
						}
					

返回值

						{
						    "status": 1,
						    "msg": "操作成功"
						}
					

查询商品(adminapi/goods/getById)

请求参数

						{
						    "token":"apiKey-必填",
						    "id": "商品id-必填"
						}
					

返回值

						{
						    "status": "接口请求状态。1:成功  -1:失败",
						    "msg": "返回信息",
						    "data": {
						        "goodsId": "商品ID",
						        "goodsSn": "商品编号",
						        "productNo": "商品货号",
						        "goodsName": "商品名称",
						        "goodsImg": "商品图片",
						        "goodsType": "0:普通商品 1:快消品",
						        "marketPrice": "市场价",
						        "goodsPrice": "商品价格",
						        "goodsStock": "商品库存数",
						        "goodsUnit": "商品单位",
						        "goodsTips": "商品促销信息",
						        "isSale": "是否上架(1:是 0:否)",
						        "isBest": "是否精品(1:是 0:否)",
						        "isHot": "是否热销(1:是 0:否)",
						        "isNew": "是否新品(1:是 0:否)",
						        "isRecom": "是否推荐(1:是 0:否)",
						        "goodsCatIdPath": "商品分类ID路径",
						        "goodsCatId1": "商品分类ID",
						        "goodsCatId": "商品分类ID",
						        "brandId": "品牌ID",
						        "goodsDesc": "商品描述",
						        "saleNum": "销量",
						        "saleTime": "上架时间",
						        "visitNum": "访问量",
						        "appraiseNum": "评价数",
						        "isSpec": "是否多规格(1:是 0:否)",
						        "gallery": ["商品相册"],
						        "goodsSeoKeywords": "SEO关键字",
						        "dataFlag": "有效状态,1:有效 -1:无效",
						        "createTime": "数据创建时间",
						        "goodsSerachKeywords": "商品搜索关键字",
						        "goodsVideo": "视频",
						        "goodsVideoThumb": "视频缩略图",
						        "goodsSeoDesc": "SEO描述",
						        "goodsWeight": "重量",
						        "goodsVolume": "体积",
						        "manufactureDate": "生产日期",
						        "buyDate": "进货日期",
						        "qualityDays": "保质期",
						        "completeStatus": "商品资料是否完整标识(1:完整,0:不完整)",
						        "expDays": "保质期",
						        "bakGoodsName": "备份商品名称",
						        "bakGoodsImg": "备份商品图片",
						        "bakGoodsSn": "备份商品编辑",
						        "bakProductNo": "备份商品货号",
						        "goodsSrc": "商品来源",
						        "isPifa": "0:未设置批发 1:批发商品",
						        "minOrder": "起订量",
						        "preGoodsStock": "预出库数量",
						        "sysShippingFeeType": "运费计价方式(1:按件 2:按重量 3:按体积)",
						        "spec0": [
						            {
						                "isAllowImg": "是否允许上传图片1:是 0:否",
						                "catId": " 规格id ",
						                "itemId": " 规格项id ",
						                "itemName": " 规格项名称 ",
						                "itemImg": " 规格图片 "
						            },
						        ],
						        "spec1": [
						            {
						                "isAllowImg": "是否允许上传图片1:是 0:否",
						                "catId": " 规格id ",
						                "itemId": " 规格项id ",
						                "itemName": " 规格项名称 ",
						                "itemImg": " 规格图片 "
						            }
						        ],
						        "saleSpec": [
						            {
						                "id": "销售规格id",
						                "isDefault": "是否为默认规格 0:否 1:是",
						                "productNo": "产品号",
						                "specIds": "212:213",
						                "marketPrice": "市场价",
						                "specPrice": "规格价格",
						                "specStock": "规格库存",
						                "saleNum": "规格销量",
						                "specWeight": "规格商品重量",
						                "specVolume": "规格商品体积"
						            }
						        ],
						        "attrs": [
						            {
						                "attrName": " 属性名称 ",
						                "attrVal": " 属性值 ",
						            }
						        ],
						        "packagings": [
						            {
						                "packagingUnit": "包装单位,例如:箱",
						                "packagingNum": "每件包装的数量"
						            }
						        ]
						    }
						}
					

删除商品(adminapi/goods/del)

请求参数

						{
						  "token":"apiKey-必填",
						  "ids":["商品id-必填", ...]
						}
					

返回值

						{
						    "status": 1,
						    "msg": "删除成功"
						}
					

上下架(adminapi/goods/isSale)

请求参数

						{
						  "token":"apiKey-必填",
						  "ids":["商品id-必填", ...],
						  "isSale":"0:下架 1:上架",
						}
					

返回值

						{
						    "status": 1,
						    "msg": "商品上架成功",
						    "data": {
						        "num": "成功上架数"
						    }
						}
					

根据商品分类获取规格属性(adminapi/goods/getSpecAttrs)

请求参数

						{
						  "token":"apiKey-必填",
						  "goodsCatId":"最后一级商品分类id"
						}
					

返回值

						{
						    "status": 1,
						    "msg": "",
						    "data": {
						        "spec0": {
						            "catId": "商品规格分类id",
						            "catName": "商品规格分类名称",
						            "isAllowImg": "此处恒定为1,spec0下的商品规格分类表示支持上传规格图片"
						        },
						        "spec1": [
						            {
						                "catId": "商品规格分类id",
						                "catName": "商品规格分类名称",
						                "isAllowImg": "此处恒定为0,spec1下的商品规格分类表示不支持上传规格图片"
						            }
						        ],
						        "attrs": [
						            {
						                "attrId": "商品属性id",
						                "attrName": "商品属性名称",
						                "attrType": "属性类型 0:输入框 1:多选项 2:下拉框",
						                "attrVal": "属性值,例如:属性选项1,属性选项2"
						            }
						        ]
						    }
						}
					

新增(编辑)规格商品(adminapi/goods/add、adminapi/goods/edit)

请求参数

						{
						    "token":"apiKey-必填",
						    "goodsId": "商品id-可选,请求edit接口时必填",
						    "goodsName": "商品名称-必填",
						    "brandId": "品牌id-可选;品牌与商品分类绑定,确保所选分类下存在品牌id",
						    "goodsImg": "商品主图相对路径,通过uploadImg接口上传图片后获取-必填",
						    "goodsVideo": "商品视频相对路径,通过uploadImg接口上传视频后获取-可选",
						    "goodsSn": "商品编号-必填",
						    "productNo": "产品货号-必填",
						    "marketPrice": "市场价-必填",
						    "goodsPrice": "商品价格-必填",
						    "isPifa": "是否为批发商品 1:是 0:否 - 必填",
						    "pifaNum": "当isPifa=1时,该值表示添加的批发项目数",
						    "buyNum_0": "批发起始数量,当isPifa=1时,必填",
						    "rebate_0": "达到起始数量后立减的价格,当isPifa=1时,必填",
						    "goodsUnit": "商品单位-必填",
						    "minOrder": "起订量-必填,为0标表示不设置起订量",
						    "goodsWeight": "商品重量-必填",
						    "goodsVolume": "商品体积-必填",
						    "sysShippingFeeType": "运费计价方式-必填,1:按件 2:按重量 3:按体积",
						    "goodsSeoKeywords": "SEO关键字-可选",
						    "goodsSeoDesc": "SEO描述-可选",
						    "goodsTips": "商品促销信息-可选",
						    "isSale": "系统是否上架 1:是 0:否 - 必填",
						    "isDepotSale": "仓库上架状态 1:默认上架 0:手动上架 - 必填",
						    "isRecom": "是否设置为推荐商品 1:是 0:否 - 可选",
						    "isBest": "是否设置为精品 1:是 0:否 - 可选",
						    "isNew": "是否设置为新品 1:是 0:否 - 可选",
						    "isHot": "是否设置为热销商品 1:是 0:否 - 可选",
						    "goodsDesc": "商品描述-必填",
						    "defaultSpec": "默认选中的规格,例如:11_0-12_1(字符串生成规则见下方规格商品补充说明)",
						    "productNo_17_0-18_1": "当前规格商品货号,例如:163894457786324-1",
						    "marketPrice_17_0-18_1": "当前规格商品市场价,例如:1999",
						    "specPrice_17_0-18_1": "当前规格商品店铺价,例如:1000",
						    "specWeight_17_0-18_1": "当前规格商品重量,例如:1",
						    "specVolume_17_0-18_1": "当前规格商品体积,例如:1",
						    "goodsCatId": "最后一级商品分类id-必填",
						    "specNum": "暂无用处",
						    "specName_17_0": "规格名称,例如:红色",
						    "specImg_17_0": "规格图片",
						    "specName_18_1": "规格名称,例如:16G",
						    "specImg_18_1": "",
						    "specsIds": "规格分类id键值组合后的字符串,例如11_0-12_1;多个字符串用,分割",
						    "specidsmap": "规格分类id键值组合后的字符串,例如:11_0-12_1;多个字符串用,分割",
						    "specmap": "",
						    "attr_2": "商品属性",
						    "gallery": "商品相册-可选,例如:upload/goods/2021-12/61b04f761d588.png,upload/goods/2021-12/61b04f761d589.png",
						    "packagingUnit": ["商品包装单位"],
						    "packagingNum": ["商品包装对应的最小单位数,例如1箱12件,12为packagingNum"]
						}
					

补充说明

新增商品规格前,需通过getSpecAttrs接口获取商品规格、属性

getSpecAttrs接口返回示例:

						{
						    "status": 1,
						    "msg": "",
						    "data": {
						        "spec0": {
						            "catId": 11,
						            "catName": "颜色",
						            "isAllowImg": 1
						        },
						        "spec1": [
						            {
						                "catId": 12,
						                "catName": "版本",
						                "isAllowImg": 0
						            }
						        ],
						        "attrs": [
						            {
						                "attrId": 1,
						                "attrName": "颜色",
						                "attrType": 2,
						                "attrVal": "白色,黑色"
						            }
						        ]
						    }
						}
					

假设根据getSpecAttrs接口返回的数据,在页面上生成如下表单

image-20211208175721843

"specName_11_0"生成规则

specName_规格分类id_第几个输入框(“颜色”的catId=11;上图"红色"为第0个输入框)

"specName_12_1"生成规则

specName_规格分类id_第几个输入框(“版本”的catId=12;上图"16G"为第1个输入框)

"11_0-12_1"字符串的生成规则

						{"defaultSpec":"11_0-12_1","specsIds": "11_0-12_1","specidsmap": ":11_0-12_1"}
						defaultSpec表示选中哪项为默认规格
						11、12值来源于商品规格分类id,可通过adminapi/goods/getSpecAttrs接口获取(返回示例见上方)
						0、1表示第几个输入框。
						​
						catId=11为的规格名称是“颜色”;catId=12的规格名称是“版本”;
						需要为商品设置上这两项规格组合,
						例如“红色、16G”这个规格,则需生成{"specName_11_0":"红色","specName_12_1":"16G"}
						组合后生成"11_0-12_1"
					

"11_0-12_1"字符串生成后,则将该字符串作为该规格组合的“市场价、销售价”等数据的键值的后缀,将"11_0-12_1"看做“后缀"

						"productNo_后缀": "当前规格商品货号,例如:163894457786324-1",
						"marketPrice_后缀": "当前规格商品市场价,例如:1999",
						"specPrice_后缀": "当前规格商品店铺价,例如:1000",
						"specStock_后缀": "当前规格商品库存,例如:1000",
						"warnStock_后缀": "当前规格商品预警库存,例如:1",
						"specWeight_后缀": "当前规格商品重量,例如:1",
						"specVolume_后缀": "当前规格商品体积,例如:1",
					

mock数据

						{
						    "token":"123456",
						    "goodsId": "0",
						    "goodsName": "测试新增商品",
						    "brandId": "1",
						    "goodsImg": "upload/goods/2022-12/63a9129e0cf08.png",
						    "goodsVideo": "",
						    "goodsSn": "0000000000127",
						    "productNo": "167202458232707",
						    "marketPrice": "1000.00",
						    "goodsPrice": "900.00",
						    "isPifa": "0",
						    "pifaNum": "0",
						    "goodsUnit": "箱",
						    "minOrder": "0",
						    "goodsWeight": "1.00",
						    "goodsVolume": "1.00",
						    "sysShippingFeeType": "1",
						    "goodsSeoKeywords": "SEO关键字",
						    "goodsSeoDesc": "SEO描述",
						    "goodsTips": "商品促销信息",
						    "isSale": "1",
						    "isRecom": "",
						    "isBest": "",
						    "isNew": "",
						    "isHot": "",
						    "goodsDesc": "这里是商品描述",
						    "defaultSpec": "17_0-18_2",
						    "productNo_17_0-18_2": "167202458232707-1",
						    "marketPrice_17_0-18_2": "1000.00",
						    "specPrice_17_0-18_2": "900.00",
						    "specWeight_17_0-18_2": "1.00",
						    "specVolume_17_0-18_2": "1.00",
						    "productNo_17_0-18_3": "167202458232707-2",
						    "marketPrice_17_0-18_3": "1000.00",
						    "specPrice_17_0-18_3": "900.00",
						    "specWeight_17_0-18_3": "1.00",
						    "specVolume_17_0-18_3": "1.00",
						    "productNo_17_1-18_2": "167202458232707-3",
						    "marketPrice_17_1-18_2": "1000.00",
						    "specPrice_17_1-18_2": "900.00",
						    "specWeight_17_1-18_2": "1.00",
						    "specVolume_17_1-18_2": "1.00",
						    "productNo_17_1-18_3": "167202458232707-4",
						    "marketPrice_17_1-18_3": "1000.00",
						    "specPrice_17_1-18_3": "900.00",
						    "specWeight_17_1-18_3": "1.00",
						    "specVolume_17_1-18_3": "1.00",
						    "goodsCatId": "65",
						    "specNum": "4",
						    "specName_17_0": "红",
						    "specImg_17_0": "",
						    "specName_17_1": "蓝",
						    "specImg_17_1": "",
						    "specName_18_2": "8G",
						    "specImg_18_2": "",
						    "specName_18_3": "12G",
						    "specImg_18_3": "",
						    "gallery": "upload/goods/2022-12/63a913031b580.jpg",
						    "specsIds": "17_0-18_2,17_0-18_3,17_1-18_2,17_1-18_3",
						    "specidsmap": "210:17_0-18_2,211:17_0-18_3,212:17_1-18_2,213:17_1-18_3",
						    "specmap": "192:17_0,193:18_2,194:18_3,195:17_1"
						}
					

返回值

						{
						    "status": 1,
						    "msg": "新增成功",
						    "data": {
						        "id": "商品id"
						    }
						}
					

获取仓库列表(adminapi/depots/pageQuery)

请求参数

						{
						    "token":"apiKey-必填",
						    "depotName":"仓库名称-选填",
						    "page":"页码-默认为1",
						    "limit":"每页条数-默认为15"
						}
					

返回值

						{
						    "total": "总条数",
						    "per_page": "每页显示条数",
						    "current_page": "当前页码",
						    "last_page": "最后一页页码",
						    "data": [
						        {
						            "depotId": "仓库id",
						            "depotName": "仓库名称",
						            "depotNo": "仓库编号",
						            "staffId": "仓库负责人职员ID",
						            "areaId": "仓库地区最后一级ID",
						            "areaIdPath": "仓库地区ID路径字符串",
						            "address": "仓库详细地址",
						            "depotStatus": "仓库状态 1:正常 0:停用",
						            "depotStatusDes": "仓库停用说明",
						            "createTime": "数据创建时间",
						            "dataFlag": "有效状态,1:有效 -1:无效",
						            "deliverAreaIds": "仓库配送范围地区ID字符串",
						            "staffName": "仓库负责人职员名称"
						        }
						    ]
						}
					

商品分类查询(adminapi/goodscats/listquery)

请求参数

						{
						    "token":"apiKey-必填",
						    "parentId": "父id,默认值为0"
						}
					

返回值

						{
						    "status": 1,
						    "msg": "",
						    "data": [
						        {
						            "catId": "分类id",
						            "parentId": "父id",
						            "catName": "分类名称",
						            "catSort": "分类排序号",
						            "catType": "商品分类类型 1:快消品 0:普通商品"
						        }
						    ]
						}
					

新增(adminapi/goodscats/add)

请求参数

						{
						    "token":"apiKey-必填",
						    "parentId": "分类父级id",
						    "catId": "分类id",
						    "catName": "分类名称-必填",
						    "catType": "分类类型 0:普通商品 1:快消品",
						    "catImg": "分类移动端图标",
						    "isShow": "是否显示 1:是 0:否",
						    "catSort": "分类排序号",
						    "id": "分类id"
						}
					

返回值

						{"status":1,"msg":"新增成功"}
					

修改(adminapi/goodscats/edit)

请求参数

						{
						    "token":"apiKey-必填",
						    "parentId": "分类父级id",
						    "catId": "分类id",
						    "catName": "分类名称-必填",
						    "catType": "分类类型 0:普通商品 1:快消品",
						    "catImg": "分类移动端图标",
						    "isShow": "是否显示 1:是 0:否",
						    "catSort": "分类排序号",
						    "id": "分类id"
						}
					

返回值

						{"status":1,"msg":"编辑成功"}
					

删除(adminapi/goodscats/del)

请求参数

						{
						  "token":"apiKey-必填",
						  "id": "商品分类id-必填"
						}
					

返回值

						{"status":1,"msg":"删除成功"}
					

获取商品规格分类列表(adminapi/speccats/pageQuery)

请求参数

						{
						    "token":"apiKey-必填",
						    "keyName":"规格名称-选填",
						    "goodsCatPath":"商品分类组成的字符串-选填",
						    "page":"页码-默认为1",
						    "limit":"每页条数-默认为15"
						}
					

返回值

						{
						    "total": "总条数",
						    "per_page": "每页显示条数",
						    "current_page": "当前页码",
						    "last_page": "最后一页页码",
						    "data": [
						        {
						            "catId": "规格id",
						            "catName": "规格名称",
						            "catSort": "规格排序",
						            "children": "为空",
						            "createTime": "创建时间",
						            "dataFlag": "有效状态,1:有效 -1:无效",
						            "goodsCatId": "最后一级商品分类id",
						            "goodsCatNames": "规格所属商品分类",
						            "goodsCatPath": "规格所属商品分类组成的字符串",
						            "id": "规格id",
						            "isAllowImg": "是否允许上传图片 1:是 0:否",
						            "isShow": "是否显示 1:是 0:否",
						            "isextend": "默认值false",
						            "name": "规格名称"
						        }
						    ]
						}
					

新增(adminapi/speccats/add)

请求参数

						{
						    "token":"apiKey-必填",
						    "catName": "规格名称-必填",
						    "isAllowImg": "是否允许上传图片 1:是 0:否",
						    "isShow": "是否显示 1:是 0:否",
						    "goodsCatId": "最后一级商品分类id-必填"
						}
					

返回值

						{"status":1,"msg":"新增成功"}
					

修改(adminapi/speccats/edit)

请求参数

						{
						    "token":"apiKey-必填",
						    "catId":"商品规格分类id-必填",
						    "catName": "规格名称-必填",
						    "isAllowImg": "是否允许上传图片 1:是 0:否",
						    "isShow": "是否显示 1:是 0:否",
						    "goodsCatId": "最后一级商品分类id-必填"
						}
					

返回值

						{"status":1,"msg":"编辑成功"}
					

查询(adminapi/speccats/getById)

请求参数

						{
						  "token":"apiKey-必填",
						  "catId": "商品规格分类id-必填"
						}
					

返回值

						{
						    "token":"apiKey-必填",
						    "catId": "商品规格分类id",
						    "goodsCatId": "最后一级商品分类id",
						    "goodsCatPath": "商品分类组成的字符串",
						    "catName": "规格名称",
						    "isAllowImg": "是否允许上传图片 1:是 0:否",
						    "isShow": "是否显示 1:是 0:否"
						}
					

删除(adminapi/speccats/del)

请求参数

						{
						  "token":"apiKey-必填",
						  "catId": "商品规格分类id-必填"
						}
					

返回值

						{"status":1,"msg":"删除成功"}
					

新增(adminapi/attributes/add)

请求参数

						{
						    "token":"apiKey-必填",
						    "attrName": "属性名称-必填",
						    "attrType": "属性类型-必填 0:输入框 1:多选项 2:下拉框",
						    "attrVal": "当attrType不为0时-必填,例如:属性选项1,属性选项2",
						    "isShow": "是否显示 1:是 0:否",
						    "attrSort": "排序号",
						    "goodsCatId": "最后一级商品分类id-必填"
						}
					

返回值

						{"status":1,"msg":"新增成功"}
					

修改(adminapi/attributes/edit)

请求参数

						{
						    "token":"apiKey-必填",
						    "attrId": "属性id-必填",
						    "attrName": "属性名称-必填",
						    "attrType": "属性类型-必填 0:输入框 1:多选项 2:下拉框",
						    "attrVal": "当attrType不为0时-必填,例如:属性选项1,属性选项2",
						    "isShow": "是否显示 1:是 0:否",
						    "attrSort": "排序号",
						    "goodsCatId": "最后一级商品分类id-必填"
						}
					

返回值

						{"status":1,"msg":"编辑成功"}
					

查询(adminapi/attributes/getById)

请求参数

						{
						  "token":"apiKey-必填",
						  "attrId": "属性id-必填"
						}
					

返回值

						{
						    "attrId": "属性id",
						    "attrName": "属性名称",
						    "attrType": "属性类型 0:输入框 1:多选项 2:下拉框",
						    "attrVal": "属性值,例如:属性选项1,属性选项2",
						    "isShow": "是否显示 1:是 0:否",
						    "attrSort": "排序号",
						    "goodsCatId": "最后一级商品分类id"
						}
					

删除(adminapi/attributes/del)

请求参数

						{
						  "token":"apiKey-必填",
						  "attrId": "属性id-必填"
						}
					

返回值

						{"status":1,"msg":"删除成功"}
					

获取订单列表(adminapi/orders/pageQuery)

请求参数

						{
						    "token":"apiKey-必填",
						    "status":"订单状态-必填  -3:用户拒收 -2:未付款的订单 -1:用户取消 0:待发货 1:配送中 2:用户确认收货",
						    "page":"页码-默认为1",
						    "pagesize":"每页条数-默认为15",
						    "startDate":"订单开始时间-可选",
						    "endDate":"订单结束时间-可选",
						    "orderNo":"订单号-可选",
						}
					

返回值

						{
						    "status": "接口请求状态。1:成功  -1:失败",
						    "msg": "ok",
						    "data": {
						        "total": "数据总条数",
						        "per_page": "每页显示数",
						        "current_page": "当前页码",
						        "last_page": "总页码",
						        "data": [
						            {
						                "orderId": "订单ID",
						                "orderNo": "订单号",
						                "createTime": "创建时间,2022-11-11 09:59:11",
						                "userName": "用户名称",
						                "orderSrc": "订单来源,例如:third",
						                "platformMoney": "平台对外供货价格",
						                "orderStatus": "主订单状态  -3:用户拒收 -2:未付款的订单 -1:用户取消 0:待发货 1:配送中 2:用户确认收货",
						                "deliverStatus": "发货状态 0:未发货 1:部分发布  10:全部发货",
						                "sellerName": "深圳美肤管理公司",
						                "userTotalMoney": "用户端订单销售总金额",
						                "payFrom": "支付方式,例如:credit",
						                "userRealTotalMoney": "用户端用户主订单实际金额",
						                "isPay": "订单是否已支付 1:是 0:否",
						                "userIsPay": "用户是否已支付 1:是 0:否",
						                "userPayFrom": "用户支付方式",
						                "orderStatusText": "订单状态说明,例如:待发货",
						                "deliverStatusText": "发货状态说明,例如:待发货",
						                "orderSrcText": "订单来源文字说明",
						                "payFromText": "支付方式文字说明",
						                "list": [
						                    {
						                        "id": "ID",
						                        "orderId": "订单ID",
						                        "goodsId": "商品ID",
						                        "goodsNum": "商品数",
						                        "goodsPrice": "商品价格",
						                        "goodsUnit": "商品单位",
						                        "goodsName": "商品名",
						                        "goodsImg": "商品图片",
						                        "createTime": "创建时间,例如2021-04-08 18:39:10",
						                        "orderGoodsStatus": "订单商品发货状态 0:待发货 1:已发货 -1:缺货",
						                        "isSellerReject": "订单商品拒收状态 0:未拒收 1:拒收",
						                        "sellerRejectReason": "拒收原因",
						                        "sellerRejectOtherReason": "经销商拒收说明,当sellerRejectReason=10000时该字段不为空",
						                        "isCheckGoods": "验货状态 1:已处理 0:待处理",
						                        "rejectNum": "拒收数量",
						                        "lossNum": "损耗数量",
						                        "manufactureDates": "商品生产日期",
						                        "failureTime": "记录标记为缺货(拒收)时间",
						                        "checkoutJson": "出库记录json",
						                        "goodsSpecNames": "商品规格",
						                        "shotGoodsSpecNames": "商品规格名"
						                    }
						                ],
						                "isCancelOrder": "订单是否可取消(1:是 0:否)",
						                "isRejectOrder": "是否可拒收(1:是 0:否)",
						                "isReceiveOrder": "是否可收货(1:是 0:否)"
						            }
						        ]
						    }
						}
					

获取订单详情(adminapi/orders/getById)

请求参数

						{
						    "token":"apiKey-必填",
						    "orderId":"订单id"
						}
					

返回值

						{
						    "status": "接口请求状态。1:成功  -1:失败",
						    "msg": "",
						    "data": {
						        "orderId": "订单ID",
						        "orderNo": "订单号",
						        "totalMoney": "采购应付总金额",
						        "platformMoney": "采购商品总金额",
						        "orderNo": "订单号",
						        "userName": "用户名称",
						        "userAddress": "收货人地址",
						        "userPhone": "收货人手机号",
						        "areaId": "最后一级地区id",
						        "areaIdPath": "地区ID路径字符串,例如:440000_440300_440304_",
						        "sellerId": "经销商id",
						        "isInvoice": "是否开发票",
						        "invoiceClient": "发票抬头",
						        "orderRemarks": "订单备注",
						        "orderSrc": "标记订单来源",
						        "orderStatus": "主订单状态  -3:用户拒收 -2:未付款的订单 -1:用户取消 0:待发货 1:配送中 2:用户确认收货",
						        "deliverStatus": "发货状态 0:未发货 1:部分发布  10:全部发货",
						        "createTime": "创建时间",
						        "dataFlag": 1,
						        "invoiceJson": {
						            "invoiceType": "发票类型(1:增值税专用发票0:普通发票)",
						            "invoiceHead": "发票抬头",
						            "invoiceCode": "发票税号",
						            "invoiceAddr": "注册地址",
						            "invoicePhoneNumber": "注册电话",
						            "invoiceBankName": "开户银行",
						            "invoiceBankNo": "银行账户"
						        },
						        "isClose": "订单是否已关闭 1:是 0:否,由管理员操作",
						        "platformCancelRemarks": "平台取消订单说明",
						        "sellerCancelReason": "取消订单理由id",
						        "sellerCancelOtherReason": "取消订单说明,当sellerCancelReason=10000时该字段不为空",
						        "changeOrderStatusRemarks": "平台变更订单状态说明",
						        "realTotalMoney": "主订单实际金额(金额返还后剩余的订单金额)",
						        "finishedTime": "订单完成时间",
						        "isMakeInvoice": "是否已开发票",
						        "refundMoney": "退款金额,0.00",
						        "sellerDeliverMoney": "经销商运费",
						        "isAppraise": "是否评价(1:是 0:否)",
						        "userTotalMoney": "销售商品总金额",
						        "userRealTotalMoney": "销售实付总金额",
						        "deliverType": "配送方式(1:自提 0:快递)",
						        "sysDeliverMoney": "运费",
						        "orderStatusText": "订单状态说明,例如:待发货",
						        "deliverStatusText": "配送状态说明,例如:待发货",
						        "payFromText": "支付方式说明",
						        "goods": [
						            {
						                "id": "订单商品表id",
						                "orderId": "订单id",
						                "depotOrderId": "仓库订单id",
						                "sellerGoodsId": "经销商商品id",
						                "sysGoodsId": "商品id",
						                "goodsNum": "商品数",
						                "goodsPrice": "商品价格",
						                "goodsUnit": "盒",
						                "platformMoney": "平台供货格",
						                "goodsMoney": "商品价格",
						                "goodsName": "商品名",
						                "goodsImg": "商品图片",
						                "sysGoodsSpecId": "系统规格商品id",
						                "sysGoodsSpecNames": "规格商品名称",
						                "createTime": "创建时间",
						                "orderGoodsStatus": "订单商品发货状态 0:待发货 1:已发货 -1:缺货",
						                "isSellerReject": "订单商品拒收状态 0:未拒收 1:拒收",
						                "sellerRejectReason": "拒收原因",
						                "sellerRejectOtherReason": "经销商拒收说明,当sellerRejectReason=10000时该字段不为空",
						                "isCheckGoods": "验货状态 1:已处理 0:待处理",
						                "rejectNum": "拒收数量",
						                "lossNum": "损耗数量",
						                "manufactureDates": "商品生产日期",
						                "failureTime": "记录标记为缺货(拒收)时间",
						                "checkoutJson": "出库记录json",
						                "sellerGoodsName": "经销商品名称",
						                "sellerGoodsPrice": "经销商商品价格",
						                "goodsCode": "订单商品代码,当订单为赠品时该值为'gift'",
						                "promotionJson": "优惠信息json",
						                "couponVal": "优惠券优惠价格",
						                "rewardVal": "满减优惠价格",
						                "platformRewardVal": "平台-满减优惠价格",
						                "platformGoodsCode": "平台-订单商品代码,当订单为赠品时该值为'gift'",
						                "platformPromotionJson": "平台-优惠信息json",
						                "sysGoodsSn": "商品货号",
						                "sysProductNo": "商品产品号",
						                "platformCouponVal": "平台-优惠券优惠价格",
						                "depotId": "仓库id",
						                "depotOrderStatus": "仓库订单状态",
						                "depotName": "仓库名称",
						                "depotOrderNo": "仓库订单号码",
						                "orderGoodsStatusText": "订单商品状态说明"
						            }
						        ]
						    }
						}
					

订单发货(adminapi/orders/deliverOrder)

请求参数

						{
						    "token":"apiKey-必填",
						    "orderId":"订单id"
						    "deliverType":"配送类型 0:无需快递配送  1:需要快递配送",
						    "erpExpressId":"ERP快递公司ID,如果无需快递配送则传0",
						    "expressNo":'快递单号,有快递公司则需要传',
						    "orderGoodsIds":"本次发货的订单-商品ID列表,以,号分割"
						}
					

返回值

						{
						    "status": "接口请求状态。1:成功  -1:失败",
						    "msg": "发货成功"
						}
					

订单拆分(adminapi/orders/splitOrder)

请求参数

						{
						    "token":"apiKey-必填",
						    "orderId":"订单id"
						    "orders":"拆分订单的数组,
						                格式:orders=[
						                   [
						                   "deliverMoney"=>"运费","goodsIds"=>[
                                              [
                                                    "orderGoodsId"=>'本次拆分的订单-商品ID',
                                                    "num"=>'本次拆分的订单-商品数量'
                                              ]
                                           ]
                                           ]
						                  ]"

						}
					

返回值

						{
						    "status": "接口请求状态。1:成功  -1:失败",
						    "msg": "拆分成功"
						}
					

订单恢复(被拆分的订单)(adminapi/orders/revokeOrder)

请求参数

						{
						    "token":"apiKey-必填",
						    "orderId":"订单id"
						}
					

返回值

						{
						    "status": "接口请求状态。1:成功  -1:失败",
						    "msg": "恢复成功"
						}
					

同步快递列表(adminapi/express/add

请求参数

						{
						    "token":"apiKey-必填",
						    "express":"订快递数组 express=[
                               ['erpExpressId'=>'erp里的快递公司ID','expressName'=>'快递公司名称']
						    ]"
						}
					

返回值

						{
						    "status": "接口请求状态。1:成功  -1:失败",
						    "msg": "恢复成功"
						}
					

推送

接收方需返回以下信息表示接口响应成功

						{status:1}
					

订单发货(notifyUrl?method=purchaseDeliver)

推送参数

						{
						  "orderId": "订单ID",
						  "orderGoodsIds": "发货商品(格式:[goodsId_goodsSpecId,goodsId_goodsSpecId])",
						  "deliverType": "发货方式(deliverType==1需要物流,deliverType=0无需物流)",
						  "expressName": "快递公司名",
						  "expressNo": "快递编号"
						}
					

订单商品缺货(notifyUrl?method=purchaseStockOut)

推送参数

						{
						  "orderId": "订单ID",
						  "orderGoodsIds": "缺货商品(格式:[goodsId_goodsSpecId,goodsId_goodsSpecId])"
						}
					

修改商品

推送参数

						{
						  "method": "editGoods",
						  "goodsId": "商品id"
						}
					

修改商品后会通知第三方,请通过adminapi/goods/getById获取最新的商品数据进行同步更新

上下架商品(修改商品操作也会触发该事件)

推送参数

						{
						  "method": "changeSale",
						  "ids": "商品id组成的数组,例如[1,2,4]",
						  "isSale":"1:上架 0:下架"
						}
					

删除商品

推送参数

						{
						  "method": "delGoods",
						  "ids": "商品id组成的数组,例如[1,2,4]"
						}
					

商品出入库

推送参数

						{
						  "method": "editStock",
						  "goodsId": "商品id"
						}
					

修改商品库存后会通知第三方,请通过adminapi/goods/getById获取最新的商品数据进行同步更新

添加微信立即咨询

咨询热线:15918671994

—— 专业电商系统及解决方案提供服务商 ——

多用户
商城系统

订单
管理系统

订货
管理系统

多语言
商城系统

扫描二维码

添加客服咨询详情