开放平台

编辑消费项目

请求地址(POST)

https://openapi.1card1.cn/Special/Edit_GoodsItem?openId=[OpenId]&signature=[Signature]&timestamp=[TimeStamp]

字段 说明
OpenId 登陆开放平台生成的OpenId
Signature 签名=md5(OpenId+Secret+Timestamp+data),格式:32位md5大写加密
TimeStamp 发起请求的时间戳,查看标准timestamp

请求说明

data= {"guid":"8250655c-dacd-e411-830e-902b34bc6260","barCode":"201202400","name":"康帅傅绿茶","goodsItemTypeGuid":"9C156524-38DE-E211-A4B1-A0E8599D15EA","imagePath":"", "userAccount":"10000","price":"50", "unit":"箱","referencePrice":"20", "isBargain":"true","bargainPrice":"40", "allowBargainDiscount":"true","allowBargainPoint":"true","meno":"备注","description":"描述", "discountRate":"0.8","pointRate":"1.25","isPublishToMall":"false","marketPrice":"100","mallPrice":"20", "extValue": [{"颜色": "红","尺码":"M"}]}

字段 是否必须 说明
guid 消费项目(Guid)唯一标识(通过“获取商品列表”获得)
barCode 商品编码
name 商品名称
goodsItemTypeGuid 商品类别(Guid)唯一标识(通过“获取商品类型列表”获得)
userAccount 工号
price 价格
referencePrice 参考进货价
unit 单位(如: 个 ,次, 罐 等)
imagePath 图片地址(通过“上传图片”获得)imagePath 字段
isBargain 是否特价
allowBargainDiscount 特价情况下是否允许打折(仅在isBargain = true时生效)
allowBargainPoint 特价情况下是否允许积分(仅在isBargain = true时生效)
bargainPrice 特价价格(仅在isBargain = true时生效)
meno 备注
description 描述
discountRate 折扣系数
pointRate 积分系数
isPublishToMall 是否上架(true表示上架,false表示下架,不填或者其他表示不进行上下架操作)
marketPrice 划线价(isPublishToMall为true时生效)
mallPrice 商城价(isPublishToMall为true时生效)
extValue 扩展字段(Json类型字符串数组)

返回说明

成功时返回:

{"status":0,"message":"消费项目添加成功"}}

失败时返回:

{"status":-1,"message":"消费项目添加失败"}

字段 是否必须 说明
status 状态(0,成功;-1,失败)
message 是否成功及提示

编辑消费项目 调试